@eudiplo/sdk-core 5.1.0 → 6.0.0-main.072fb7a

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/index.js CHANGED
@@ -1052,6 +1052,11 @@ var issuanceConfigControllerStoreIssuanceConfiguration = (options) => (options.c
1052
1052
  ...options.headers
1053
1053
  }
1054
1054
  });
1055
+ var issuanceConfigControllerReissueRegistrationCertificate = (options) => (options?.client ?? client).post({
1056
+ security: [{ scheme: "bearer", type: "http" }],
1057
+ url: "/api/issuer/config/registration-cert/reissue",
1058
+ ...options
1059
+ });
1055
1060
  var credentialConfigControllerGetConfigs = (options) => (options?.client ?? client).get({
1056
1061
  security: [{ scheme: "bearer", type: "http" }],
1057
1062
  url: "/api/issuer/credentials",
@@ -1085,6 +1090,15 @@ var credentialConfigControllerUpdateCredentialConfiguration = (options) => (opti
1085
1090
  ...options.headers
1086
1091
  }
1087
1092
  });
1093
+ var schemaMetadataControllerPublishSchemaMetadata = (options) => (options.client ?? client).post({
1094
+ security: [{ scheme: "bearer", type: "http" }],
1095
+ url: "/api/schema-metadata/publish",
1096
+ ...options,
1097
+ headers: {
1098
+ "Content-Type": "application/json",
1099
+ ...options.headers
1100
+ }
1101
+ });
1088
1102
  var schemaMetadataControllerSignSchemaMetaConfig = (options) => (options.client ?? client).post({
1089
1103
  security: [{ scheme: "bearer", type: "http" }],
1090
1104
  url: "/api/schema-metadata/sign",
@@ -1094,6 +1108,15 @@ var schemaMetadataControllerSignSchemaMetaConfig = (options) => (options.client
1094
1108
  ...options.headers
1095
1109
  }
1096
1110
  });
1111
+ var schemaMetadataControllerPublishSchemaMetadataVersion = (options) => (options.client ?? client).post({
1112
+ security: [{ scheme: "bearer", type: "http" }],
1113
+ url: "/api/schema-metadata/publish-version",
1114
+ ...options,
1115
+ headers: {
1116
+ "Content-Type": "application/json",
1117
+ ...options.headers
1118
+ }
1119
+ });
1097
1120
  var schemaMetadataControllerSignVersionSchemaMetaConfig = (options) => (options.client ?? client).post({
1098
1121
  security: [{ scheme: "bearer", type: "http" }],
1099
1122
  url: "/api/schema-metadata/sign-version",
@@ -1152,11 +1175,6 @@ var schemaMetadataControllerGetJwt = (options) => (options.client ?? client).get
1152
1175
  url: "/api/schema-metadata/{id}/versions/{version}/jwt",
1153
1176
  ...options
1154
1177
  });
1155
- var schemaMetadataControllerExport = (options) => (options.client ?? client).get({
1156
- security: [{ scheme: "bearer", type: "http" }],
1157
- url: "/api/schema-metadata/{id}/versions/{version}/export",
1158
- ...options
1159
- });
1160
1178
  var schemaMetadataControllerGetSchema = (options) => (options.client ?? client).get({
1161
1179
  security: [{ scheme: "bearer", type: "http" }],
1162
1180
  url: "/api/schema-metadata/{id}/versions/{version}/schemas/{format}",
@@ -1337,6 +1355,15 @@ var presentationManagementControllerResolveSchemaMetadata = (options) => (option
1337
1355
  ...options.headers
1338
1356
  }
1339
1357
  });
1358
+ var presentationManagementControllerResolveSchemaMetadataJwt = (options) => (options.client ?? client).post({
1359
+ security: [{ scheme: "bearer", type: "http" }],
1360
+ url: "/api/verifier/config/schema-metadata/resolve-jwt",
1361
+ ...options,
1362
+ headers: {
1363
+ "Content-Type": "application/json",
1364
+ ...options.headers
1365
+ }
1366
+ });
1340
1367
  var presentationManagementControllerListSchemaMetadataCatalog = (options) => (options?.client ?? client).get({
1341
1368
  security: [{ scheme: "bearer", type: "http" }],
1342
1369
  url: "/api/verifier/config/schema-metadata/catalog",
@@ -1430,6 +1457,17 @@ var deferredControllerFailDeferred = (options) => (options.client ?? client).pos
1430
1457
  ...options.headers
1431
1458
  }
1432
1459
  });
