@myvitalrx/metadata-runtime 1.20.4 → 1.20.6
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.d.ts +275 -164
- package/dist/index.js +628 -107
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,9 @@ declare const RUNTIME_METADATA_EVENTS: {
|
|
|
65
65
|
readonly PROVIDER_SELECTED: "runtimeMetadata.provider.selected";
|
|
66
66
|
readonly PROVIDER_FALLBACK: "runtimeMetadata.provider.fallback";
|
|
67
67
|
readonly PROVIDER_RECOVERED: "runtimeMetadata.provider.recovered";
|
|
68
|
+
readonly LOCALIZATION_ENSURE_START: "runtimeMetadata.localization.ensure.start";
|
|
69
|
+
readonly LOCALIZATION_ENSURE_COMPLETE: "runtimeMetadata.localization.ensure.complete";
|
|
70
|
+
readonly LOCALIZATION_ENSURE_FAILED: "runtimeMetadata.localization.ensure.failed";
|
|
68
71
|
};
|
|
69
72
|
|
|
70
73
|
/**
|
|
@@ -212,6 +215,14 @@ declare class MetadataProjectionUnavailableError extends RuntimeMetadataError {
|
|
|
212
215
|
declare class MetadataExtensionContractError extends RuntimeMetadataError {
|
|
213
216
|
constructor(message: string, path?: string);
|
|
214
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* The attached extension does not implement the pinned-read protocol required
|
|
220
|
+
* by this SDK. Treat it as retryable infrastructure unavailability so a
|
|
221
|
+
* partial layer rollout cannot serve an unpinned registry response.
|
|
222
|
+
*/
|
|
223
|
+
declare class MetadataExtensionProtocolError extends RuntimeMetadataError {
|
|
224
|
+
constructor(expectedProtocolVersion: string, actualProtocolVersion?: string);
|
|
225
|
+
}
|
|
215
226
|
/** Discovery query was rejected before a listing or relationship read. */
|
|
216
227
|
declare class MetadataDiscoveryError extends RuntimeMetadataError {
|
|
217
228
|
constructor(message: string, code?: string);
|
|
@@ -236,6 +247,16 @@ declare class InvalidMetadataReferenceError extends RuntimeMetadataError {
|
|
|
236
247
|
|
|
237
248
|
/** Wire projectionVersion stamped on every envelope / manifest / current pointer. */
|
|
238
249
|
declare const PROJECTION_VERSION: "1.0";
|
|
250
|
+
/**
|
|
251
|
+
* Publication status on `current/manifest.json`.
|
|
252
|
+
* `updating` is written before serving bytes are replaced.
|
|
253
|
+
* `ready` is written last and is the only status that may be served.
|
|
254
|
+
*/
|
|
255
|
+
declare const PUBLICATION_STATUS: {
|
|
256
|
+
readonly UPDATING: "updating";
|
|
257
|
+
readonly READY: "ready";
|
|
258
|
+
};
|
|
259
|
+
type PublicationStatus = (typeof PUBLICATION_STATUS)[keyof typeof PUBLICATION_STATUS];
|
|
239
260
|
|
|
240
261
|
/**
|
|
241
262
|
* Projection wire type — any non-empty camelCase (or legacy) identifier.
|
|
@@ -300,6 +321,17 @@ interface ProjectionManifest {
|
|
|
300
321
|
environment: string;
|
|
301
322
|
generatedAt: string;
|
|
302
323
|
projectionVersion: string;
|
|
324
|
+
/**
|
|
325
|
+
* Publication marker for `current/manifest.json`.
|
|
326
|
+
* Staging manifests stay `updating` and are not served.
|
|
327
|
+
* The publisher writes `ready` last, after current/ bytes are validated.
|
|
328
|
+
*/
|
|
329
|
+
publicationStatus?: PublicationStatus;
|
|
330
|
+
/**
|
|
331
|
+
* Revision this manifest publishes. On a READY current manifest this is
|
|
332
|
+
* the serving change revision. Equal to `releaseId` for a normal publish.
|
|
333
|
+
*/
|
|
334
|
+
changeRevision?: string;
|
|
303
335
|
metadataCount: number;
|
|
304
336
|
artifactCount: number;
|
|
305
337
|
contentHash: string;
|
|
@@ -477,7 +509,8 @@ interface CommonProjectionFile extends ProjectionEnvelope {
|
|
|
477
509
|
modules: string[];
|
|
478
510
|
}
|
|
479
511
|
/**
|
|
480
|
-
*
|
|
512
|
+
* Synthetic view of the serving publication.
|
|
513
|
+
* Built from a READY `current/manifest.json`. There is no root pointer object.
|
|
481
514
|
*/
|
|
482
515
|
interface ProjectionCurrentPointer {
|
|
483
516
|
currentRelease: string;
|
|
@@ -927,12 +960,12 @@ interface ReadModelCache<TSnapshot = unknown, TManifest = unknown, TBundle = unk
|
|
|
927
960
|
*
|
|
928
961
|
* Current load path (unchanged):
|
|
929
962
|
* ```text
|
|
930
|
-
* current
|
|
963
|
+
* current/manifest.json → projection files → MetadataCache.replace
|
|
931
964
|
* ```
|
|
932
965
|
*
|
|
933
966
|
* Future multi-group path (not implemented):
|
|
934
967
|
* ```text
|
|
935
|
-
* current.json
|
|
968
|
+
* current/manifest.json (groups) → per-group artifacts → loadGroup × N
|
|
936
969
|
* ```
|
|
937
970
|
*/
|
|
938
971
|
interface ReadModelCacheLoader {
|
|
@@ -951,7 +984,7 @@ interface ReadModelCacheLoader {
|
|
|
951
984
|
*
|
|
952
985
|
* Pipeline:
|
|
953
986
|
* ```text
|
|
954
|
-
* current
|
|
987
|
+
* current/manifest.json (release / integrity / lookupIndex / metadataTypes)
|
|
955
988
|
* Domain files: `{MetadataTypeCode}.json` on demand (not via this interface)
|
|
956
989
|
* ```
|
|
957
990
|
*
|
|
@@ -959,12 +992,12 @@ interface ReadModelCacheLoader {
|
|
|
959
992
|
* `common.json` is not required for HTTP response enrichment.
|
|
960
993
|
*/
|
|
961
994
|
interface ReadModelDownloader<TBundle = unknown, TManifest = unknown> {
|
|
962
|
-
/** Resolve the active release via
|
|
995
|
+
/** Resolve the active release via `current/manifest.json`. */
|
|
963
996
|
discoverLatestRevision(): Promise<string>;
|
|
964
997
|
/** Download + validate the authoritative manifest for a release. */
|
|
965
998
|
downloadManifest(releaseId: string): Promise<TManifest>;
|
|
966
999
|
/**
|
|
967
|
-
* Bootstrap only: current
|
|
1000
|
+
* Bootstrap only: `current/manifest.json`.
|
|
968
1001
|
* Domain projection files are loaded on demand by MetadataTypeCode.
|
|
969
1002
|
*/
|
|
970
1003
|
loadBootstrap(releaseId?: string): Promise<TBundle>;
|
|
@@ -1182,7 +1215,10 @@ type MetadataDownloaderOptions = {
|
|
|
1182
1215
|
loader?: MetadataLoader;
|
|
1183
1216
|
};
|
|
1184
1217
|
/**
|
|
1185
|
-
* Downloads projection artifacts from S3 via current.json
|
|
1218
|
+
* Downloads projection artifacts from S3 via `current/manifest.json` and
|
|
1219
|
+
* `current/{file}`. Archive keys are history and are not served.
|
|
1220
|
+
* Direct S3 reads exist for explicit `METADATA_EXTENSION_FALLBACK=s3` harnesses.
|
|
1221
|
+
* Production consumers keep `METADATA_EXTENSION_FALLBACK=none`.
|
|
1186
1222
|
*
|
|
1187
1223
|
* Domain projection files are addressed as `{MetadataTypeCode}.json` — never via
|
|
1188
1224
|
* `manifest.metadataTypes` / projection filename lookup. Manifest remains for
|
|
@@ -1201,7 +1237,7 @@ declare class MetadataDownloader implements ReadModelDownloader<LoadedProjection
|
|
|
1201
1237
|
constructor(options: MetadataDownloaderOptions);
|
|
1202
1238
|
buildKey(releaseId: string, fileName: string): string;
|
|
1203
1239
|
/**
|
|
1204
|
-
* Resolve the active
|
|
1240
|
+
* Resolve the active change revision from `current/manifest.json`.
|
|
1205
1241
|
*/
|
|
1206
1242
|
discoverLatestRevision(): Promise<string>;
|
|
1207
1243
|
downloadCurrentPointer(): Promise<ProjectionCurrentPointer>;
|
|
@@ -1210,7 +1246,7 @@ declare class MetadataDownloader implements ReadModelDownloader<LoadedProjection
|
|
|
1210
1246
|
*/
|
|
1211
1247
|
downloadManifest(releaseId: string): Promise<ProjectionManifest>;
|
|
1212
1248
|
/**
|
|
1213
|
-
* Bootstrap: resolve
|
|
1249
|
+
* Bootstrap: resolve `current/manifest.json` only.
|
|
1214
1250
|
*
|
|
1215
1251
|
* Manifest supplies lookupIndex, metadataTypes, and integrity hashes.
|
|
1216
1252
|
* `common.json` is **not** loaded — enrichment resolves from domain projections.
|
|
@@ -1327,6 +1363,11 @@ declare class MetadataCache implements ReadModelCache<MetadataCacheSnapshot, Pro
|
|
|
1327
1363
|
entry: ProjectionEntry;
|
|
1328
1364
|
localizedLabel?: string;
|
|
1329
1365
|
}>, guard?: MetadataCacheWriteGuard): MetadataCacheSnapshot;
|
|
1366
|
+
/**
|
|
1367
|
+
* Merge localization catalogs for one or more locales into the active snapshot.
|
|
1368
|
+
* Does not touch domain projection files. Same-release writes only when guarded.
|
|
1369
|
+
*/
|
|
1370
|
+
mergeLocalizationMaps(maps: ReadonlyMap<string, ReadonlyMap<string, string>>, guard?: MetadataCacheWriteGuard): MetadataCacheSnapshot;
|
|
1330
1371
|
/**
|
|
1331
1372
|
* Merge type-catalog fields (e.g. valueDataType) into the synthetic extension
|
|
1332
1373
|
* manifest so synchronous helpers can read them after listTypeValues.
|
|
@@ -1365,8 +1406,13 @@ declare class MetadataResolver implements ReadModelResolver<ProjectionEntry> {
|
|
|
1365
1406
|
* O(1) localization lookup using in-memory locale map.
|
|
1366
1407
|
* Resolves by key `<typeCode>.<valueCode>`.
|
|
1367
1408
|
* Falls back to default locale if requested locale does not have the key.
|
|
1409
|
+
*
|
|
1410
|
+
* When `catalogOnly` is true, never reads domain projection entries — a
|
|
1411
|
+
* missing localization key returns undefined.
|
|
1368
1412
|
*/
|
|
1369
|
-
resolveLocalization(typeCode: string, valueCode: string, locale?: string
|
|
1413
|
+
resolveLocalization(typeCode: string, valueCode: string, locale?: string, options?: {
|
|
1414
|
+
catalogOnly?: boolean;
|
|
1415
|
+
}): string | undefined;
|
|
1370
1416
|
/**
|
|
1371
1417
|
* Look up localized display name for a MetadataType from manifest or domain file.
|
|
1372
1418
|
*/
|
|
@@ -1425,9 +1471,9 @@ type MetadataRefreshServiceOptions = {
|
|
|
1425
1471
|
/**
|
|
1426
1472
|
* Coordinates startup, event-driven, and periodic cache refresh with graceful degradation.
|
|
1427
1473
|
* On refresh failure the existing cache is retained.
|
|
1428
|
-
* Always resolves the active release via current.json unless a release id is forced.
|
|
1474
|
+
* Always resolves the active release via current/manifest.json unless a release id is forced.
|
|
1429
1475
|
*
|
|
1430
|
-
* Bootstrap only (current
|
|
1476
|
+
* Bootstrap only (`current/manifest.json`). Domain `{MetadataTypeCode}.json` files
|
|
1431
1477
|
* are loaded on demand by {@link RuntimeMetadataService.ensureProjectionTypesLoaded}.
|
|
1432
1478
|
* `common.json` is not part of the HTTP enrichment bootstrap path.
|
|
1433
1479
|
*
|
|
@@ -1448,18 +1494,18 @@ declare class MetadataRefreshService implements ReadModelRefreshCoordinator {
|
|
|
1448
1494
|
getRefreshStatus(): RefreshStatus;
|
|
1449
1495
|
getLastRefreshError(): string | null;
|
|
1450
1496
|
/**
|
|
1451
|
-
* Demand-driven bootstrap: current
|
|
1497
|
+
* Demand-driven bootstrap: current/manifest.json → atomic cache replace.
|
|
1452
1498
|
* Domain projection files and common.json are not loaded here.
|
|
1453
1499
|
*/
|
|
1454
1500
|
initialize(revision?: string): Promise<void>;
|
|
1455
1501
|
/**
|
|
1456
|
-
* Event strategy: MetadataProjectionCompleted → reload via current.json → atomic swap.
|
|
1502
|
+
* Event strategy: MetadataProjectionCompleted → reload via current/manifest.json → atomic swap.
|
|
1457
1503
|
* `releaseId` is diagnostic; the pointer is the source of truth.
|
|
1458
1504
|
* Returns true when the cache was updated.
|
|
1459
1505
|
*/
|
|
1460
1506
|
refreshFromEvent(releaseId?: string): Promise<boolean>;
|
|
1461
1507
|
/**
|
|
1462
|
-
* Periodic strategy: re-read current.json; reload only if changed.
|
|
1508
|
+
* Periodic strategy: re-read current/manifest.json; reload only if changed.
|
|
1463
1509
|
*/
|
|
1464
1510
|
checkAndRefresh(preferredRevision?: string): Promise<boolean>;
|
|
1465
1511
|
startPeriodicCheck(intervalMs: number): void;
|
|
@@ -1492,6 +1538,143 @@ declare class MetadataHealthService {
|
|
|
1492
1538
|
isHealthy(): boolean;
|
|
1493
1539
|
}
|
|
1494
1540
|
|
|
1541
|
+
declare const METADATA_READ_POLICY: {
|
|
1542
|
+
readonly ALLOW_STALE: "ALLOW_STALE";
|
|
1543
|
+
readonly REQUIRE_FRESH: "REQUIRE_FRESH";
|
|
1544
|
+
};
|
|
1545
|
+
type MetadataReadPolicy = (typeof METADATA_READ_POLICY)[keyof typeof METADATA_READ_POLICY];
|
|
1546
|
+
declare const METADATA_RELATION_DIRECTION: {
|
|
1547
|
+
readonly OUTGOING: "OUTGOING";
|
|
1548
|
+
readonly INCOMING: "INCOMING";
|
|
1549
|
+
};
|
|
1550
|
+
type MetadataRelationDirection = (typeof METADATA_RELATION_DIRECTION)[keyof typeof METADATA_RELATION_DIRECTION];
|
|
1551
|
+
declare const METADATA_ATTRIBUTE_FILTER_KEY: {
|
|
1552
|
+
readonly ROLE_TYPE_CODE: "roleTypeCode";
|
|
1553
|
+
readonly CATEGORY_CODE: "categoryCode";
|
|
1554
|
+
readonly MODULE_CODE: "moduleCode";
|
|
1555
|
+
readonly FEATURE_CODE: "featureCode";
|
|
1556
|
+
readonly DEVICE_CATEGORY_CODE: "deviceCategoryCode";
|
|
1557
|
+
};
|
|
1558
|
+
type MetadataAttributeFilterKey = PublishedValueAttributeFilterKey;
|
|
1559
|
+
interface MetadataListOptions {
|
|
1560
|
+
status?: string | string[];
|
|
1561
|
+
limit?: number;
|
|
1562
|
+
cursor?: string;
|
|
1563
|
+
sortBy?: PublishedValueSort;
|
|
1564
|
+
sortDirection?: PublishedValueSortDirection;
|
|
1565
|
+
/** Exact canonical value code. */
|
|
1566
|
+
valueCode?: string;
|
|
1567
|
+
/** Case-sensitive prefix of the canonical value code. */
|
|
1568
|
+
valueCodePrefix?: string;
|
|
1569
|
+
attributes?: Partial<Record<MetadataAttributeFilterKey, string>>;
|
|
1570
|
+
/** Reject the read when the active snapshot is a different release. */
|
|
1571
|
+
releaseId?: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Opt-in freshness rule. Omitted and `ALLOW_STALE` keep the current
|
|
1574
|
+
* serving behavior, including STALE and DEGRADED snapshots.
|
|
1575
|
+
*/
|
|
1576
|
+
readPolicy?: MetadataReadPolicy;
|
|
1577
|
+
}
|
|
1578
|
+
interface MetadataListResult {
|
|
1579
|
+
items: ProjectionVersionEntry[];
|
|
1580
|
+
nextCursor?: string;
|
|
1581
|
+
releaseId: string | null;
|
|
1582
|
+
}
|
|
1583
|
+
interface MetadataBatchListOptions extends Omit<MetadataListOptions, 'cursor'> {
|
|
1584
|
+
}
|
|
1585
|
+
interface MetadataBatchTypeList {
|
|
1586
|
+
typeCode: string;
|
|
1587
|
+
/** False when the type is not in the projection. Distinct from an empty type. */
|
|
1588
|
+
found: boolean;
|
|
1589
|
+
items: ProjectionVersionEntry[];
|
|
1590
|
+
nextCursor?: string;
|
|
1591
|
+
/** Set when this type could not be listed completely. */
|
|
1592
|
+
errorCode?: string;
|
|
1593
|
+
}
|
|
1594
|
+
interface MetadataBatchListResult {
|
|
1595
|
+
releaseId: string | null;
|
|
1596
|
+
types: MetadataBatchTypeList[];
|
|
1597
|
+
}
|
|
1598
|
+
interface MetadataRelationshipQuery {
|
|
1599
|
+
sourceTypeCode: string;
|
|
1600
|
+
sourceValueCode: string;
|
|
1601
|
+
targetTypeCode?: string;
|
|
1602
|
+
relationType?: string;
|
|
1603
|
+
direction?: MetadataRelationDirection;
|
|
1604
|
+
/**
|
|
1605
|
+
* Omitted is ACTIVE. `INACTIVE` and `ALL` are not answered from
|
|
1606
|
+
* `relationship-index.json`.
|
|
1607
|
+
*/
|
|
1608
|
+
status?: MetadataStatusFilter;
|
|
1609
|
+
releaseId?: string;
|
|
1610
|
+
readPolicy?: MetadataReadPolicy;
|
|
1611
|
+
}
|
|
1612
|
+
interface MetadataRelationship {
|
|
1613
|
+
/**
|
|
1614
|
+
* Present when the release has a typed relation catalog.
|
|
1615
|
+
* Omitted for adjacency rows read from `relationship-index.json`.
|
|
1616
|
+
*/
|
|
1617
|
+
relationType?: string;
|
|
1618
|
+
status: string;
|
|
1619
|
+
direction: MetadataRelationDirection;
|
|
1620
|
+
fromMetadataTypeCode: string;
|
|
1621
|
+
fromMetadataValueCode: string;
|
|
1622
|
+
toMetadataTypeCode: string;
|
|
1623
|
+
toMetadataValueCode: string;
|
|
1624
|
+
moduleCode?: string;
|
|
1625
|
+
featureCode?: string;
|
|
1626
|
+
permissionActionCode?: string;
|
|
1627
|
+
}
|
|
1628
|
+
interface MetadataRelationshipResult {
|
|
1629
|
+
releaseId: string | null;
|
|
1630
|
+
/**
|
|
1631
|
+
* False when this release has neither a typed relation catalog nor a
|
|
1632
|
+
* loaded relationship index. An empty index is supported.
|
|
1633
|
+
*/
|
|
1634
|
+
supported: boolean;
|
|
1635
|
+
relationships: MetadataRelationship[];
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Maximum relationship queries in one extension HTTP request.
|
|
1639
|
+
* Keep aligned with the extension `RELATIONSHIP_QUERY_BATCH_LIMIT`.
|
|
1640
|
+
*/
|
|
1641
|
+
declare const RELATIONSHIP_QUERY_BATCH_LIMIT = 100;
|
|
1642
|
+
interface MetadataReadSession {
|
|
1643
|
+
releaseId: string;
|
|
1644
|
+
readPolicy: MetadataReadPolicy;
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* Optional discovery surface. Kept off {@link MetadataProvider} so existing
|
|
1648
|
+
* provider implementations stay valid without new mandatory methods.
|
|
1649
|
+
*/
|
|
1650
|
+
interface MetadataDiscoveryProvider {
|
|
1651
|
+
listValuesByType(typeCode: string, options?: MetadataListOptions): Promise<MetadataListResult>;
|
|
1652
|
+
getRelationships(query: MetadataRelationshipQuery): Promise<MetadataRelationshipResult>;
|
|
1653
|
+
/**
|
|
1654
|
+
* Resolve many relationship queries against one release.
|
|
1655
|
+
* Optional so existing providers stay valid. Callers fall back to
|
|
1656
|
+
* {@link getRelationships} when it is absent or the extension route is unsupported.
|
|
1657
|
+
*/
|
|
1658
|
+
queryRelationships?(queries: readonly MetadataRelationshipQuery[]): Promise<MetadataRelationshipResult[]>;
|
|
1659
|
+
listValuesByTypes(typeCodes: readonly string[], options?: MetadataBatchListOptions): Promise<MetadataBatchListResult>;
|
|
1660
|
+
}
|
|
1661
|
+
declare function supportsMetadataDiscovery(provider: object): provider is MetadataDiscoveryProvider;
|
|
1662
|
+
declare function isFreshProjectionState(state: string | undefined | null): boolean;
|
|
1663
|
+
declare function assertMetadataReadPolicy(policy: MetadataReadPolicy | undefined, state: string, releaseId: string | null): void;
|
|
1664
|
+
declare function assertReleasePin(requestedReleaseId: string | undefined, actualReleaseId: string | null): void;
|
|
1665
|
+
declare function throwPublishedListFailure(failure: {
|
|
1666
|
+
code: string;
|
|
1667
|
+
message: string;
|
|
1668
|
+
}): never;
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* Pins a permission-registry read to the release selected by a metadata
|
|
1672
|
+
* session. Omit both fields only for the legacy, unpinned API.
|
|
1673
|
+
*/
|
|
1674
|
+
type PermissionRegistryReadOptions = {
|
|
1675
|
+
releaseId?: string;
|
|
1676
|
+
readPolicy?: MetadataReadPolicy;
|
|
1677
|
+
};
|
|
1495
1678
|
type MetadataResolveOptions = {
|
|
1496
1679
|
locale?: string;
|
|
1497
1680
|
version?: number;
|
|
@@ -1588,7 +1771,7 @@ interface MetadataProvider {
|
|
|
1588
1771
|
* Missing or invalid artifacts throw. An empty `permissions` array is a
|
|
1589
1772
|
* published registry, not a load failure.
|
|
1590
1773
|
*/
|
|
1591
|
-
getPermissionRegistry(): Promise<PermissionRegistryDocument>;
|
|
1774
|
+
getPermissionRegistry(options?: PermissionRegistryReadOptions): Promise<PermissionRegistryDocument>;
|
|
1592
1775
|
getStatus(): Promise<MetadataProviderStatus>;
|
|
1593
1776
|
isAvailable(): Promise<boolean>;
|
|
1594
1777
|
/**
|
|
@@ -1596,7 +1779,7 @@ interface MetadataProvider {
|
|
|
1596
1779
|
*/
|
|
1597
1780
|
waitUntilReady?(): Promise<MetadataProviderStatus>;
|
|
1598
1781
|
/**
|
|
1599
|
-
* Ask the transport to re-read current.json and swap if changed.
|
|
1782
|
+
* Ask the transport to re-read current/manifest.json and swap if changed.
|
|
1600
1783
|
* Extension-only. Returns true when a new snapshot was activated.
|
|
1601
1784
|
*/
|
|
1602
1785
|
requestRefresh?(releaseId?: string): Promise<boolean>;
|
|
@@ -1633,135 +1816,6 @@ declare function projectionEntryToMetadataValue(typeCode: string, valueCode: str
|
|
|
1633
1816
|
declare function localizedLabelFromEntry(entry: ProjectionEntry, locale?: string): string;
|
|
1634
1817
|
declare function metadataValueToReference(value: MetadataValue): MetadataReference;
|
|
1635
1818
|
|
|
1636
|
-
declare const METADATA_READ_POLICY: {
|
|
1637
|
-
readonly ALLOW_STALE: "ALLOW_STALE";
|
|
1638
|
-
readonly REQUIRE_FRESH: "REQUIRE_FRESH";
|
|
1639
|
-
};
|
|
1640
|
-
type MetadataReadPolicy = (typeof METADATA_READ_POLICY)[keyof typeof METADATA_READ_POLICY];
|
|
1641
|
-
declare const METADATA_RELATION_DIRECTION: {
|
|
1642
|
-
readonly OUTGOING: "OUTGOING";
|
|
1643
|
-
readonly INCOMING: "INCOMING";
|
|
1644
|
-
};
|
|
1645
|
-
type MetadataRelationDirection = (typeof METADATA_RELATION_DIRECTION)[keyof typeof METADATA_RELATION_DIRECTION];
|
|
1646
|
-
declare const METADATA_ATTRIBUTE_FILTER_KEY: {
|
|
1647
|
-
readonly ROLE_TYPE_CODE: "roleTypeCode";
|
|
1648
|
-
readonly CATEGORY_CODE: "categoryCode";
|
|
1649
|
-
readonly MODULE_CODE: "moduleCode";
|
|
1650
|
-
readonly FEATURE_CODE: "featureCode";
|
|
1651
|
-
readonly DEVICE_CATEGORY_CODE: "deviceCategoryCode";
|
|
1652
|
-
};
|
|
1653
|
-
type MetadataAttributeFilterKey = PublishedValueAttributeFilterKey;
|
|
1654
|
-
interface MetadataListOptions {
|
|
1655
|
-
status?: string | string[];
|
|
1656
|
-
limit?: number;
|
|
1657
|
-
cursor?: string;
|
|
1658
|
-
sortBy?: PublishedValueSort;
|
|
1659
|
-
sortDirection?: PublishedValueSortDirection;
|
|
1660
|
-
/** Exact canonical value code. */
|
|
1661
|
-
valueCode?: string;
|
|
1662
|
-
/** Case-sensitive prefix of the canonical value code. */
|
|
1663
|
-
valueCodePrefix?: string;
|
|
1664
|
-
attributes?: Partial<Record<MetadataAttributeFilterKey, string>>;
|
|
1665
|
-
/** Reject the read when the active snapshot is a different release. */
|
|
1666
|
-
releaseId?: string;
|
|
1667
|
-
/**
|
|
1668
|
-
* Opt-in freshness rule. Omitted and `ALLOW_STALE` keep the current
|
|
1669
|
-
* serving behavior, including STALE and DEGRADED snapshots.
|
|
1670
|
-
*/
|
|
1671
|
-
readPolicy?: MetadataReadPolicy;
|
|
1672
|
-
}
|
|
1673
|
-
interface MetadataListResult {
|
|
1674
|
-
items: ProjectionVersionEntry[];
|
|
1675
|
-
nextCursor?: string;
|
|
1676
|
-
releaseId: string | null;
|
|
1677
|
-
}
|
|
1678
|
-
interface MetadataBatchListOptions extends Omit<MetadataListOptions, 'cursor'> {
|
|
1679
|
-
}
|
|
1680
|
-
interface MetadataBatchTypeList {
|
|
1681
|
-
typeCode: string;
|
|
1682
|
-
/** False when the type is not in the projection. Distinct from an empty type. */
|
|
1683
|
-
found: boolean;
|
|
1684
|
-
items: ProjectionVersionEntry[];
|
|
1685
|
-
nextCursor?: string;
|
|
1686
|
-
/** Set when this type could not be listed completely. */
|
|
1687
|
-
errorCode?: string;
|
|
1688
|
-
}
|
|
1689
|
-
interface MetadataBatchListResult {
|
|
1690
|
-
releaseId: string | null;
|
|
1691
|
-
types: MetadataBatchTypeList[];
|
|
1692
|
-
}
|
|
1693
|
-
interface MetadataRelationshipQuery {
|
|
1694
|
-
sourceTypeCode: string;
|
|
1695
|
-
sourceValueCode: string;
|
|
1696
|
-
targetTypeCode?: string;
|
|
1697
|
-
relationType?: string;
|
|
1698
|
-
direction?: MetadataRelationDirection;
|
|
1699
|
-
/**
|
|
1700
|
-
* Omitted is ACTIVE. `INACTIVE` and `ALL` are not answered from
|
|
1701
|
-
* `relationship-index.json`.
|
|
1702
|
-
*/
|
|
1703
|
-
status?: MetadataStatusFilter;
|
|
1704
|
-
releaseId?: string;
|
|
1705
|
-
readPolicy?: MetadataReadPolicy;
|
|
1706
|
-
}
|
|
1707
|
-
interface MetadataRelationship {
|
|
1708
|
-
/**
|
|
1709
|
-
* Present when the release has a typed relation catalog.
|
|
1710
|
-
* Omitted for adjacency rows read from `relationship-index.json`.
|
|
1711
|
-
*/
|
|
1712
|
-
relationType?: string;
|
|
1713
|
-
status: string;
|
|
1714
|
-
direction: MetadataRelationDirection;
|
|
1715
|
-
fromMetadataTypeCode: string;
|
|
1716
|
-
fromMetadataValueCode: string;
|
|
1717
|
-
toMetadataTypeCode: string;
|
|
1718
|
-
toMetadataValueCode: string;
|
|
1719
|
-
moduleCode?: string;
|
|
1720
|
-
featureCode?: string;
|
|
1721
|
-
permissionActionCode?: string;
|
|
1722
|
-
}
|
|
1723
|
-
interface MetadataRelationshipResult {
|
|
1724
|
-
releaseId: string | null;
|
|
1725
|
-
/**
|
|
1726
|
-
* False when this release has neither a typed relation catalog nor a
|
|
1727
|
-
* loaded relationship index. An empty index is supported.
|
|
1728
|
-
*/
|
|
1729
|
-
supported: boolean;
|
|
1730
|
-
relationships: MetadataRelationship[];
|
|
1731
|
-
}
|
|
1732
|
-
/**
|
|
1733
|
-
* Maximum relationship queries in one extension HTTP request.
|
|
1734
|
-
* Keep aligned with the extension `RELATIONSHIP_QUERY_BATCH_LIMIT`.
|
|
1735
|
-
*/
|
|
1736
|
-
declare const RELATIONSHIP_QUERY_BATCH_LIMIT = 100;
|
|
1737
|
-
interface MetadataReadSession {
|
|
1738
|
-
releaseId: string;
|
|
1739
|
-
readPolicy: MetadataReadPolicy;
|
|
1740
|
-
}
|
|
1741
|
-
/**
|
|
1742
|
-
* Optional discovery surface. Kept off {@link MetadataProvider} so existing
|
|
1743
|
-
* provider implementations stay valid without new mandatory methods.
|
|
1744
|
-
*/
|
|
1745
|
-
interface MetadataDiscoveryProvider {
|
|
1746
|
-
listValuesByType(typeCode: string, options?: MetadataListOptions): Promise<MetadataListResult>;
|
|
1747
|
-
getRelationships(query: MetadataRelationshipQuery): Promise<MetadataRelationshipResult>;
|
|
1748
|
-
/**
|
|
1749
|
-
* Resolve many relationship queries against one release.
|
|
1750
|
-
* Optional so existing providers stay valid. Callers fall back to
|
|
1751
|
-
* {@link getRelationships} when it is absent or the extension route is unsupported.
|
|
1752
|
-
*/
|
|
1753
|
-
queryRelationships?(queries: readonly MetadataRelationshipQuery[]): Promise<MetadataRelationshipResult[]>;
|
|
1754
|
-
listValuesByTypes(typeCodes: readonly string[], options?: MetadataBatchListOptions): Promise<MetadataBatchListResult>;
|
|
1755
|
-
}
|
|
1756
|
-
declare function supportsMetadataDiscovery(provider: object): provider is MetadataDiscoveryProvider;
|
|
1757
|
-
declare function isFreshProjectionState(state: string | undefined | null): boolean;
|
|
1758
|
-
declare function assertMetadataReadPolicy(policy: MetadataReadPolicy | undefined, state: string, releaseId: string | null): void;
|
|
1759
|
-
declare function assertReleasePin(requestedReleaseId: string | undefined, actualReleaseId: string | null): void;
|
|
1760
|
-
declare function throwPublishedListFailure(failure: {
|
|
1761
|
-
code: string;
|
|
1762
|
-
message: string;
|
|
1763
|
-
}): never;
|
|
1764
|
-
|
|
1765
1819
|
declare const METADATA_PROVIDER_KIND: {
|
|
1766
1820
|
readonly EXTENSION: "extension";
|
|
1767
1821
|
readonly S3: "s3";
|
|
@@ -1840,9 +1894,9 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1840
1894
|
readonly healthService: MetadataHealthService;
|
|
1841
1895
|
private readonly config;
|
|
1842
1896
|
private readonly logger;
|
|
1843
|
-
/** Coalesce concurrent cold bootstrap (current
|
|
1897
|
+
/** Coalesce concurrent cold bootstrap (`current/manifest.json`). */
|
|
1844
1898
|
private initializeInFlight;
|
|
1845
|
-
private permissionRegistryInFlight;
|
|
1899
|
+
private readonly permissionRegistryInFlight;
|
|
1846
1900
|
private permissionRegistryCache;
|
|
1847
1901
|
/**
|
|
1848
1902
|
* In-flight selective downloads keyed by MetadataTypeCode.
|
|
@@ -1850,8 +1904,17 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1850
1904
|
* for the lifetime of the Lambda execution context.
|
|
1851
1905
|
*/
|
|
1852
1906
|
private readonly domainLoadInFlight;
|
|
1853
|
-
/**
|
|
1854
|
-
|
|
1907
|
+
/**
|
|
1908
|
+
* Coalesce concurrent localization catalog loads for the same release+locales.
|
|
1909
|
+
* Key: `${releaseId}:${locale1,locale2}`.
|
|
1910
|
+
*/
|
|
1911
|
+
private readonly localizationLoadInFlight;
|
|
1912
|
+
/**
|
|
1913
|
+
* Coalesce common.json downloads only for the snapshot they started against.
|
|
1914
|
+
* A cache replacement/clear increments generation, so an A promise can never
|
|
1915
|
+
* be reused by a caller observing B (or an empty cache).
|
|
1916
|
+
*/
|
|
1917
|
+
private readonly commonLoadInFlight;
|
|
1855
1918
|
/**
|
|
1856
1919
|
* Types soft-skipped for the current release (no manifest integrity entry).
|
|
1857
1920
|
* Prevents ensureProjectionTypesLoaded from retrying unsupported types forever.
|
|
@@ -1864,14 +1927,14 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1864
1927
|
private readonly providerCoordinator;
|
|
1865
1928
|
constructor(options: RuntimeMetadataServiceOptions);
|
|
1866
1929
|
/**
|
|
1867
|
-
* Load current
|
|
1930
|
+
* Load `current/manifest.json` into cache (no domain projections, no common.json).
|
|
1868
1931
|
* Called on demand when a response needs metadata — not from beforeHandler.
|
|
1869
1932
|
* Concurrent callers share one in-flight initialize.
|
|
1870
1933
|
*/
|
|
1871
1934
|
initialize(revision?: string): Promise<void>;
|
|
1872
1935
|
private initializeInternal;
|
|
1873
1936
|
/**
|
|
1874
|
-
* Handle MetadataProjectionCompleted — reload bootstrap via current.json.
|
|
1937
|
+
* Handle MetadataProjectionCompleted — reload bootstrap via current/manifest.json.
|
|
1875
1938
|
*
|
|
1876
1939
|
* This refreshes the current execution environment only. It cannot fan-out
|
|
1877
1940
|
* to every warm Lambda. Warm environments learn about new releases via the
|
|
@@ -1879,7 +1942,7 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1879
1942
|
* environment is the one that handled the event.
|
|
1880
1943
|
*/
|
|
1881
1944
|
onProjectionCompleted(releaseId?: string): Promise<boolean>;
|
|
1882
|
-
/** Periodic / manual current.json check + conditional snapshot reload. */
|
|
1945
|
+
/** Periodic / manual current/manifest.json check + conditional snapshot reload. */
|
|
1883
1946
|
checkForUpdates(revision?: string): Promise<boolean>;
|
|
1884
1947
|
stop(): void;
|
|
1885
1948
|
/**
|
|
@@ -1899,6 +1962,27 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1899
1962
|
* {@link MetadataResolver} resolves valueCodes from cache only.
|
|
1900
1963
|
*/
|
|
1901
1964
|
ensureProjectionsForResponse(response: unknown): Promise<void>;
|
|
1965
|
+
/**
|
|
1966
|
+
* Ensure localization catalogs needed for HTTP response labelling are in cache.
|
|
1967
|
+
*
|
|
1968
|
+
* - Does **not** download `{typeCode}.json` domain projection files.
|
|
1969
|
+
* - Does **not** load common.json, relationships, typed-relations, or permissions.
|
|
1970
|
+
* - Extension transport: fetches locale maps via the local extension HTTP API and
|
|
1971
|
+
* merges them into {@link MetadataCache} (in-flight coalesced per release+locales).
|
|
1972
|
+
* - S3 transport: bootstrap already installs published localization files; a missing
|
|
1973
|
+
* locale map means that locale file was absent (fall back at lookup time).
|
|
1974
|
+
*
|
|
1975
|
+
* Catalog/extension failures throw {@link MetadataProjectionUnavailableError}.
|
|
1976
|
+
* A missing individual localization key is not a failure — callers leave the field.
|
|
1977
|
+
*/
|
|
1978
|
+
ensureLocalizationForResponse(options?: {
|
|
1979
|
+
locale?: string;
|
|
1980
|
+
}): Promise<void>;
|
|
1981
|
+
/**
|
|
1982
|
+
* Fetch locale dictionaries from the extension and merge into cache.
|
|
1983
|
+
* A missing locale file installs an empty map so warm calls do not re-fetch.
|
|
1984
|
+
*/
|
|
1985
|
+
private loadExtensionLocalizationLocales;
|
|
1902
1986
|
/**
|
|
1903
1987
|
* Ensure domain projection files for the given MetadataTypeCodes are present in cache.
|
|
1904
1988
|
* Filenames are `{MetadataTypeCode}.json` — not discovered from the manifest.
|
|
@@ -1914,6 +1998,13 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1914
1998
|
ensureCommonLoaded(): Promise<CommonProjectionFile>;
|
|
1915
1999
|
getRelationshipIndex(): RelationshipIndex | undefined;
|
|
1916
2000
|
private downloadAndMergeCommon;
|
|
2001
|
+
/**
|
|
2002
|
+
* In-flight common loads are keyed by release and cache generation.
|
|
2003
|
+
* `releaseId` is the serving changeRevision (`current/manifest.json`).
|
|
2004
|
+
* A generation bump drops an older in-flight promise so helper caches
|
|
2005
|
+
* cannot outlive the extension snapshot.
|
|
2006
|
+
*/
|
|
2007
|
+
private commonLoadKey;
|
|
1917
2008
|
private syncUnsupportedProjectionRelease;
|
|
1918
2009
|
private findMissingTypeCodes;
|
|
1919
2010
|
private downloadAndMergeTypes;
|
|
@@ -1924,7 +2015,15 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1924
2015
|
/** Resolve using an explicit {@link MetadataReference}. */
|
|
1925
2016
|
resolve(reference: MetadataReference, version?: number): ProjectionEntry;
|
|
1926
2017
|
supportsType(typeCode: string): boolean;
|
|
1927
|
-
resolveLocalization(typeCode: string, valueCode: string, locale?: string
|
|
2018
|
+
resolveLocalization(typeCode: string, valueCode: string, locale?: string, options?: {
|
|
2019
|
+
catalogOnly?: boolean;
|
|
2020
|
+
}): string | undefined;
|
|
2021
|
+
/**
|
|
2022
|
+
* Localization catalog lookup only (`<typeCode>.<valueCode>`).
|
|
2023
|
+
* Never reads domain projection entries. Missing key → undefined.
|
|
2024
|
+
* Uninitialized / unavailable cache → typed error from the resolver.
|
|
2025
|
+
*/
|
|
2026
|
+
lookupLocalizationCatalog(typeCode: string, valueCode: string, locale?: string): string | undefined;
|
|
1928
2027
|
getLocalizationValue(keyOrTypeCode: string, valueCodeOrLocale?: string, maybeLocale?: string): string | undefined;
|
|
1929
2028
|
getDomainFile(typeCode: string): ProjectionFile | undefined;
|
|
1930
2029
|
getTypeLocalizedDisplayName(typeCode: string, locale?: string): string | undefined;
|
|
@@ -1941,12 +2040,13 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1941
2040
|
batchGet(references: string[], options?: MetadataResolveOptions): Promise<MetadataBatchResult>;
|
|
1942
2041
|
getRelatedValues(sourceTypeCode: string, sourceValueCode: string, targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataValue[]>;
|
|
1943
2042
|
/**
|
|
1944
|
-
* Permission vocabulary for the
|
|
1945
|
-
*
|
|
1946
|
-
*
|
|
2043
|
+
* Permission vocabulary for one release. Pass the session returned by
|
|
2044
|
+
* beginMetadataRead() so every document in that session is release-pinned.
|
|
2045
|
+
* Omitting options preserves the legacy active-release read behavior.
|
|
1947
2046
|
*/
|
|
1948
|
-
getPermissionRegistry(): Promise<PermissionRegistryDocument>;
|
|
2047
|
+
getPermissionRegistry(options?: PermissionRegistryReadOptions): Promise<PermissionRegistryDocument>;
|
|
1949
2048
|
private loadPermissionRegistry;
|
|
2049
|
+
private logPermissionRegistryMismatch;
|
|
1950
2050
|
getRelatedValueGroups(sourceTypeCode: string, sourceValueCodes: readonly string[], targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataRelatedGroup[]>;
|
|
1951
2051
|
listRelations(query: MetadataRelationQuery): Promise<MetadataRelationListResult>;
|
|
1952
2052
|
listTypeValues(typeCode: string, options?: MetadataResolveOptions): Promise<ListedMetadataType | null>;
|
|
@@ -1984,6 +2084,7 @@ declare class RuntimeMetadataService implements ReadModelProvider<ProjectionEntr
|
|
|
1984
2084
|
private initializeFromExtension;
|
|
1985
2085
|
private installExtensionManifest;
|
|
1986
2086
|
private logInstalledManifest;
|
|
2087
|
+
private logCacheTransition;
|
|
1987
2088
|
private hydrateProviderValues;
|
|
1988
2089
|
private currentWriteGuard;
|
|
1989
2090
|
private installBatchReleaseIfCurrent;
|
|
@@ -2018,7 +2119,7 @@ declare function getRuntimeMetadataService(): RuntimeMetadataService;
|
|
|
2018
2119
|
*/
|
|
2019
2120
|
declare function resetRuntimeMetadataBootstrapState(): void;
|
|
2020
2121
|
/**
|
|
2021
|
-
* Ensures runtime metadata release bootstrap is loaded (current.json
|
|
2122
|
+
* Ensures runtime metadata release bootstrap is loaded (`current/manifest.json`).
|
|
2022
2123
|
*
|
|
2023
2124
|
* Prefer demand-driven loading via
|
|
2024
2125
|
* {@link RuntimeMetadataService.ensureProjectionsForResponse} from the response
|
|
@@ -2030,7 +2131,7 @@ declare function resetRuntimeMetadataBootstrapState(): void;
|
|
|
2030
2131
|
*
|
|
2031
2132
|
* Warm start
|
|
2032
2133
|
* - Throttles update checks
|
|
2033
|
-
* - Reloads bootstrap only if current.json
|
|
2134
|
+
* - Reloads bootstrap only if current/manifest.json changed
|
|
2034
2135
|
*
|
|
2035
2136
|
* Retained for health probes, event handlers, and explicit ops warm-up.
|
|
2036
2137
|
*/
|
|
@@ -2095,6 +2196,8 @@ type ExtensionMetadataProviderOptions = {
|
|
|
2095
2196
|
/** Type catalog row from GET /v1/metadata/{typeCode}. */
|
|
2096
2197
|
type ExtensionMetadataTypeInfo = MetadataTypeCatalogInfo;
|
|
2097
2198
|
|
|
2199
|
+
/** Must match metadata-extension's METADATA_EXTENSION_PROTOCOL_VERSION. */
|
|
2200
|
+
declare const REQUIRED_METADATA_EXTENSION_PROTOCOL_VERSION = "2";
|
|
2098
2201
|
/**
|
|
2099
2202
|
* Localhost client for the metadata Lambda Extension.
|
|
2100
2203
|
* Business Lambdas must not construct this directly — use
|
|
@@ -2139,7 +2242,7 @@ declare class ExtensionMetadataProvider implements MetadataProvider, MetadataDis
|
|
|
2139
2242
|
listRelations(query: MetadataRelationQuery): Promise<MetadataRelationListResult>;
|
|
2140
2243
|
getRelatedValues(sourceTypeCode: string, sourceValueCode: string, targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataValue[]>;
|
|
2141
2244
|
getRelatedValueGroups(sourceTypeCode: string, sourceValueCodes: readonly string[], targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataRelatedGroup[]>;
|
|
2142
|
-
getPermissionRegistry(): Promise<PermissionRegistryDocument>;
|
|
2245
|
+
getPermissionRegistry(options?: PermissionRegistryReadOptions): Promise<PermissionRegistryDocument>;
|
|
2143
2246
|
getLocalizationValue(keyOrTypeCode: string, valueCodeOrLocale?: string, maybeLocale?: string): Promise<string | undefined>;
|
|
2144
2247
|
getLocalizationMap(locale: string): Promise<Record<string, string> | undefined>;
|
|
2145
2248
|
requestRefresh(releaseId?: string): Promise<boolean>;
|
|
@@ -2180,10 +2283,14 @@ declare class S3MetadataProvider implements MetadataProvider, MetadataDiscoveryP
|
|
|
2180
2283
|
isAvailable(): Promise<boolean>;
|
|
2181
2284
|
getStatus(): Promise<MetadataProviderStatus>;
|
|
2182
2285
|
getValue(typeCode: string, valueCode: string, options?: MetadataResolveOptions): Promise<MetadataValue | null>;
|
|
2286
|
+
/**
|
|
2287
|
+
* In-process multi-get by metadata reference (not DynamoDB BatchGetCommand).
|
|
2288
|
+
* UnprocessedItems / UnprocessedKeys do not apply.
|
|
2289
|
+
*/
|
|
2183
2290
|
batchGet(references: string[], options?: MetadataResolveOptions): Promise<MetadataBatchResult>;
|
|
2184
2291
|
listRelations(query: MetadataRelationQuery): Promise<MetadataRelationListResult>;
|
|
2185
2292
|
getRelatedValues(sourceTypeCode: string, sourceValueCode: string, targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataValue[]>;
|
|
2186
|
-
getPermissionRegistry(): Promise<PermissionRegistryDocument>;
|
|
2293
|
+
getPermissionRegistry(options?: PermissionRegistryReadOptions): Promise<PermissionRegistryDocument>;
|
|
2187
2294
|
getRelatedValueGroups(sourceTypeCode: string, sourceValueCodes: readonly string[], targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataRelatedGroup[]>;
|
|
2188
2295
|
listTypeValues(typeCode: string, options?: MetadataResolveOptions): Promise<ListedMetadataType | null>;
|
|
2189
2296
|
listValuesByType(typeCode: string, options?: MetadataListOptions): Promise<MetadataListResult>;
|
|
@@ -2260,11 +2367,15 @@ declare class InMemoryMetadataProvider implements MetadataProvider, MetadataDisc
|
|
|
2260
2367
|
requestRefresh(_releaseId?: string): Promise<boolean>;
|
|
2261
2368
|
getStatus(): Promise<MetadataProviderStatus>;
|
|
2262
2369
|
getValue(typeCode: string, valueCode: string, options?: MetadataResolveOptions): Promise<MetadataValue | null>;
|
|
2370
|
+
/**
|
|
2371
|
+
* In-process multi-get by metadata reference (not DynamoDB BatchGetCommand).
|
|
2372
|
+
* UnprocessedItems / UnprocessedKeys do not apply. maxRetries N/A (no retry loop).
|
|
2373
|
+
*/
|
|
2263
2374
|
batchGet(references: string[], options?: MetadataResolveOptions): Promise<MetadataBatchResult>;
|
|
2264
2375
|
listRelations(query: MetadataRelationQuery): Promise<MetadataRelationListResult>;
|
|
2265
2376
|
getRelatedValues(sourceTypeCode: string, sourceValueCode: string, targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataValue[]>;
|
|
2266
2377
|
getLocalizationMap(locale: string): Promise<Record<string, string> | undefined>;
|
|
2267
|
-
getPermissionRegistry(): Promise<PermissionRegistryDocument>;
|
|
2378
|
+
getPermissionRegistry(options?: PermissionRegistryReadOptions): Promise<PermissionRegistryDocument>;
|
|
2268
2379
|
getRelatedValueGroups(sourceTypeCode: string, sourceValueCodes: readonly string[], targetTypeCode: string, options?: MetadataResolveOptions): Promise<MetadataRelatedGroup[]>;
|
|
2269
2380
|
private relatedValuesFor;
|
|
2270
2381
|
listTypeValues(typeCode: string, options?: MetadataResolveOptions): Promise<ListedMetadataType | null>;
|
|
@@ -2341,4 +2452,4 @@ declare class ProviderFailoverCoordinator {
|
|
|
2341
2452
|
}
|
|
2342
2453
|
declare function isExtensionServing(status: MetadataProviderStatus): boolean;
|
|
2343
2454
|
|
|
2344
|
-
export { APPLIES_TO_LINKED_ENTITY_METADATA_TYPE, CACHE_STATUS, type CacheStatus, type CandidateDiagnostic, type CollectMetadataDiagnostics, type CollectResponseMetadataOptions, type CreateRuntimeMetadataFromEnvOptions, DEFAULT_EXCLUDED_CODE_FIELDS, DEFAULT_PROVIDER_RECOVERY_COOLDOWN_MS, ExtensionMetadataProvider, type ExtensionMetadataProviderOptions, type ExtensionMetadataTypeInfo, FIELD_KEY_METADATA_TYPE_ALIASES, InMemoryMetadataProvider, type InMemoryMetadataProviderOptions, type InMemoryMetadataRecord, InvalidMetadataReferenceError, type ListedMetadataType, type LoadedProjectionBundle, METADATA_ATTRIBUTE_FILTER_KEY, METADATA_PROJECTIONS_BUCKET_ENV, METADATA_PROVIDER_KIND, METADATA_READ_POLICY, METADATA_RELATION_DIRECTION, METADATA_TRAVERSAL_MAX_DEPTH, METADATA_TRAVERSAL_MAX_NODES, type ManifestCompareResult, type ManifestLookupIndexEntry, type ManifestMetadataTypeEntry, ManifestValidationError, type MetadataAttributeFilterKey, type MetadataBatchListOptions, type MetadataBatchListResult, type MetadataBatchResult, type MetadataBatchTypeList, MetadataCache, type MetadataCacheSnapshot, type MetadataCacheWriteGuard, MetadataDiscoveryError, type MetadataDiscoveryProvider, MetadataDownloader, type MetadataDownloaderOptions, MetadataExtensionContractError, MetadataFreshnessError, type MetadataHealthReport, MetadataHealthService, type MetadataHealthServiceOptions, type MetadataListOptions, type MetadataListResult, MetadataLoader, type MetadataLoaderOptions, MetadataLookupError, MetadataNotReadyError, MetadataProjectionUnavailableError, type MetadataProvider, type MetadataProviderKind, type MetadataProviderStatus, type MetadataReadPolicy, type MetadataReadSession, type MetadataReference, MetadataRefreshService, type MetadataRefreshServiceOptions, type MetadataRelatedGroup, type MetadataRelationDirection, type MetadataRelationListResult, type MetadataRelationQuery, type MetadataRelationRow, type MetadataRelationship, type MetadataRelationshipQuery, type MetadataRelationshipResult, MetadataReleaseMismatchError, type MetadataResolveOptions, MetadataResolver, type MetadataResolverOptions, type MetadataTypeCatalogInfo, type MetadataValue, NON_METADATA_KEYS, PROVIDER_TRANSPORT_STATE, ProjectionDownloadError, type ProjectionEntry, type ProjectionVersionEntry, ProviderFailoverCoordinator, type ProviderFailoverCoordinatorOptions, type ProviderTransportState, REFRESH_STATUS, RELATIONSHIP_QUERY_BATCH_LIMIT, RUNTIME_METADATA_EVENTS, RUNTIME_METADATA_INTEGRATION_TARGETS, RUNTIME_METADATA_TYPE_CODE_ALIASES, type ReadModelArtifact, type ReadModelBundle, type ReadModelCache, type ReadModelCacheLoader, type ReadModelDownloader, type ReadModelGroupDescriptor, type ReadModelGroupId, type ReadModelManifestGroupView, type ReadModelManifestGroups, type ReadModelProvider, type ReadModelRefreshCoordinator, type ReadModelResolver, type RefreshStatus, type ResolvableMetadataType, type ResolvedProjectionEntry, type RuntimeMetadataConfig, type RuntimeMetadataConfigInput, RuntimeMetadataError, RuntimeMetadataService, type RuntimeMetadataServiceOptions, S3MetadataProvider, type S3MetadataProviderClient, type S3MetadataProviderOptions, type SelectMetadataProviderInput, type SelectedMetadataProvider, UnknownMetadataTypeError, WORKFLOW_STEP_RULE_KEYS, assertMetadataReadPolicy, assertReleasePin, canonicalMetadataProjectionsBucketName, collectResponseReferences, collectResponseTypeCodes, createCodeFieldExclusionSet, createRuntimeMetadataFromEnv, defaultExtensionBaseUrl, ensureRuntimeMetadataLoaded, formatMetadataReference, getCandidateTypeCodesForKey, getRuntimeMetadataHealth, getRuntimeMetadataService, hasPotentialMetadata, isCompactMetadataReference, isExtensionEnabled, isExtensionServing, isFreshProjectionState, isLinkedEntityCodeField, isMetadataProjectionConfigured, isMetadataProjectionsBucketConfigured, isMetadataReference, isMetadataValueObject, isMetadataValueObjectArray, isTemplateRuleConfiguration, isTemplateRuleNode, isTemplateRulesMap, isWorkflowStepRecord, isWorkflowStepRuleField, linkedEntityMetadataTypeFromAppliesTo, localizedLabelFromEntry, manifestLocalizationSchema, metadataGroupFromManifest, metadataValueToReference, normalizeRuntimeMetadataTypeCode, onMetadataProjectionCompleted, parseMetadataReference, projectionEntryToMetadataValue, projectionManifestSchema, readAppliesToTypeValue, readMetadataProjectionsBucket, readModelGroupsFromManifest, relatedValueCodes, resetRuntimeMetadataBootstrapState, resolveMetadataProjectionsBucket, resolveRuntimeMetadataConfig, runtimeMetadataConfigSchema, selectMetadataProvider, supportsMetadataDiscovery, throwPublishedListFailure, tryGetRuntimeMetadataService, tryParseMetadataReference, typeCodeFromCodeFieldName };
|
|
2455
|
+
export { APPLIES_TO_LINKED_ENTITY_METADATA_TYPE, CACHE_STATUS, type CacheStatus, type CandidateDiagnostic, type CollectMetadataDiagnostics, type CollectResponseMetadataOptions, type CreateRuntimeMetadataFromEnvOptions, DEFAULT_EXCLUDED_CODE_FIELDS, DEFAULT_PROVIDER_RECOVERY_COOLDOWN_MS, ExtensionMetadataProvider, type ExtensionMetadataProviderOptions, type ExtensionMetadataTypeInfo, FIELD_KEY_METADATA_TYPE_ALIASES, InMemoryMetadataProvider, type InMemoryMetadataProviderOptions, type InMemoryMetadataRecord, InvalidMetadataReferenceError, type ListedMetadataType, type LoadedProjectionBundle, METADATA_ATTRIBUTE_FILTER_KEY, METADATA_PROJECTIONS_BUCKET_ENV, METADATA_PROVIDER_KIND, METADATA_READ_POLICY, METADATA_RELATION_DIRECTION, METADATA_TRAVERSAL_MAX_DEPTH, METADATA_TRAVERSAL_MAX_NODES, type ManifestCompareResult, type ManifestLookupIndexEntry, type ManifestMetadataTypeEntry, ManifestValidationError, type MetadataAttributeFilterKey, type MetadataBatchListOptions, type MetadataBatchListResult, type MetadataBatchResult, type MetadataBatchTypeList, MetadataCache, type MetadataCacheSnapshot, type MetadataCacheWriteGuard, MetadataDiscoveryError, type MetadataDiscoveryProvider, MetadataDownloader, type MetadataDownloaderOptions, MetadataExtensionContractError, MetadataExtensionProtocolError, MetadataFreshnessError, type MetadataHealthReport, MetadataHealthService, type MetadataHealthServiceOptions, type MetadataListOptions, type MetadataListResult, MetadataLoader, type MetadataLoaderOptions, MetadataLookupError, MetadataNotReadyError, MetadataProjectionUnavailableError, type MetadataProvider, type MetadataProviderKind, type MetadataProviderStatus, type MetadataReadPolicy, type MetadataReadSession, type MetadataReference, MetadataRefreshService, type MetadataRefreshServiceOptions, type MetadataRelatedGroup, type MetadataRelationDirection, type MetadataRelationListResult, type MetadataRelationQuery, type MetadataRelationRow, type MetadataRelationship, type MetadataRelationshipQuery, type MetadataRelationshipResult, MetadataReleaseMismatchError, type MetadataResolveOptions, MetadataResolver, type MetadataResolverOptions, type MetadataTypeCatalogInfo, type MetadataValue, NON_METADATA_KEYS, PROVIDER_TRANSPORT_STATE, type PermissionRegistryReadOptions, ProjectionDownloadError, type ProjectionEntry, type ProjectionVersionEntry, ProviderFailoverCoordinator, type ProviderFailoverCoordinatorOptions, type ProviderTransportState, REFRESH_STATUS, RELATIONSHIP_QUERY_BATCH_LIMIT, REQUIRED_METADATA_EXTENSION_PROTOCOL_VERSION, RUNTIME_METADATA_EVENTS, RUNTIME_METADATA_INTEGRATION_TARGETS, RUNTIME_METADATA_TYPE_CODE_ALIASES, type ReadModelArtifact, type ReadModelBundle, type ReadModelCache, type ReadModelCacheLoader, type ReadModelDownloader, type ReadModelGroupDescriptor, type ReadModelGroupId, type ReadModelManifestGroupView, type ReadModelManifestGroups, type ReadModelProvider, type ReadModelRefreshCoordinator, type ReadModelResolver, type RefreshStatus, type ResolvableMetadataType, type ResolvedProjectionEntry, type RuntimeMetadataConfig, type RuntimeMetadataConfigInput, RuntimeMetadataError, RuntimeMetadataService, type RuntimeMetadataServiceOptions, S3MetadataProvider, type S3MetadataProviderClient, type S3MetadataProviderOptions, type SelectMetadataProviderInput, type SelectedMetadataProvider, UnknownMetadataTypeError, WORKFLOW_STEP_RULE_KEYS, assertMetadataReadPolicy, assertReleasePin, canonicalMetadataProjectionsBucketName, collectResponseReferences, collectResponseTypeCodes, createCodeFieldExclusionSet, createRuntimeMetadataFromEnv, defaultExtensionBaseUrl, ensureRuntimeMetadataLoaded, formatMetadataReference, getCandidateTypeCodesForKey, getRuntimeMetadataHealth, getRuntimeMetadataService, hasPotentialMetadata, isCompactMetadataReference, isExtensionEnabled, isExtensionServing, isFreshProjectionState, isLinkedEntityCodeField, isMetadataProjectionConfigured, isMetadataProjectionsBucketConfigured, isMetadataReference, isMetadataValueObject, isMetadataValueObjectArray, isTemplateRuleConfiguration, isTemplateRuleNode, isTemplateRulesMap, isWorkflowStepRecord, isWorkflowStepRuleField, linkedEntityMetadataTypeFromAppliesTo, localizedLabelFromEntry, manifestLocalizationSchema, metadataGroupFromManifest, metadataValueToReference, normalizeRuntimeMetadataTypeCode, onMetadataProjectionCompleted, parseMetadataReference, projectionEntryToMetadataValue, projectionManifestSchema, readAppliesToTypeValue, readMetadataProjectionsBucket, readModelGroupsFromManifest, relatedValueCodes, resetRuntimeMetadataBootstrapState, resolveMetadataProjectionsBucket, resolveRuntimeMetadataConfig, runtimeMetadataConfigSchema, selectMetadataProvider, supportsMetadataDiscovery, throwPublishedListFailure, tryGetRuntimeMetadataService, tryParseMetadataReference, typeCodeFromCodeFieldName };
|