1460
+ var chainedAsVpControllerPar = (options) => (options.client ?? client).post({ url: "/api/issuers/{tenantId}/chained-as-vp/par", ...options });
1461
+ var chainedAsVpControllerAuthorize = (options) => (options.client ?? client).get({ url: "/api/issuers/{tenantId}/chained-as-vp/authorize", ...options });
1462
+ var chainedAsVpControllerVpCallback = (options) => (options.client ?? client).get({ url: "/api/issuers/{tenantId}/chained-as-vp/vp-callback", ...options });
1463
+ var chainedAsVpControllerToken = (options) => (options.client ?? client).post({
1464
+ url: "/api/issuers/{tenantId}/chained-as-vp/token",
1465
+ ...options,
1466
+ headers: {
1467
+ "Content-Type": "application/json",
1468
+ ...options.headers
1469
+ }
1470
+ });
1433
1471
  var keyChainControllerGetProviders = (options) => (options?.client ?? client).get({
1434
1472
  security: [{ scheme: "bearer", type: "http" }],
1435
1473
  url: "/api/key-chain/providers",
@@ -1440,6 +1478,25 @@ var keyChainControllerGetProvidersHealth = (options) => (options?.client ?? clie
1440
1478
  url: "/api/key-chain/providers/health",
1441
1479
  ...options
1442
1480
  });
1481
+ var keyChainControllerDeleteTenantKmsConfig = (options) => (options?.client ?? client).delete({
1482
+ security: [{ scheme: "bearer", type: "http" }],
1483
+ url: "/api/key-chain/providers/config",
1484
+ ...options
1485
+ });
1486
+ var keyChainControllerGetTenantKmsConfig = (options) => (options?.client ?? client).get({
1487
+ security: [{ scheme: "bearer", type: "http" }],
1488
+ url: "/api/key-chain/providers/config",
1489
+ ...options
1490
+ });
1491
+ var keyChainControllerUpdateTenantKmsConfig = (options) => (options.client ?? client).put({
1492
+ security: [{ scheme: "bearer", type: "http" }],
1493
+ url: "/api/key-chain/providers/config",
1494
+ ...options,
1495
+ headers: {
1496
+ "Content-Type": "application/json",
1497
+ ...options.headers
1498
+ }
1499
+ });
1443
1500
  var keyChainControllerGetAll = (options) => (options?.client ?? client).get({
1444
1501
  security: [{ scheme: "bearer", type: "http" }],
1445
1502
  url: "/api/key-chain",
@@ -1634,7 +1691,8 @@ var EudiploClient = class {
1634
1691
  response_type: options.responseType ?? "uri",
1635
1692
  credentialConfigurationIds: options.credentialConfigurationIds,
1636
1693
  flow: options.flow ?? "pre_authorized_code",
1637
- tx_code: options.txCode
1694
+ tx_code: options.txCode,
1695
+ authorization_server: options.authorizationServer
1638
1696
  };
1639
1697
  if (options.claims) {
1640
1698
  const credentialClaims = {};
@@ -2056,6 +2114,40 @@ async function submitDcApiResponse(options) {
2056
2114
 
2057
2115
  // src/config/derive.ts
2058
2116
  var JSON_SCHEMA_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema";
2117
+ function resolveChildPath(parentPath, parentType, childPath) {
2118
+ if (childPath.length >= parentPath.length) {
2119
+ const startsWithParent = parentPath.every((seg, i) => seg === childPath[i]);
2120
+ if (startsWithParent) {
2121
+ return childPath;
2122
+ }
2123
+ }
2124
+ if (parentType === "array" && childPath.length > 0) {
2125
+ if (childPath[0] === null) {
2126
+ throw new Error(
2127
+ "Relative child paths under array parents must not start with null. Use ['field'] instead of [null, 'field']."
2128
+ );
2129
+ }
2130
+ if (typeof childPath[0] !== "number") {
2131
+ return [...parentPath, null, ...childPath];
2132
+ }
2133
+ }
2134
+ return [...parentPath, ...childPath];
2135
+ }
2136
+ function flattenFields(fields) {
2137
+ const result = [];
2138
+ for (const field of fields) {
2139
+ const { children, ...fieldWithoutChildren } = field;
2140
+ result.push(fieldWithoutChildren);
2141
+ if (children && children.length > 0) {
2142
+ const resolvedChildren = children.map((child) => ({
2143
+ ...child,
2144
+ path: resolveChildPath(field.path, field.type, child.path)
2145
+ }));
2146
+ result.push(...flattenFields(resolvedChildren));
2147
+ }
2148
+ }
2149
+ return result;
2150
+ }
2059
2151
  function segmentToKey(segment) {
2060
2152
  if (segment === null) {
2061
2153
  return "*";
@@ -2126,9 +2218,25 @@ function mergeLeafSchema(existing, next) {
2126
2218
  }
2127
2219
  return merged;
2128
2220
  }
2221
+ function isArrayPathSegment(segment) {
2222
+ return typeof segment === "number" || segment === null;
2223
+ }
2129
2224
  function ensureSchemaNode(root, path) {
2130
2225
  let cursor = root;
2131
2226
  for (const segment of path) {
2227
+ if (isArrayPathSegment(segment)) {
2228
+ if (cursor.type !== "array") {
2229
+ cursor.type = "array";
2230
+ }
2231
+ if (!cursor.items || typeof cursor.items !== "object" || Array.isArray(cursor.items)) {
2232
+ cursor.items = {
2233
+ type: "object",
2234
+ properties: {}
2235
+ };
2236
+ }
2237
+ cursor = cursor.items;
2238
+ continue;
2239
+ }
2132
2240
  const key = segmentToKey(segment);
2133
2241
  cursor.properties ??= {};
2134
2242
  if (!cursor.properties[key]) {
@@ -2155,7 +2263,7 @@ function ensureFrameNode(root, path) {
2155
2263
  }
2156
2264
  function buildClaims(fields) {
2157
2265
  const claims = {};
2158
- for (const field of fields) {
2266
+ for (const field of flattenFields(fields)) {
2159
2267
  if (!Object.prototype.hasOwnProperty.call(field, "defaultValue")) {
2160
2268
  continue;
2161
2269
  }
@@ -2166,7 +2274,7 @@ function buildClaims(fields) {
2166
2274
  function buildDisclosureFrame(fields) {
2167
2275
  const frame = {};
2168
2276
  let hasDisclosure = false;
2169
- for (const field of fields) {
2277
+ for (const field of flattenFields(fields)) {
2170
2278
  if (!field.disclosable || field.path.length === 0) {
2171
2279
  continue;
2172
2280
  }
@@ -2183,7 +2291,7 @@ function buildDisclosureFrame(fields) {
2183
2291
  return hasDisclosure ? frame : void 0;
2184
2292
  }
2185
2293
  function buildClaimsMetadata(fields) {
2186
- return fields.filter((field) => field.path.length > 0).map((field) => {
2294
+ return flattenFields(fields).filter((field) => field.path.length > 0).map((field) => {
2187
2295
  const metadata = {
2188
2296
  path: field.path
2189
2297
  };
@@ -2221,14 +2329,23 @@ function buildJsonSchema(fields) {
2221
2329
  type: "object",
2222
2330
  properties: {}
2223
2331
  };
2224
- for (const field of fields) {
2332
+ for (const field of flattenFields(fields)) {
2225
2333
  if (field.path.length === 0) {
2226
2334
  continue;
2227
2335
  }
2228
2336
  const parent = ensureSchemaNode(root, field.path.slice(0, -1));
2229
- const leafKey = segmentToKey(field.path.at(-1) ?? "");
2230
- parent.properties ??= {};
2337
+ const leafSegment = field.path.at(-1);
2231
2338
  const leafSchema = buildLeafSchema(field);
2339
+ if (isArrayPathSegment(leafSegment ?? null)) {
2340
+ if (parent.type !== "array") {
2341
+ parent.type = "array";
2342
+ }
2343
+ const existingItems = parent.items && typeof parent.items === "object" && !Array.isArray(parent.items) ? parent.items : void 0;
2344
+ parent.items = existingItems ? mergeLeafSchema(existingItems, leafSchema) : leafSchema;
2345
+ continue;
2346
+ }
2347
+ const leafKey = segmentToKey(leafSegment ?? "");
2348
+ parent.properties ??= {};
2232
2349
  const existing = parent.properties[leafKey];
2233
2350
  parent.properties[leafKey] = existing && typeof existing === "object" && !Array.isArray(existing) ? mergeLeafSchema(existing, leafSchema) : leafSchema;
2234
2351
  if (field.mandatory) {
@@ -2239,7 +2356,7 @@ function buildJsonSchema(fields) {
2239
2356
  }
2240
2357
  function buildClaimsByNamespace(fields) {
2241
2358
  const byNamespace = {};
2242
- for (const field of fields) {
2359
+ for (const field of flattenFields(fields)) {
2243
2360
  if (!field.namespace || !Object.prototype.hasOwnProperty.call(field, "defaultValue")) {
2244
2361
  continue;
2245
2362
  }
@@ -2281,6 +2398,10 @@ exports.cacheControllerClearAllCaches = cacheControllerClearAllCaches;
2281
2398
  exports.cacheControllerClearStatusListCache = cacheControllerClearStatusListCache;
2282
2399
  exports.cacheControllerClearTrustListCache = cacheControllerClearTrustListCache;
2283
2400
  exports.cacheControllerGetStats = cacheControllerGetStats;
2401
+ exports.chainedAsVpControllerAuthorize = chainedAsVpControllerAuthorize;
2402
+ exports.chainedAsVpControllerPar = chainedAsVpControllerPar;
2403
+ exports.chainedAsVpControllerToken = chainedAsVpControllerToken;
2404
+ exports.chainedAsVpControllerVpCallback = chainedAsVpControllerVpCallback;
2284
2405
  exports.client = client;
2285
2406
  exports.clientControllerCreateClient = clientControllerCreateClient;
2286
2407
  exports.clientControllerDeleteClient = clientControllerDeleteClient;
@@ -2298,19 +2419,24 @@ exports.credentialOfferControllerGetOffer = credentialOfferControllerGetOffer;
2298
2419
  exports.deferredControllerCompleteDeferred = deferredControllerCompleteDeferred;
2299
2420
  exports.deferredControllerFailDeferred = deferredControllerFailDeferred;
2300
2421
  exports.deriveRuntimeArtifacts = deriveRuntimeArtifacts;
2422
+ exports.flattenFields = flattenFields;
2301
2423
  exports.isDcApiAvailable = isDcApiAvailable;
2302
2424
  exports.issuanceConfigControllerGetIssuanceConfigurations = issuanceConfigControllerGetIssuanceConfigurations;
2425
+ exports.issuanceConfigControllerReissueRegistrationCertificate = issuanceConfigControllerReissueRegistrationCertificate;
2303
2426
  exports.issuanceConfigControllerStoreIssuanceConfiguration = issuanceConfigControllerStoreIssuanceConfiguration;
2304
2427
  exports.keyChainControllerCreate = keyChainControllerCreate;
2305
2428
  exports.keyChainControllerDelete = keyChainControllerDelete;
2429
+ exports.keyChainControllerDeleteTenantKmsConfig = keyChainControllerDeleteTenantKmsConfig;
2306
2430
  exports.keyChainControllerExport = keyChainControllerExport;
2307
2431
  exports.keyChainControllerGetAll = keyChainControllerGetAll;
2308
2432
  exports.keyChainControllerGetById = keyChainControllerGetById;
2309
2433
  exports.keyChainControllerGetProviders = keyChainControllerGetProviders;
2310
2434
  exports.keyChainControllerGetProvidersHealth = keyChainControllerGetProvidersHealth;
2435
+ exports.keyChainControllerGetTenantKmsConfig = keyChainControllerGetTenantKmsConfig;
2311
2436
  exports.keyChainControllerImport = keyChainControllerImport;
2312
2437
  exports.keyChainControllerRotate = keyChainControllerRotate;
2313
2438
  exports.keyChainControllerUpdate = keyChainControllerUpdate;
2439
+ exports.keyChainControllerUpdateTenantKmsConfig = keyChainControllerUpdateTenantKmsConfig;
2314
2440
  exports.presentationManagementControllerConfiguration = presentationManagementControllerConfiguration;
2315
2441
  exports.presentationManagementControllerDeleteConfiguration = presentationManagementControllerDeleteConfiguration;
2316
2442
  exports.presentationManagementControllerGetConfiguration = presentationManagementControllerGetConfiguration;
@@ -2318,6 +2444,7 @@ exports.presentationManagementControllerListSchemaMetadataCatalog = presentation
2318
2444
  exports.presentationManagementControllerReissueRegistrationCertificate = presentationManagementControllerReissueRegistrationCertificate;
2319
2445
  exports.presentationManagementControllerResolveIssuerMetadata = presentationManagementControllerResolveIssuerMetadata;
2320
2446
  exports.presentationManagementControllerResolveSchemaMetadata = presentationManagementControllerResolveSchemaMetadata;
2447
+ exports.presentationManagementControllerResolveSchemaMetadataJwt = presentationManagementControllerResolveSchemaMetadataJwt;
2321
2448
  exports.presentationManagementControllerStorePresentationConfig = presentationManagementControllerStorePresentationConfig;
2322
2449
  exports.presentationManagementControllerUpdateConfiguration = presentationManagementControllerUpdateConfiguration;
2323
2450
  exports.registrarControllerCreateAccessCertificate = registrarControllerCreateAccessCertificate;
@@ -2326,7 +2453,6 @@ exports.registrarControllerDeleteConfig = registrarControllerDeleteConfig;
2326
2453
  exports.registrarControllerGetConfig = registrarControllerGetConfig;
2327
2454
  exports.registrarControllerUpdateConfig = registrarControllerUpdateConfig;
2328
2455
  exports.schemaMetadataControllerDeprecateVersion = schemaMetadataControllerDeprecateVersion;
2329
- exports.schemaMetadataControllerExport = schemaMetadataControllerExport;
2330
2456
  exports.schemaMetadataControllerFindAll = schemaMetadataControllerFindAll;
2331
2457
  exports.schemaMetadataControllerFindOne = schemaMetadataControllerFindOne;
2332
2458
  exports.schemaMetadataControllerGetJwt = schemaMetadataControllerGetJwt;
@@ -2335,6 +2461,8 @@ exports.schemaMetadataControllerGetMine = schemaMetadataControllerGetMine;
2335
2461
  exports.schemaMetadataControllerGetSchema = schemaMetadataControllerGetSchema;
2336
2462
  exports.schemaMetadataControllerGetVersions = schemaMetadataControllerGetVersions;
2337
2463
  exports.schemaMetadataControllerGetVocabularies = schemaMetadataControllerGetVocabularies;
2464
+ exports.schemaMetadataControllerPublishSchemaMetadata = schemaMetadataControllerPublishSchemaMetadata;
2465
+ exports.schemaMetadataControllerPublishSchemaMetadataVersion = schemaMetadataControllerPublishSchemaMetadataVersion;
2338
2466
  exports.schemaMetadataControllerRemove = schemaMetadataControllerRemove;
2339
2467
  exports.schemaMetadataControllerSignSchemaMetaConfig = schemaMetadataControllerSignSchemaMetaConfig;
2340
2468
  exports.schemaMetadataControllerSignVersionSchemaMetaConfig = schemaMetadataControllerSignVersionSchemaMetaConfig;
package/dist/index.mjs CHANGED
@@ -1050,6 +1050,11 @@ var issuanceConfigControllerStoreIssuanceConfiguration = (options) => (options.c
1050
1050
  ...options.headers
1051
1051
  }
1052
1052
  });
1053
+ var issuanceConfigControllerReissueRegistrationCertificate = (options) => (options?.client ?? client).post({
1054
+ security: [{ scheme: "bearer", type: "http" }],
1055
+ url: "/api/issuer/config/registration-cert/reissue",
1056
+ ...options
1057
+ });
1053
1058
  var credentialConfigControllerGetConfigs = (options) => (options?.client ?? client).get({
1054
1059
  security: [{ scheme: "bearer", type: "http" }],
1055
1060
  url: "/api/issuer/credentials",
@@ -1083,6 +1088,15 @@ var credentialConfigControllerUpdateCredentialConfiguration = (options) => (opti
1083
1088
  ...options.headers
1084
1089
  }
1085
1090
  });
1091
+ var schemaMetadataControllerPublishSchemaMetadata = (options) => (options.client ?? client).post({
1092
+ security: [{ scheme: "bearer", type: "http" }],
1093
+ url: "/api/schema-metadata/publish",
1094
+ ...options,
1095
+ headers: {
1096
+ "Content-Type": "application/json",
1097
+ ...options.headers
1098
+ }
1099
+ });
1086
1100
  var schemaMetadataControllerSignSchemaMetaConfig = (options) => (options.client ?? client).post({
1087
1101
  security: [{ scheme: "bearer", type: "http" }],
1088
1102
  url: "/api/schema-metadata/sign",
@@ -1092,6 +1106,15 @@ var schemaMetadataControllerSignSchemaMetaConfig = (options) => (options.client
1092
1106
  ...options.headers
1093
1107
  }
1094
1108
  });
1109
+ var schemaMetadataControllerPublishSchemaMetadataVersion = (options) => (options.client ?? client).post({
1110
+ security: [{ scheme: "bearer", type: "http" }],
1111
+ url: "/api/schema-metadata/publish-version",
1112
+ ...options,
1113
+ headers: {
1114
+ "Content-Type": "application/json",
1115
+ ...options.headers
1116
+ }
1117
+ });
1095
1118
  var schemaMetadataControllerSignVersionSchemaMetaConfig = (options) => (options.client ?? client).post({
1096
1119
  security: [{ scheme: "bearer", type: "http" }],
1097
1120
  url: "/api/schema-metadata/sign-version",
@@ -1150,11 +1173,6 @@ var schemaMetadataControllerGetJwt = (options) => (options.client ?? client).get
1150
1173
  url: "/api/schema-metadata/{id}/versions/{version}/jwt",
1151
1174
  ...options
1152
1175
  });
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
1176
  var schemaMetadataControllerGetSchema = (options) => (options.client ?? client).get({
1159
1177
  security: [{ scheme: "bearer", type: "http" }],
1160
1178
  url: "/api/schema-metadata/{id}/versions/{version}/schemas/{format}",
@@ -1335,6 +1353,15 @@ var presentationManagementControllerResolveSchemaMetadata = (options) => (option
1335
1353
  ...options.headers
1336
1354
  }
1337
1355
  });
1356
+ var presentationManagementControllerResolveSchemaMetadataJwt = (options) => (options.client ?? client).post({
1357
+ security: [{ scheme: "bearer", type: "http" }],
1358
+ url: "/api/verifier/config/schema-metadata/resolve-jwt",
1359
+ ...options,
1360
+ headers: {
1361
+ "Content-Type": "application/json",
1362
+ ...options.headers
1363
+ }
1364
+ });
1338
1365
  var presentationManagementControllerListSchemaMetadataCatalog = (options) => (options?.client ?? client).get({
1339
1366
  security: [{ scheme: "bearer", type: "http" }],
1340
1367
  url: "/api/verifier/config/schema-metadata/catalog",
@@ -1428,6 +1455,17 @@ var deferredControllerFailDeferred = (options) => (options.client ?? client).pos
1428
1455
  ...options.headers
1429
1456
  }
1430
1457
  });
1458
+ var chainedAsVpControllerPar = (options) => (options.client ?? client).post({ url: "/api/issuers/{tenantId}/chained-as-vp/par", ...options });
1459
+ var chainedAsVpControllerAuthorize = (options) => (options.client ?? client).get({ url: "/api/issuers/{tenantId}/chained-as-vp/authorize", ...options });
1460
+ var chainedAsVpControllerVpCallback = (options) => (options.client ?? client).get({ url: "/api/issuers/{tenantId}/chained-as-vp/vp-callback", ...options });
1461
+ var chainedAsVpControllerToken = (options) => (options.client ?? client).post({
1462
+ url: "/api/issuers/{tenantId}/chained-as-vp/token",
1463
+ ...options,
1464
+ headers: {
1465
+ "Content-Type": "application/json",
1466
+ ...options.headers
1467
+ }
1468
+ });
1431
1469
  var keyChainControllerGetProviders = (options) => (options?.client ?? client).get({
1432
1470
  security: [{ scheme: "bearer", type: "http" }],
1433
1471
  url: "/api/key-chain/providers",
@@ -1438,6 +1476,25 @@ var keyChainControllerGetProvidersHealth = (options) => (options?.client ?? clie
1438
1476
  url: "/api/key-chain/providers/health",
1439
1477
  ...options
1440
1478
  });
1479
+ var keyChainControllerDeleteTenantKmsConfig = (options) => (options?.client ?? client).delete({
1480
+ security: [{ scheme: "bearer", type: "http" }],
1481
+ url: "/api/key-chain/providers/config",
1482
+ ...options
1483
+ });
1484
+ var keyChainControllerGetTenantKmsConfig = (options) => (options?.client ?? client).get({
1485
+ security: [{ scheme: "bearer", type: "http" }],
1486
+ url: "/api/key-chain/providers/config",
1487
+ ...options
1488
+ });
1489
+ var keyChainControllerUpdateTenantKmsConfig = (options) => (options.client ?? client).put({
1490
+ security: [{ scheme: "bearer", type: "http" }],
1491
+ url: "/api/key-chain/providers/config",
1492
+ ...options,
1493
+ headers: {
1494
+ "Content-Type": "application/json",
1495
+ ...options.headers
1496
+ }
1497
+ });
1441
1498
  var keyChainControllerGetAll = (options) => (options?.client ?? client).get({
1442
1499
  security: [{ scheme: "bearer", type: "http" }],
1443
1500
  url: "/api/key-chain",
@@ -1632,7 +1689,8 @@ var EudiploClient = class {
1632
1689
  response_type: options.responseType ?? "uri",
1633
1690
  credentialConfigurationIds: options.credentialConfigurationIds,
1634
1691
  flow: options.flow ?? "pre_authorized_code",
1635
- tx_code: options.txCode
1692
+ tx_code: options.txCode,
1693
+ authorization_server: options.authorizationServer
1636
1694
  };
1637
1695
  if (options.claims) {
1638
1696
  const credentialClaims = {};
@@ -2054,6 +2112,40 @@ async function submitDcApiResponse(options) {
2054
2112
 
2055
2113
  // src/config/derive.ts
2056
2114
  var JSON_SCHEMA_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema";
2115
+ function resolveChildPath(parentPath, parentType, childPath) {
2116
+ if (childPath.length >= parentPath.length) {
2117
+ const startsWithParent = parentPath.every((seg, i) => seg === childPath[i]);
2118
+ if (startsWithParent) {
2119
+ return childPath;
2120
+ }
2121
+ }
2122
+ if (parentType === "array" && childPath.length > 0) {
2123
+ if (childPath[0] === null) {
2124
+ throw new Error(
2125
+ "Relative child paths under array parents must not start with null. Use ['field'] instead of [null, 'field']."
2126
+ );
2127
+ }
2128
+ if (typeof childPath[0] !== "number") {
2129
+ return [...parentPath, null, ...childPath];
2130
+ }
2131
+ }
2132
+ return [...parentPath, ...childPath];
2133
+ }
2134
+ function flattenFields(fields) {
2135
+ const result = [];
2136
+ for (const field of fields) {
2137
+ const { children, ...fieldWithoutChildren } = field;
2138
+ result.push(fieldWithoutChildren);
2139
+ if (children && children.length > 0) {
2140
+ const resolvedChildren = children.map((child) => ({
2141
+ ...child,
2142
+ path: resolveChildPath(field.path, field.type, child.path)
2143
+ }));
2144
+ result.push(...flattenFields(resolvedChildren));
2145
+ }
2146
+ }
2147
+ return result;
2148
+ }
2057
2149
  function segmentToKey(segment) {
2058
2150
  if (segment === null) {
2059
2151
  return "*";
@@ -2124,9 +2216,25 @@ function mergeLeafSchema(existing, next) {
2124
2216
  }
2125
2217
  return merged;
2126
2218
  }
2219
+ function isArrayPathSegment(segment) {
2220
+ return typeof segment === "number" || segment === null;
2221
+ }
2127
2222
  function ensureSchemaNode(root, path) {
2128
2223
  let cursor = root;
2129
2224
  for (const segment of path) {
2225
+ if (isArrayPathSegment(segment)) {
2226
+ if (cursor.type !== "array") {
2227
+ cursor.type = "array";
2228
+ }
2229
+ if (!cursor.items || typeof cursor.items !== "object" || Array.isArray(cursor.items)) {
2230
+ cursor.items = {
2231
+ type: "object",
2232
+ properties: {}
2233
+ };
2234
+ }
2235
+ cursor = cursor.items;
2236
+ continue;
2237
+ }
2130
2238
  const key = segmentToKey(segment);
2131
2239
  cursor.properties ??= {};
2132
2240
  if (!cursor.properties[key]) {
@@ -2153,7 +2261,7 @@ function ensureFrameNode(root, path) {
2153
2261
  }
2154
2262
  function buildClaims(fields) {
2155
2263
  const claims = {};
2156
- for (const field of fields) {
2264
+ for (const field of flattenFields(fields)) {
2157
2265
  if (!Object.prototype.hasOwnProperty.call(field, "defaultValue")) {
2158
2266
  continue;
2159
2267
  }
@@ -2164,7 +2272,7 @@ function buildClaims(fields) {
2164
2272
  function buildDisclosureFrame(fields) {
2165
2273
  const frame = {};
2166
2274
  let hasDisclosure = false;
2167
- for (const field of fields) {
2275
+ for (const field of flattenFields(fields)) {
2168
2276
  if (!field.disclosable || field.path.length === 0) {
2169
2277
  continue;
2170
2278
  }
@@ -2181,7 +2289,7 @@ function buildDisclosureFrame(fields) {
2181
2289
  return hasDisclosure ? frame : void 0;
2182
2290
  }
2183
2291
  function buildClaimsMetadata(fields) {
2184
- return fields.filter((field) => field.path.length > 0).map((field) => {
2292
+ return flattenFields(fields).filter((field) => field.path.length > 0).map((field) => {
2185
2293
  const metadata = {
2186
2294
  path: field.path
2187
2295
  };
@@ -2219,14 +2327,23 @@ function buildJsonSchema(fields) {
2219
2327
  type: "object",
2220
2328
  properties: {}
2221
2329
  };
2222
- for (const field of fields) {
2330
+ for (const field of flattenFields(fields)) {
2223
2331
  if (field.path.length === 0) {
2224
2332
  continue;
2225
2333
  }
2226
2334
  const parent = ensureSchemaNode(root, field.path.slice(0, -1));
2227
- const leafKey = segmentToKey(field.path.at(-1) ?? "");
2228
- parent.properties ??= {};
2335
+ const leafSegment = field.path.at(-1);
2229
2336
  const leafSchema = buildLeafSchema(field);
2337
+ if (isArrayPathSegment(leafSegment ?? null)) {
2338
+ if (parent.type !== "array") {
2339
+ parent.type = "array";
2340
+ }
2341
+ const existingItems = parent.items && typeof parent.items === "object" && !Array.isArray(parent.items) ? parent.items : void 0;
2342
+ parent.items = existingItems ? mergeLeafSchema(existingItems, leafSchema) : leafSchema;
2343
+ continue;
2344
+ }
2345
+ const leafKey = segmentToKey(leafSegment ?? "");
2346
+ parent.properties ??= {};
2230
2347
  const existing = parent.properties[leafKey];
2231
2348
  parent.properties[leafKey] = existing && typeof existing === "object" && !Array.isArray(existing) ? mergeLeafSchema(existing, leafSchema) : leafSchema;
2232
2349
  if (field.mandatory) {
@@ -2237,7 +2354,7 @@ function buildJsonSchema(fields) {
2237
2354
  }
2238
2355
  function buildClaimsByNamespace(fields) {
2239
2356
  const byNamespace = {};
2240
- for (const field of fields) {
2357
+ for (const field of flattenFields(fields)) {
2241
2358
  if (!field.namespace || !Object.prototype.hasOwnProperty.call(field, "defaultValue")) {
2242
2359
  continue;
2243
2360
  }
@@ -2260,6 +2377,6 @@ function deriveRuntimeArtifacts(fields) {
2260
2377
  };
2261
2378
  }
2262
2379
 
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, schemaMetadataControllerExport, schemaMetadataControllerFindAll, schemaMetadataControllerFindOne, schemaMetadataControllerGetJwt, schemaMetadataControllerGetLatest, schemaMetadataControllerGetMine, schemaMetadataControllerGetSchema, schemaMetadataControllerGetVersions, schemaMetadataControllerGetVocabularies, 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 };
2380
+ 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, issuanceConfigControllerReissueRegistrationCertificate, 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
2381
  //# sourceMappingURL=index.mjs.map
2265
2382
  //# sourceMappingURL=index.mjs.map