graphddb 0.5.0 → 0.5.2

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/cli.js CHANGED
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  buildBridgeBundle,
4
- buildManifest,
5
- normalizeSelectSpec
6
- } from "./chunk-J5A665UW.js";
4
+ buildManifest
5
+ } from "./chunk-H5TUW2WR.js";
7
6
  import {
8
- MetadataRegistry
9
- } from "./chunk-FMJIWFIS.js";
7
+ MetadataRegistry,
8
+ normalizeSelectSpec
9
+ } from "./chunk-W3GEJPPV.js";
10
+ import "./chunk-MCKGQKYU.js";
10
11
 
11
12
  // src/cli.ts
12
13
  import { createRequire } from "module";
@@ -568,7 +569,7 @@ function createProgram(handlers2, version) {
568
569
 
569
570
  // src/cli/handlers.ts
570
571
  import { mkdirSync, writeFileSync } from "fs";
571
- import { dirname } from "path";
572
+ import { dirname, relative } from "path";
572
573
  import { pathToFileURL } from "url";
573
574
  import { isAbsolute, resolve } from "path";
574
575
 
@@ -659,6 +660,9 @@ function collectResultTypes(manifest, entity, select, typeName, out, seen) {
659
660
  } else {
660
661
  fields.push([field, `${itemTypeName} | None`]);
661
662
  }
663
+ if (relation.description !== void 0) {
664
+ fieldDescriptions[field] = relation.description;
665
+ }
662
666
  continue;
663
667
  }
664
668
  if (value === true) {
@@ -790,7 +794,15 @@ function methodParams(def) {
790
794
  }
791
795
  return out;
792
796
  }
793
- function collectRepositories(queries, commands) {
797
+ function gsiDescriptionForQuery(name, entity, manifest, querySpecs) {
798
+ if (!manifest || !querySpecs) return void 0;
799
+ const spec = querySpecs[name];
800
+ const indexName = spec?.operations[0]?.indexName;
801
+ if (indexName === void 0) return void 0;
802
+ const gsi = manifest.entities[entity]?.gsis.find((g) => g.indexName === indexName);
803
+ return gsi?.description;
804
+ }
805
+ function collectRepositories(queries, commands, manifest, querySpecs) {
794
806
  const byEntity = /* @__PURE__ */ new Map();
795
807
  const ensure = (entity) => {
796
808
  const cls = `${entityBaseName(entity)}Repository`;
@@ -803,13 +815,14 @@ function collectRepositories(queries, commands) {
803
815
  };
804
816
  for (const name of Object.keys(queries).sort()) {
805
817
  const def = queries[name];
818
+ const description = def.description ?? gsiDescriptionForQuery(name, def.entity.name, manifest, querySpecs);
806
819
  ensure(def.entity.name).push({
807
820
  methodName: toSnakeCase(name),
808
821
  params: methodParams(def),
809
822
  returnType: `${queryResultTypeName(name)} | None`,
810
823
  kind: "query",
811
824
  operationId: name,
812
- ...def.description !== void 0 ? { description: def.description } : {}
825
+ ...description !== void 0 ? { description } : {}
813
826
  });
814
827
  }
815
828
  for (const name of Object.keys(commands).sort()) {
@@ -914,8 +927,8 @@ function renderTransactionsClass(methods) {
914
927
  body.join("\n\n")
915
928
  ].join("\n");
916
929
  }
917
- function generateRepositories(queries, commands, transactions = {}) {
918
- const classes = collectRepositories(queries, commands);
930
+ function generateRepositories(queries, commands, transactions = {}, manifest, querySpecs) {
931
+ const classes = collectRepositories(queries, commands, manifest, querySpecs);
919
932
  const txMethods = collectTransactionMethods(transactions);
920
933
  const resultTypes = /* @__PURE__ */ new Set();
921
934
  for (const name of Object.keys(queries)) {
@@ -1416,6 +1429,40 @@ function emitCloudformation(manifest, options = {}) {
1416
1429
  return (options.format ?? "yaml") === "json" ? templateToJson(template) : templateToYaml(template);
1417
1430
  }
1418
1431
 
1432
+ // src/codegen/cdc-registry.ts
1433
+ var TS_HEADER = PY_HEADER.replace("# ", "// ");
1434
+ function cdcProjectedModelNames(registry = MetadataRegistry) {
1435
+ const names = [];
1436
+ for (const [cls, metadata] of registry.getAll()) {
1437
+ if (metadata.cdcProjected) names.push(cls.name);
1438
+ }
1439
+ return names.sort();
1440
+ }
1441
+ function generateCdcRegistry(options = {}) {
1442
+ const registry = options.registry ?? MetadataRegistry;
1443
+ const modelsModule = options.modelsModule ?? "./models.js";
1444
+ const names = cdcProjectedModelNames(registry);
1445
+ const lines = [TS_HEADER, ""];
1446
+ if (names.length === 0) {
1447
+ lines.push(
1448
+ "// (no @cdcProjected models \u2014 nothing to augment CdcModelRegistry with)",
1449
+ "",
1450
+ "export {};",
1451
+ ""
1452
+ );
1453
+ return lines.join("\n");
1454
+ }
1455
+ for (const name of names) {
1456
+ lines.push(`import type { ${name} } from '${modelsModule}';`);
1457
+ }
1458
+ lines.push("", "declare module 'graphddb' {", " interface CdcModelRegistry {");
1459
+ for (const name of names) {
1460
+ lines.push(` ${name}: ${name};`);
1461
+ }
1462
+ lines.push(" }", "}", "");
1463
+ return lines.join("\n");
1464
+ }
1465
+
1419
1466
  // src/codegen/index.ts
1420
1467
  var OUTPUT_FILES = [
1421
1468
  "manifest.json",
@@ -1437,11 +1484,243 @@ function renderBundle(queries = {}, commands = {}, registry = MetadataRegistry,
1437
1484
  "manifest.json": JSON.stringify(bundle.manifest, null, 2) + "\n",
1438
1485
  "operations.json": JSON.stringify(bundle.operations, null, 2) + "\n",
1439
1486
  "types.py": generateTypes(bundle.manifest, queries, txSpecs, options),
1440
- "repositories.py": generateRepositories(queries, commands, txSpecs),
1487
+ "repositories.py": generateRepositories(
1488
+ queries,
1489
+ commands,
1490
+ txSpecs,
1491
+ bundle.manifest,
1492
+ bundle.operations.queries
1493
+ ),
1441
1494
  "__init__.py": generateInit(queries, commands, txSpecs)
1442
1495
  };
1443
1496
  }
1444
1497
 
1498
+ // src/codegen/jsdoc.ts
1499
+ async function loadTypescript() {
1500
+ try {
1501
+ const mod = await import("./typescript-ZUQEBJRV.js");
1502
+ return mod.default ?? mod;
1503
+ } catch {
1504
+ return void 0;
1505
+ }
1506
+ }
1507
+ var warnedTypescriptMissing = false;
1508
+ var TYPESCRIPT_MISSING_WARNING = "warning: JSDoc description extraction skipped \u2014 'typescript' is not installed. Install typescript to enable it, or use explicit `description` fields.\n";
1509
+ function docCommentFor(ts, node) {
1510
+ const jsDoc = node.jsDoc;
1511
+ if (!jsDoc || jsDoc.length === 0) return void 0;
1512
+ const last = jsDoc[jsDoc.length - 1];
1513
+ const comment = last.comment;
1514
+ if (typeof comment === "string") {
1515
+ const t = comment.trim();
1516
+ return t === "" ? void 0 : t;
1517
+ }
1518
+ if (Array.isArray(comment)) {
1519
+ const joined = ts.getTextOfJSDocComment(comment);
1520
+ if (joined) {
1521
+ const t = joined.trim();
1522
+ return t === "" ? void 0 : t;
1523
+ }
1524
+ }
1525
+ return void 0;
1526
+ }
1527
+ function hasModelDecorator(ts, node) {
1528
+ const decorators = ts.getDecorators?.(node) ?? [];
1529
+ for (const dec of decorators) {
1530
+ const expr = dec.expression;
1531
+ const callee = ts.isCallExpression(expr) ? expr.expression : expr;
1532
+ if (ts.isIdentifier(callee) && callee.text === "model") return true;
1533
+ }
1534
+ return false;
1535
+ }
1536
+ function gsiIndexNameOf(ts, init) {
1537
+ if (!init || !ts.isCallExpression(init)) return void 0;
1538
+ const callee = init.expression;
1539
+ if (!ts.isIdentifier(callee) || callee.text !== "gsi") return void 0;
1540
+ const first = init.arguments[0];
1541
+ if (first && ts.isStringLiteralLike(first)) return first.text;
1542
+ return void 0;
1543
+ }
1544
+ function collectClassDoc(ts, node) {
1545
+ const members = /* @__PURE__ */ new Map();
1546
+ const gsis = /* @__PURE__ */ new Map();
1547
+ for (const member of node.members) {
1548
+ if (ts.isPropertyDeclaration(member) && member.name) {
1549
+ const doc = docCommentFor(ts, member);
1550
+ if (doc === void 0) continue;
1551
+ const gsiName = gsiIndexNameOf(ts, member.initializer);
1552
+ if (gsiName !== void 0) {
1553
+ gsis.set(gsiName, doc);
1554
+ } else if (ts.isIdentifier(member.name) || ts.isStringLiteralLike(member.name)) {
1555
+ members.set(member.name.text, doc);
1556
+ }
1557
+ }
1558
+ }
1559
+ return { own: docCommentFor(ts, node), members, gsis };
1560
+ }
1561
+ function collectDefinitionDocs(ts, obj, into, ambiguous) {
1562
+ for (const prop of obj.properties) {
1563
+ if (!ts.isPropertyAssignment(prop)) continue;
1564
+ if (!ts.isIdentifier(prop.name) && !ts.isStringLiteralLike(prop.name)) continue;
1565
+ const key = prop.name.text;
1566
+ if (into.has(key) || ambiguous.has(key)) {
1567
+ into.delete(key);
1568
+ ambiguous.add(key);
1569
+ continue;
1570
+ }
1571
+ const params = /* @__PURE__ */ new Map();
1572
+ collectParamDocs(ts, prop.initializer, params);
1573
+ into.set(key, { own: docCommentFor(ts, prop), params });
1574
+ }
1575
+ }
1576
+ function collectParamDocs(ts, node, into) {
1577
+ const visit = (n) => {
1578
+ if (ts.isPropertyAssignment(n)) {
1579
+ const isParamCall = ts.isCallExpression(n.initializer) && ts.isPropertyAccessExpression(n.initializer.expression) && ts.isIdentifier(n.initializer.expression.expression) && n.initializer.expression.expression.text === "param";
1580
+ if (isParamCall && (ts.isIdentifier(n.name) || ts.isStringLiteralLike(n.name))) {
1581
+ const doc = docCommentFor(ts, n);
1582
+ if (doc !== void 0) into.set(n.name.text, doc);
1583
+ }
1584
+ }
1585
+ ts.forEachChild(n, visit);
1586
+ };
1587
+ ts.forEachChild(node, visit);
1588
+ }
1589
+ function extract(ts, files) {
1590
+ const program = ts.createProgram(files, {
1591
+ // Parse-only, permissive options: we never emit and never type-check the
1592
+ // world — we only walk the AST of the requested files. `allowJs` lets a `.js`
1593
+ // definition module (pre-compiled input) be parsed too.
1594
+ allowJs: true,
1595
+ noResolve: true,
1596
+ noLib: true,
1597
+ skipLibCheck: true,
1598
+ types: [],
1599
+ // The definition modules use TC39 standard decorators (repo tsconfig has
1600
+ // `experimentalDecorators: false`); parsing is decorator-flavour agnostic for
1601
+ // AST purposes, but keep it aligned.
1602
+ experimentalDecorators: false
1603
+ });
1604
+ const classes = /* @__PURE__ */ new Map();
1605
+ const ambiguousClassNames = /* @__PURE__ */ new Set();
1606
+ const definitions = /* @__PURE__ */ new Map();
1607
+ const ambiguousDefinitionKeys = /* @__PURE__ */ new Set();
1608
+ const fileSet = new Set(files.map((f) => normalize(f)));
1609
+ for (const sf of program.getSourceFiles()) {
1610
+ if (!fileSet.has(normalize(sf.fileName))) continue;
1611
+ const visit = (node) => {
1612
+ if (ts.isClassDeclaration(node) && node.name && hasModelDecorator(ts, node)) {
1613
+ const name = node.name.text;
1614
+ if (classes.has(name) || ambiguousClassNames.has(name)) {
1615
+ classes.delete(name);
1616
+ ambiguousClassNames.add(name);
1617
+ } else {
1618
+ classes.set(name, collectClassDoc(ts, node));
1619
+ }
1620
+ }
1621
+ if (ts.isCallExpression(node)) {
1622
+ const callee = node.expression;
1623
+ if (ts.isIdentifier(callee) && (callee.text === "defineQueries" || callee.text === "defineCommands")) {
1624
+ const arg = node.arguments[0];
1625
+ if (arg && ts.isObjectLiteralExpression(arg)) {
1626
+ collectDefinitionDocs(ts, arg, definitions, ambiguousDefinitionKeys);
1627
+ }
1628
+ }
1629
+ }
1630
+ ts.forEachChild(node, visit);
1631
+ };
1632
+ visit(sf);
1633
+ }
1634
+ return {
1635
+ classes,
1636
+ ambiguousClassNames,
1637
+ definitions,
1638
+ ambiguousDefinitionKeys
1639
+ };
1640
+ }
1641
+ function normalize(p) {
1642
+ return p.replace(/\\/g, "/");
1643
+ }
1644
+ function mergeIntoRegistry(extracted, registry) {
1645
+ const countByName = /* @__PURE__ */ new Map();
1646
+ for (const [cls] of registry.getAll()) {
1647
+ countByName.set(cls.name, (countByName.get(cls.name) ?? 0) + 1);
1648
+ }
1649
+ for (const [cls, meta] of registry.getAll()) {
1650
+ const name = cls.name;
1651
+ if (extracted.ambiguousClassNames.has(name)) continue;
1652
+ if ((countByName.get(name) ?? 0) !== 1) continue;
1653
+ const classDoc = extracted.classes.get(name);
1654
+ if (!classDoc) continue;
1655
+ applyClassDoc(classDoc, meta);
1656
+ }
1657
+ }
1658
+ function applyClassDoc(classDoc, meta) {
1659
+ if (meta.description === void 0 && classDoc.own !== void 0) {
1660
+ meta.description = classDoc.own;
1661
+ }
1662
+ for (const field of meta.fields) {
1663
+ const doc = classDoc.members.get(field.propertyName);
1664
+ if (doc === void 0) continue;
1665
+ if (field.options?.description !== void 0) continue;
1666
+ field.options = { ...field.options ?? {}, description: doc };
1667
+ }
1668
+ for (const rel of meta.relations) {
1669
+ const doc = classDoc.members.get(rel.propertyName);
1670
+ if (doc === void 0) continue;
1671
+ if (rel.options?.description !== void 0) continue;
1672
+ rel.options = { ...rel.options ?? {}, description: doc };
1673
+ }
1674
+ for (const gsi of meta.gsiDefinitions) {
1675
+ const doc = classDoc.gsis.get(gsi.indexName);
1676
+ if (doc === void 0) continue;
1677
+ if (gsi.description !== void 0) continue;
1678
+ gsi.description = doc;
1679
+ }
1680
+ }
1681
+ function mergeIntoDefinitions(extracted, map) {
1682
+ for (const [key, def] of Object.entries(map)) {
1683
+ if (extracted.ambiguousDefinitionKeys.has(key)) continue;
1684
+ const defDoc = extracted.definitions.get(key);
1685
+ if (!defDoc) continue;
1686
+ if (def.description === void 0 && defDoc.own !== void 0) {
1687
+ def.description = defDoc.own;
1688
+ }
1689
+ for (const [paramName, descriptor] of Object.entries(def.params)) {
1690
+ const doc = defDoc.params.get(paramName);
1691
+ if (doc === void 0) continue;
1692
+ if (descriptor.description !== void 0) continue;
1693
+ descriptor.description = doc;
1694
+ }
1695
+ }
1696
+ }
1697
+ async function applyJsDocDescriptions(sources, queries, commands, registry = MetadataRegistry, opts = {}) {
1698
+ const ts = await (opts.loadTs ?? loadTypescript)();
1699
+ if (!ts) {
1700
+ if (!warnedTypescriptMissing) {
1701
+ warnedTypescriptMissing = true;
1702
+ (opts.warn ?? ((m) => void process.stderr.write(m)))(
1703
+ TYPESCRIPT_MISSING_WARNING
1704
+ );
1705
+ }
1706
+ return false;
1707
+ }
1708
+ try {
1709
+ const files = [
1710
+ sources.entry,
1711
+ ...sources.queries ? [sources.queries] : [],
1712
+ ...sources.commands ? [sources.commands] : []
1713
+ ].filter((f, i, a) => a.indexOf(f) === i);
1714
+ const extracted = extract(ts, files);
1715
+ mergeIntoRegistry(extracted, registry);
1716
+ mergeIntoDefinitions(extracted, queries);
1717
+ mergeIntoDefinitions(extracted, commands);
1718
+ return true;
1719
+ } catch {
1720
+ return false;
1721
+ }
1722
+ }
1723
+
1445
1724
  // src/cli/handlers.ts
1446
1725
  function fail(code, message, exitCode) {
1447
1726
  process.stderr.write(JSON.stringify({ code, message }) + "\n");
@@ -1518,6 +1797,16 @@ var handlers = {
1518
1797
  contextsPath ?? contractsPath ?? entry,
1519
1798
  "contexts"
1520
1799
  );
1800
+ const abs = (p) => isAbsolute(p) ? p : resolve(process.cwd(), p);
1801
+ await applyJsDocDescriptions(
1802
+ {
1803
+ entry: abs(entry),
1804
+ queries: abs(queriesPath ?? entry),
1805
+ commands: abs(commandsPath ?? entry)
1806
+ },
1807
+ queries,
1808
+ commands
1809
+ );
1521
1810
  const files = renderBundle(queries, commands, void 0, transactions, {
1522
1811
  dataclass: Boolean(dataclass),
1523
1812
  contracts: { contracts, contexts }
@@ -1528,11 +1817,24 @@ var handlers = {
1528
1817
  for (const name of OUTPUT_FILES) {
1529
1818
  writeFileSync(resolve(outDir, name), files[name], "utf8");
1530
1819
  }
1820
+ const emittedFiles = [...OUTPUT_FILES];
1821
+ if (cdcProjectedModelNames().length > 0) {
1822
+ const entryAbs = isAbsolute(entry) ? entry : resolve(process.cwd(), entry);
1823
+ let modelsModule = relative(outDir, entryAbs).replace(/\\/g, "/").replace(/\.[mc]?ts$/, "");
1824
+ if (!modelsModule.startsWith(".")) modelsModule = `./${modelsModule}`;
1825
+ const cdcRegistryFile = "cdc-registry.ts";
1826
+ writeFileSync(
1827
+ resolve(outDir, cdcRegistryFile),
1828
+ generateCdcRegistry({ modelsModule }),
1829
+ "utf8"
1830
+ );
1831
+ emittedFiles.push(cdcRegistryFile);
1832
+ }
1531
1833
  process.stdout.write(
1532
1834
  JSON.stringify({
1533
1835
  status: "ok",
1534
1836
  outDir: out,
1535
- files: [...OUTPUT_FILES]
1837
+ files: emittedFiles
1536
1838
  }) + "\n"
1537
1839
  );
1538
1840
  } catch (err) {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as SelectableOf, g as PrimaryKeyOf, h as RequestContext, i as Middleware, j as ReadRequestKind, k as CtxModel, l as ReadParams, m as ReadRequestCtx, D as DynamoDBOperation, I as Item, E as Executor, n as RetryPolicy, o as ExecutionPlanSpec, p as EntityMetadata, K as KeyDefinition, G as GsiDefinition, q as ModelKind, F as FieldOptions, r as DynamoType, s as ProjectionTransform, t as MaintainEvent, u as MembershipPredicate, v as MaintainConsistency, w as MaintainUpdateMode, x as MembershipPredicateOp, y as RelationOptions, A as AggregateOptions, z as AggregateValue, H as SelectBuilderSpec, J as RawCondition, L as TransactionSpec, N as Manifest, O as RetryOverride, Q as ExecutionPlan, V as FieldMetadata, X as ResolvedKey, R as ReadExecOptions, a as ExecutorResult, B as BatchGetExecInput, P as PutInput, W as WriteExecOptions, b as WriteResult, U as UpdateInput, c as DeleteInput, d as BatchWriteExecItem, e as BatchExecOptions, T as TransactWriteExecItem, Y as CdcEmulatorOptions, Z as ChangeHandler, _ as Unsubscribe, $ as FaultSpec, a0 as ConcurrentRecomputeRef, C as ChangeEvent, a1 as EventLog, a2 as ReplayOptions, a3 as ShardId, a4 as ViewDefinition, a5 as RelationMetadata, a6 as TransactionItemSpec, a7 as MaintainEffect, M as ModelStatic, f as DDBModel, a8 as Param, a9 as ParamDescriptor, aa as DefinitionMap, ab as OperationDefinition, ac as WriteDefinitionOptions, ad as PartialQueryKeyOf, ae as StrictSelectSpec, af as ReadDefinitionOptions, ag as EntityInput, ah as UniqueQueryKeyOf, ai as EntityRef, aj as ConditionInput, ak as QueryModelContract, al as QueryMethodSpec, am as CommandModelContract, an as CommandMethodSpec, ao as ContractSpec, ap as QuerySpec, aq as CommandSpec, ar as ContextSpec, as as OperationsDocument, at as AnyOperationDefinition, au as BridgeBundle, av as ConditionSpec } from './types-B-F7jw9f.js';
2
- export { aw as AggregateMetadata, ax as BatchDeleteRequest, ay as BatchGetOptions, az as BatchGetRequest, aA as BatchGetResult, aB as BatchPutRequest, aC as BatchResult, aD as BatchWriteRequest, aE as CONTRACT_RANGE_FANOUT_CONCURRENCY, aF as CdcMode, aG as Change, aH as ChangeBatch, aI as ChangeEventName, aJ as ClockMode, aK as CollectionEffect, aL as CollectionOptions, aM as Column, aN as ColumnMap, aO as CommandContractMethodSpec, aP as CommandInputShape, aQ as CommandMethod, aR as CommandPlan, aS as CommandResolutionTarget, aT as CommandResultKind, aU as CommandSelectShape, aV as CompiledFragment, aW as ComposeSpec, aX as CondSlot, aY as ConditionCheckInput, aZ as Connection, a_ as ContractCallSignature, a$ as ContractCardinality, b0 as ContractCommandParams, b1 as ContractCommandResult, b2 as ContractComposeNode, b3 as ContractFromRef, b4 as ContractInputArity, b5 as ContractItem, b6 as ContractKeyFieldRef, b7 as ContractKeyInput, b8 as ContractKeyRef, b9 as ContractKeySpec, ba as ContractKind, bb as ContractMethodOp, bc as ContractParamRef, bd as ContractQueryParams, be as ContractResolution, bf as CounterAggregate, bg as CounterEffect, bh as CtxBase, bi as DEFAULT_MAX_ATTEMPTS, bj as DEFAULT_RETRY_POLICY, bk as DeleteOptions, bl as DeriveEffect, bm as DerivedEdgeWrite, bn as DerivedUpdate, bo as DescriptorBinding, bp as ENTITY_WRITES_MARKER, bq as EdgeEffect, br as EffectPath, bs as EmbeddedMetadata, bt as EmitEffect, bu as EntityWritesDefinition, bv as EntityWritesShape, bw as ExecutableCommandContract, bx as ExecutableQueryContract, by as FilterInput, bz as FilterSpec, bA as FragmentInput, bB as GsiDefinitionMarker, bC as GsiOptions, bD as IdempotencyEffect, bE as InProcessWriteDescriptor, bF as InputArity, bG as KeyDefinitionMarker, bH as KeySegment, bI as KeySlot, bJ as KeyStructure, bK as KeyedResult, bL as LIFECYCLE_CONTRACT_MARKER, bM as LifecycleContract, bN as LifecycleEffects, bO as LiteralParam, bP as MaintainItem, bQ as MaintainTrigger, bR as MaintenanceGraph, bS as ManifestEntity, bT as ManifestField, bU as ManifestFieldType, bV as ManifestGsi, bW as ManifestKey, bX as ManifestRelation, bY as ManifestTable, bZ as MembershipEffect, b_ as ModelRef, b$ as MutateMode, c0 as MutateOptions, c1 as MutateParallelResult, c2 as MutateTransactionResult, c3 as MutationBody, c4 as MutationDescriptorMap, c5 as MutationFragment, c6 as MutationInputProxy, c7 as MutationInputRef, c8 as MutationIntent, c9 as NumberParam, ca as OperationKind, cb as OperationSpec, cc as ParallelOpResult, cd as ParamKind, ce as ParamSpec, cf as ParamStructure, cg as PersistCtx, ch as PersistOrigin, ci as PlannedCommandMethod, cj as ProjectionMap, ck as ProjectionTransformOp, cl as PutOptions, cm as QueryContractMethodSpec, cn as QueryEnvelopeResult, co as QueryKeyOf, cp as QueryMethod, cq as QueryResult, cr as RangeConditionSpec, cs as ReadEnvelope, ct as ReadOpCtx, cu as ReadOpKind, cv as ReadOperationType, cw as ReadRouteDescriptor, cx as ReadRouteOptions, cy as ReadRouteResult, cz as RecordedCompose, cA as RelationBuilder, cB as RelationConsistency, cC as RelationLimitOptions, cD as RelationPattern, cE as RelationProjection, cF as RelationReadOptions, cG as RelationSelect, cH as RelationSpec, cI as RelationUpdateMode, cJ as RelationWriteOptions, cK as RequiresEffect, cL as Resolution, cM as RetryInfo, cN as RetryOperationKind, cO as SPEC_VERSION, cP as SegmentSpec, cQ as SegmentedKey, cR as SelectBuilder, cS as SelectOf, cT as SnapshotEffect, cU as StartingPosition, cV as StreamViewType, cW as StringParam, cX as TransactionContext, cY as TransactionItemType, cZ as UniqueEffect, c_ as Updatable, c$ as UpdateOptions, d0 as ViewSourceSlice, d1 as WhenSpec, d2 as WriteCtx, d3 as WriteDescriptor, d4 as WriteEnvelope, d5 as WriteInput, d6 as WriteKind, d7 as WriteLifecyclePhase, d8 as WriteMiddleware, d9 as WriteOperationType, da as WriteRecorder, db as WriteResultProjection, dc as attachModelClass, dd as buildDeleteInput, de as buildMaintenanceGraph, df as buildPutInput, dg as buildUpdateInput, dh as collectViewDefinitions, di as compileFragment, dj as compileMutationPlan, dk as compileSingleFragmentPlan, dl as cond, dm as contractOfMethodSpec, dn as definePlan, dp as entityWrites, dq as executeBatchGet, dr as executeBatchWrite, ds as executeCommandMethod, dt as executeDelete, du as executeKeyedBatchGet, dv as executePut, dw as executeQueryMethod, dx as executeRangeFanout, dy as executeTransaction, dz as executeUpdate, dA as from, dB as getEntityWrites, dC as gsi, dD as identity, dE as isColumn, dF as isCommandModelContract, dG as isCommandPlan, dH as isContractComposeNode, dI as isContractFromRef, dJ as isContractKeyFieldRef, dK as isContractKeyRef, dL as isContractParamRef, dM as isEntityWritesDefinition, dN as isKeySegment, dO as isLifecycleContract, dP as isMaintainTrigger, dQ as isMutationFragment, dR as isMutationInputRef, dS as isParam, dT as isPlannedCommandMethod, dU as isQueryModelContract, dV as isRetryableError, dW as isRetryableTransactionCancellation, dX as k, dY as key, dZ as lifecyclePhaseForIntent, d_ as maintainTrigger, d$ as mintContractKeyFieldRef, e0 as mintContractParamRef, e1 as mutation, e2 as param, e3 as preview, e4 as publicCommandModel, e5 as publicQueryModel, e6 as query, e7 as resolveLifecycle, e8 as wholeKeysSentinel } from './types-B-F7jw9f.js';
1
+ import { S as SelectableOf, g as PrimaryKeyOf, h as RequestContext, i as Middleware, j as ReadRequestKind, k as CtxModel, l as ReadParams, m as ReadRequestCtx, D as DynamoDBOperation, I as Item, E as Executor, n as RetryPolicy, o as ExecutionPlanSpec, p as EntityMetadata, K as KeyDefinition, G as GsiDefinition, q as ModelKind, F as FieldOptions, r as DynamoType, s as ProjectionTransform, t as MaintainEvent, u as MembershipPredicate, v as MaintainConsistency, w as MaintainUpdateMode, x as MembershipPredicateOp, y as RelationOptions, A as AggregateOptions, z as AggregateValue, H as SelectBuilderSpec, J as RawCondition, L as TransactionSpec, N as Manifest, O as RetryOverride, Q as ExecutionPlan, V as FieldMetadata, X as ResolvedKey, R as ReadExecOptions, a as ExecutorResult, B as BatchGetExecInput, P as PutInput, W as WriteExecOptions, b as WriteResult, U as UpdateInput, c as DeleteInput, d as BatchWriteExecItem, e as BatchExecOptions, T as TransactWriteExecItem, Y as CdcEmulatorOptions, Z as ChangeHandler, _ as Unsubscribe, $ as FaultSpec, a0 as ConcurrentRecomputeRef, C as ChangeEvent, a1 as EventLog, a2 as ReplayOptions, a3 as ShardId, a4 as ViewDefinition, a5 as RelationMetadata, a6 as TransactionItemSpec, a7 as MaintainEffect, M as ModelStatic, f as DDBModel, a8 as Param, a9 as ParamDescriptor, aa as DefinitionMap, ab as OperationDefinition, ac as WriteDefinitionOptions, ad as PartialQueryKeyOf, ae as StrictSelectSpec, af as ReadDefinitionOptions, ag as EntityInput, ah as UniqueQueryKeyOf, ai as EntityRef, aj as ConditionInput, ak as QueryModelContract, al as QueryMethodSpec, am as CommandModelContract, an as CommandMethodSpec, ao as ContractSpec, ap as QuerySpec, aq as CommandSpec, ar as ContextSpec, as as OperationsDocument, at as AnyOperationDefinition, au as BridgeBundle, av as ConditionSpec } from './types-m1Ect6hG.js';
2
+ export { aw as AggregateMetadata, ax as BatchDeleteRequest, ay as BatchGetOptions, az as BatchGetRequest, aA as BatchGetResult, aB as BatchPutRequest, aC as BatchResult, aD as BatchWriteRequest, aE as CONTRACT_RANGE_FANOUT_CONCURRENCY, aF as CdcMode, aG as CdcModelRegistry, aH as CdcSubscribeHandlers, aI as Change, aJ as ChangeBatch, aK as ChangeEventName, aL as ClockMode, aM as CollectionEffect, aN as CollectionOptions, aO as Column, aP as ColumnMap, aQ as CommandContractMethodSpec, aR as CommandInputShape, aS as CommandMethod, aT as CommandPlan, aU as CommandResolutionTarget, aV as CommandResultKind, aW as CommandSelectShape, aX as CompiledFragment, aY as ComposeSpec, aZ as CondSlot, a_ as ConditionCheckInput, a$ as Connection, b0 as ContractCallSignature, b1 as ContractCardinality, b2 as ContractCommandParams, b3 as ContractCommandResult, b4 as ContractComposeNode, b5 as ContractFromRef, b6 as ContractInputArity, b7 as ContractItem, b8 as ContractKeyFieldRef, b9 as ContractKeyInput, ba as ContractKeyRef, bb as ContractKeySpec, bc as ContractKind, bd as ContractMethodOp, be as ContractParamRef, bf as ContractQueryParams, bg as ContractResolution, bh as CounterAggregate, bi as CounterEffect, bj as CtxBase, bk as DEFAULT_MAX_ATTEMPTS, bl as DEFAULT_RETRY_POLICY, bm as DeleteOptions, bn as DeriveEffect, bo as DerivedEdgeWrite, bp as DerivedUpdate, bq as DescriptorBinding, br as ENTITY_WRITES_MARKER, bs as EdgeEffect, bt as EffectPath, bu as EmbeddedMetadata, bv as EmitEffect, bw as EntityWritesDefinition, bx as EntityWritesShape, by as ExecutableCommandContract, bz as ExecutableQueryContract, bA as FilterInput, bB as FilterSpec, bC as FragmentInput, bD as GsiDefinitionMarker, bE as GsiOptions, bF as IdempotencyEffect, bG as InProcessWriteDescriptor, bH as InputArity, bI as KeyDefinitionMarker, bJ as KeySegment, bK as KeySlot, bL as KeyStructure, bM as KeyedResult, bN as LIFECYCLE_CONTRACT_MARKER, bO as LifecycleContract, bP as LifecycleEffects, bQ as LiteralParam, bR as MaintainItem, bS as MaintainTrigger, bT as MaintenanceGraph, bU as ManifestEntity, bV as ManifestField, bW as ManifestFieldType, bX as ManifestGsi, bY as ManifestKey, bZ as ManifestRelation, b_ as ManifestTable, b$ as MembershipEffect, c0 as ModelRef, c1 as MutateMode, c2 as MutateOptions, c3 as MutateParallelResult, c4 as MutateTransactionResult, c5 as MutationBody, c6 as MutationDescriptorMap, c7 as MutationFragment, c8 as MutationInputProxy, c9 as MutationInputRef, ca as MutationIntent, cb as NumberParam, cc as OperationKind, cd as OperationSpec, ce as ParallelOpResult, cf as ParamKind, cg as ParamSpec, ch as ParamStructure, ci as PersistCtx, cj as PersistOrigin, ck as PlannedCommandMethod, cl as ProjectionMap, cm as ProjectionTransformOp, cn as PutOptions, co as QueryContractMethodSpec, cp as QueryEnvelopeResult, cq as QueryKeyOf, cr as QueryMethod, cs as QueryResult, ct as RangeConditionSpec, cu as ReadEnvelope, cv as ReadOpCtx, cw as ReadOpKind, cx as ReadOperationType, cy as ReadRouteDescriptor, cz as ReadRouteOptions, cA as ReadRouteResult, cB as RecordedCompose, cC as RelationBuilder, cD as RelationConsistency, cE as RelationLimitOptions, cF as RelationPattern, cG as RelationProjection, cH as RelationReadOptions, cI as RelationSelect, cJ as RelationSpec, cK as RelationUpdateMode, cL as RelationWriteOptions, cM as RequiresEffect, cN as Resolution, cO as RetryInfo, cP as RetryOperationKind, cQ as SPEC_VERSION, cR as SegmentSpec, cS as SegmentedKey, cT as SelectBuilder, cU as SelectOf, cV as SnapshotEffect, cW as StartingPosition, cX as StreamViewType, cY as StringParam, cZ as SubscribeHandler, c_ as SubscribeHandlers, c$ as TransactionContext, d0 as TransactionItemType, d1 as UniqueEffect, d2 as Updatable, d3 as UpdateOptions, d4 as ViewSourceSlice, d5 as WhenSpec, d6 as WriteCtx, d7 as WriteDescriptor, d8 as WriteEnvelope, d9 as WriteInput, da as WriteKind, db as WriteLifecyclePhase, dc as WriteMiddleware, dd as WriteOperationType, de as WriteRecorder, df as WriteResultProjection, dg as attachModelClass, dh as buildDeleteInput, di as buildMaintenanceGraph, dj as buildPutInput, dk as buildSubscribeHandler, dl as buildUpdateInput, dm as collectViewDefinitions, dn as compileFragment, dp as compileMutationPlan, dq as compileSingleFragmentPlan, dr as cond, ds as contractOfMethodSpec, dt as definePlan, du as entityWrites, dv as executeBatchGet, dw as executeBatchWrite, dx as executeCommandMethod, dy as executeDelete, dz as executeKeyedBatchGet, dA as executePut, dB as executeQueryMethod, dC as executeRangeFanout, dD as executeTransaction, dE as executeUpdate, dF as from, dG as getEntityWrites, dH as gsi, dI as identity, dJ as isColumn, dK as isCommandModelContract, dL as isCommandPlan, dM as isContractComposeNode, dN as isContractFromRef, dO as isContractKeyFieldRef, dP as isContractKeyRef, dQ as isContractParamRef, dR as isEntityWritesDefinition, dS as isKeySegment, dT as isLifecycleContract, dU as isMaintainTrigger, dV as isMutationFragment, dW as isMutationInputRef, dX as isParam, dY as isPlannedCommandMethod, dZ as isQueryModelContract, d_ as isRetryableError, d$ as isRetryableTransactionCancellation, e0 as k, e1 as key, e2 as lifecyclePhaseForIntent, e3 as maintainTrigger, e4 as mintContractKeyFieldRef, e5 as mintContractParamRef, e6 as mutation, e7 as param, e8 as preview, e9 as publicCommandModel, ea as publicQueryModel, eb as query, ec as resolveLifecycle, ed as wholeKeysSentinel } from './types-m1Ect6hG.js';
3
3
  import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
4
4
  import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
5
5
 
@@ -735,6 +735,16 @@ interface MaintainedFromOptions<Self = unknown> {
735
735
  readonly when?: MembershipPredicate;
736
736
  readonly consistency?: MaintainConsistency;
737
737
  readonly updateMode?: MaintainUpdateMode;
738
+ /**
739
+ * Optional human-readable description of this maintained-from source slice (issue
740
+ * #166, follow-up of #154). Pure documentation metadata — it does NOT affect the
741
+ * maintenance IR or any runtime behaviour. Captured onto
742
+ * {@link MaintainedFromMetadata.description}. The maintenance IR is deliberately
743
+ * kept off `manifest.json` / `operations.json` and the generated Python (see the
744
+ * note on {@link MaintainedFromMetadata.description}), so this is a metadata-layer
745
+ * capture only. Omit for byte-identical metadata.
746
+ */
747
+ readonly description?: string;
738
748
  }
739
749
  /** The `(self, source) =>` symbolic callback evaluated at decoration time. */
740
750
  type MaintainedFromCallback<Self, Source> = (self: SelfProxy<Self>, source: SourceProxy<Source>) => MaintainedFromOptions<Self>;
@@ -837,7 +847,7 @@ type HasManyVersionedCallback<Self, Source> = (self: SelfProxy<Self>, source: So
837
847
  declare function hasMany(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>, options?: RelationOptions): (value: undefined, context: ClassFieldDecoratorContext) => void;
838
848
  declare function hasMany<Self = unknown, Source = unknown>(targetFactory: () => new (...args: unknown[]) => unknown, callback: HasManyVersionedCallback<Self, Source>): (value: undefined, context: ClassFieldDecoratorContext) => void;
839
849
  declare function belongsTo(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>, options?: RelationOptions): (_value: undefined, context: ClassFieldDecoratorContext) => void;
840
- declare function hasOne(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>): (value: undefined, context: ClassFieldDecoratorContext) => void;
850
+ declare function hasOne(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>, options?: RelationOptions): (value: undefined, context: ClassFieldDecoratorContext) => void;
841
851
  declare function hasOne<Self = unknown, Source = unknown>(targetFactory: () => new (...args: unknown[]) => unknown, callback: HasOneVersionedCallback<Self, Source>): (value: undefined, context: ClassFieldDecoratorContext) => void;
842
852
 
843
853
  /**
@@ -923,6 +933,51 @@ declare function count(): AggregateValue;
923
933
  */
924
934
  declare function max(field: string): AggregateValue;
925
935
 
936
+ /**
937
+ * `@cdcProjected()` — mark a source model **CDC-parseable** (issue #153).
938
+ *
939
+ * ## What it is
940
+ *
941
+ * External projection means projecting a source model's changes onto an external
942
+ * sink (BigQuery / OpenSearch / …) over CDC (DynamoDB Streams). graphddb owns only
943
+ * the **parse → typed record** contract; the sink write / dedup / delivery live in
944
+ * the consumer's CDC infrastructure, OUTSIDE the boundary (see
945
+ * `docs/cdc-projection.md`). `@cdcProjected()` is the model-level opt-in that
946
+ * enables that contract on a model:
947
+ *
948
+ * - `Model.fromChange(event)` (the pure `(event) => [old, new]` typed mapper) is
949
+ * gated on it — calling it on an un-annotated model throws (and is a compile
950
+ * error via the type surface);
951
+ * - `DDBModel.subscribe(handlers)` routes CDC events only to `@cdcProjected` models;
952
+ * - the codegen reads the flag to emit the `CdcModelRegistry` module augmentation
953
+ * that types `subscribe`'s handlers by model name.
954
+ *
955
+ * ## No runtime side effect
956
+ *
957
+ * The decorator carries NO runtime — it does not subscribe, write, capture, or hook
958
+ * anything. It only flips a capability bit
959
+ * ({@link import('../metadata/types.js').EntityMetadata.cdcProjected}) on the model's
960
+ * metadata. Like `@maintainedFrom`, it is a CLASS-LEVEL decorator that runs BEFORE
961
+ * the topmost `@model` (TC39 bottom-up class-decorator ordering), so it pushes into
962
+ * the module-level collector and `@model` drains it. Stacking it above or below
963
+ * other class decorators carries no meaning.
964
+ *
965
+ * @example
966
+ * ```ts
967
+ * @model({ table: 'Orders', prefix: 'ORDER' })
968
+ * @cdcProjected()
969
+ * class OrderModel extends DDBModel {
970
+ * static readonly keys = key<{ orderId: string }>((c) => ({
971
+ * pk: k`ORDER#${c.orderId}`, sk: k`META`,
972
+ * }));
973
+ * @string orderId!: string;
974
+ * @string status!: string;
975
+ * @datetime updatedAt!: Date;
976
+ * }
977
+ * ```
978
+ */
979
+ declare function cdcProjected(): (_target: Function, _context: ClassDecoratorContext) => void;
980
+
926
981
  declare class TableMapping {
927
982
  private static mapping;
928
983
  static set(mapping: Record<string, string>): void;
@@ -1571,6 +1626,46 @@ declare function createMaintenanceDrain(opts?: MaintenanceDrainOptions): Mainten
1571
1626
  */
1572
1627
  declare function createMaintenanceDrainHandler(opts?: MaintenanceDrainOptions): ChangeHandler;
1573
1628
 
1629
+ /**
1630
+ * `fromChange` — the pure `(event) => [old, new]` typed mapper (issue #153).
1631
+ *
1632
+ * This is graphddb's HALF of the CDC-projection boundary (see
1633
+ * `docs/cdc-projection.md`): it parses a raw {@link ChangeEvent}'s `oldImage` /
1634
+ * `newImage` into typed model instances and does nothing downstream of that (no
1635
+ * sink write, no dedup, no subscription). `Model.fromChange(event)` on `DDBModel`
1636
+ * delegates here.
1637
+ *
1638
+ * The two responsibilities packed into one call are **routing** and **parse**:
1639
+ *
1640
+ * - Routing — an event that is not for `modelClass` yields `[null, null]`. A valid
1641
+ * event for the class always has at least one non-null image, so `[null, null]`
1642
+ * is an unambiguous "not for this model" signal and no separate `owns()` guard is
1643
+ * needed. The match is by `event.model` (the resolved model name the write path /
1644
+ * emulator stamps) when present, falling back to the model's PK prefix
1645
+ * (`keys.pk` begins with `<prefix>`) when the event carries no `model`.
1646
+ * - Parse — each present image is hydrated via the existing {@link hydrate}
1647
+ * (raw item → typed value, INCLUDING ISO 8601 → `Date` for `@datetime` and
1648
+ * embedded reconstruction), returning ALL fields (no projection — narrowing does
1649
+ * not reduce network cost since the image is already on the stream). The hydrated
1650
+ * plain record is then loaded onto a fresh model instance so the result is a
1651
+ * genuine `InstanceType` (like the read path's `{ hydrate }` factory option).
1652
+ *
1653
+ * The image side present per event kind mirrors DynamoDB Streams:
1654
+ *
1655
+ * - INSERT → `[null, new ]`
1656
+ * - MODIFY → `[old, new ]`
1657
+ * - REMOVE → `[old, null]`
1658
+ */
1659
+
1660
+ /**
1661
+ * Parse a {@link ChangeEvent} into the `[oldRecord, newRecord]` tuple for the given
1662
+ * model. Returns `[null, null]` when the event is not for this model (routing). The
1663
+ * caller (`DDBModel.fromChange`) supplies the resolved metadata + class; this
1664
+ * function is the runtime core and is deliberately model-name-string driven so
1665
+ * `DDBModel.subscribe` can reuse it when routing a batch.
1666
+ */
1667
+ declare function parseChange<T extends object>(event: ChangeEvent, metadata: EntityMetadata, modelName: string, modelClass: new () => T): [T | null, T | null];
1668
+
1574
1669
  /**
1575
1670
  * Per-key cursor envelope for batched `range` (`list`) contract methods (issue
1576
1671
  * #62, CQRS single-service runtime; spec `docs/cqrs-contract.md`,
@@ -3065,4 +3160,4 @@ declare function assertBundleSerializable(bundle: BridgeBundle): void;
3065
3160
  */
3066
3161
  declare function buildBridgeBundle(queries?: DefinitionMap, commands?: DefinitionMap, registry?: typeof MetadataRegistry, transactions?: Record<string, TransactionDefinition>, contractInputs?: ContractInputs): BridgeBundle;
3067
3162
 
3068
- export { AggregateOptions, AggregateValue, type AnyModelContract, AnyOperationDefinition, BATCH_GET_MAX_KEYS, BATCH_WRITE_MAX_ITEMS, BatchExecOptions, BatchGetExecInput, BatchWriteExecItem, BridgeBundle, type BuiltContracts, CdcEmulator, CdcEmulatorOptions, ChangeEvent, ChangeHandler, ClientManager, type CollectParams, CommandMethodSpec, CommandModelContract, CommandSpec, ConcurrentRecomputeRef, type ConditionExpressionResult, ConditionInput, ConditionSpec, type ContextOwnership, type ContextOwnershipMap, ContextSpec, type ContractBoundaryViolation, type ContractInputs, type ContractMap, type ContractN1Violation, ContractSpec, CtxModel, DDBModel, DefinitionMap, DeleteInput, type DriftReport, DynamoDBOperation, DynamoExecutor, DynamoType, EDGE_WRITES_MARKER, type EdgeLifecycle, type EdgeWriteDeclaration, type EdgeWriteRecorder, type EdgeWritesDefinition, EntityMetadata, EntityRef, EventLog, ExecutionPlan, Executor, ExecutorResult, type ExplainInput, FaultSpec, FieldMetadata, FieldOptions, type FilterExpressionResult, GsiDefinition, type HasManyVersionedCallback, type HasManyVersionedOptions, type HasOneVersionedCallback, type HasOneVersionedOptions, Item, KeyDefinition, type LintResult, type LintRule, Linter, type ListInput, type ListOptions, MAINT_OUTBOX_PK_PREFIX, MAX_TRANSACT_ITEMS, MaintainConsistency, MaintainEffect, MaintainEvent, MaintainUpdateMode, type MaintainedFromCallback, type MaintainedFromOptions, MaintenanceDrain, type MaintenanceDrainOptions, type MaintenanceRebuildOptions, MaintenanceRebuilder, Manifest, MembershipPredicate, MembershipPredicateOp, MetadataRegistry, Middleware, type ModelOptions, ModelStatic, OLD_VALUE_NAMESPACE, OperationDefinition, OperationsDocument, Param, ParamDescriptor, type Parameterize, PartialQueryKeyOf, type PerKeyCursorEnvelope, type PlanInput, PrimaryKeyOf, type ProjectionResult, ProjectionTransform, type ProjectionValue, PutInput, QueryMethodSpec, QueryModelContract, type QueryOptions$1 as QueryOptions, QuerySpec, RawCondition, ReadExecOptions, ReadParams, ReadRequestCtx, ReadRequestKind, type RebuildResult, RelationMetadata, RelationOptions, type RelationTraversalOptions, ReplayOptions, RequestContext, ResolvedKey, RetryOverride, RetryPolicy, RetryingExecutor, SelectableOf, type SelfProxy, type SelfRef, ShardId, type SourceProxy, type SourceRef, TableMapping, TransactWriteExecItem, type TransactionDefinition, TransactionItemSpec, type TransactionParamShape, type TransactionRef, TransactionSpec, type TxConditionCheckOptions, type TxForEachInstruction, type TxForEachOptions, type TxInstruction, type TxRecorder, type TxWriteInstruction, type TxWriteOptions, UniqueQueryKeyOf, type UpdateExpressionResult, UpdateInput, type VersionedHistoryOptions, type VersionedLatestOptions, ViewDefinition, type WhenComparison, WriteDefinitionOptions, WriteExecOptions, WriteResult, aggregate, assertBundleSerializable, assertContractBoundaries, assertContractN1Safe, assertJsonSerializable, assertSupportedCondition, belongsTo, binary, boolean, buildBridgeBundle, buildConditionExpression, buildContexts, buildContracts, buildManifest, buildOperations, buildProjection, buildQuerySpec, buildTransactionSpec, buildTransactions, buildUpdateExpression, collectContractBoundaryViolations, collectContractN1Violations, compileFilterExpression, count, createCdcEmulator, createDefaultLinter, createMaintenanceDrain, createMaintenanceDrainHandler, createMaintenanceRebuilder, datetime, decodeCursor, decodePerKeyCursor, defineCommands, defineDelete, defineList, definePut, defineQueries, defineQuery, defineTransaction, defineTransactions, defineUpdate, deriveEdgeWriteItems, deriveEdgeWriteItemsFor, deriveModelEdgeWriteItems, derivePrefix, detectRelationFields, edgeWrites, embedded, encodeCursor, encodePerKeyCursor, evaluateFilter, execute, executeDeclarativeTransaction, executeExplain, executeList, executeQuery, expandTransaction, field, getEdgeWrites, getImplicitKeyFields, gsiAmbiguityRule, hasMany, hasOne, hydrate, isEdgeWritesDefinition, isSelectBuilder, isTransactionRef, list, literal, maintainedFrom, map, max, missingGsiRule, model, noScanRule, number, numberSet, plan, queryBoundaryRule, relationDepthRule, requireLimitRule, resolveKey, resolveRelations, serializeContractKey, serializeFieldValue, string, stringSet, ttl, validateDepth, validateGsiAmbiguity, when, whenMember };
3163
+ export { AggregateOptions, AggregateValue, type AnyModelContract, AnyOperationDefinition, BATCH_GET_MAX_KEYS, BATCH_WRITE_MAX_ITEMS, BatchExecOptions, BatchGetExecInput, BatchWriteExecItem, BridgeBundle, type BuiltContracts, CdcEmulator, CdcEmulatorOptions, ChangeEvent, ChangeHandler, ClientManager, type CollectParams, CommandMethodSpec, CommandModelContract, CommandSpec, ConcurrentRecomputeRef, type ConditionExpressionResult, ConditionInput, ConditionSpec, type ContextOwnership, type ContextOwnershipMap, ContextSpec, type ContractBoundaryViolation, type ContractInputs, type ContractMap, type ContractN1Violation, ContractSpec, CtxModel, DDBModel, DefinitionMap, DeleteInput, type DriftReport, DynamoDBOperation, DynamoExecutor, DynamoType, EDGE_WRITES_MARKER, type EdgeLifecycle, type EdgeWriteDeclaration, type EdgeWriteRecorder, type EdgeWritesDefinition, EntityMetadata, EntityRef, EventLog, ExecutionPlan, Executor, ExecutorResult, type ExplainInput, FaultSpec, FieldMetadata, FieldOptions, type FilterExpressionResult, GsiDefinition, type HasManyVersionedCallback, type HasManyVersionedOptions, type HasOneVersionedCallback, type HasOneVersionedOptions, Item, KeyDefinition, type LintResult, type LintRule, Linter, type ListInput, type ListOptions, MAINT_OUTBOX_PK_PREFIX, MAX_TRANSACT_ITEMS, MaintainConsistency, MaintainEffect, MaintainEvent, MaintainUpdateMode, type MaintainedFromCallback, type MaintainedFromOptions, MaintenanceDrain, type MaintenanceDrainOptions, type MaintenanceRebuildOptions, MaintenanceRebuilder, Manifest, MembershipPredicate, MembershipPredicateOp, MetadataRegistry, Middleware, type ModelOptions, ModelStatic, OLD_VALUE_NAMESPACE, OperationDefinition, OperationsDocument, Param, ParamDescriptor, type Parameterize, PartialQueryKeyOf, type PerKeyCursorEnvelope, type PlanInput, PrimaryKeyOf, type ProjectionResult, ProjectionTransform, type ProjectionValue, PutInput, QueryMethodSpec, QueryModelContract, type QueryOptions$1 as QueryOptions, QuerySpec, RawCondition, ReadExecOptions, ReadParams, ReadRequestCtx, ReadRequestKind, type RebuildResult, RelationMetadata, RelationOptions, type RelationTraversalOptions, ReplayOptions, RequestContext, ResolvedKey, RetryOverride, RetryPolicy, RetryingExecutor, SelectableOf, type SelfProxy, type SelfRef, ShardId, type SourceProxy, type SourceRef, TableMapping, TransactWriteExecItem, type TransactionDefinition, TransactionItemSpec, type TransactionParamShape, type TransactionRef, TransactionSpec, type TxConditionCheckOptions, type TxForEachInstruction, type TxForEachOptions, type TxInstruction, type TxRecorder, type TxWriteInstruction, type TxWriteOptions, UniqueQueryKeyOf, type UpdateExpressionResult, UpdateInput, type VersionedHistoryOptions, type VersionedLatestOptions, ViewDefinition, type WhenComparison, WriteDefinitionOptions, WriteExecOptions, WriteResult, aggregate, assertBundleSerializable, assertContractBoundaries, assertContractN1Safe, assertJsonSerializable, assertSupportedCondition, belongsTo, binary, boolean, buildBridgeBundle, buildConditionExpression, buildContexts, buildContracts, buildManifest, buildOperations, buildProjection, buildQuerySpec, buildTransactionSpec, buildTransactions, buildUpdateExpression, cdcProjected, collectContractBoundaryViolations, collectContractN1Violations, compileFilterExpression, count, createCdcEmulator, createDefaultLinter, createMaintenanceDrain, createMaintenanceDrainHandler, createMaintenanceRebuilder, datetime, decodeCursor, decodePerKeyCursor, defineCommands, defineDelete, defineList, definePut, defineQueries, defineQuery, defineTransaction, defineTransactions, defineUpdate, deriveEdgeWriteItems, deriveEdgeWriteItemsFor, deriveModelEdgeWriteItems, derivePrefix, detectRelationFields, edgeWrites, embedded, encodeCursor, encodePerKeyCursor, evaluateFilter, execute, executeDeclarativeTransaction, executeExplain, executeList, executeQuery, expandTransaction, field, getEdgeWrites, getImplicitKeyFields, gsiAmbiguityRule, hasMany, hasOne, hydrate, isEdgeWritesDefinition, isSelectBuilder, isTransactionRef, list, literal, maintainedFrom, map, max, missingGsiRule, model, noScanRule, number, numberSet, parseChange, plan, queryBoundaryRule, relationDepthRule, requireLimitRule, resolveKey, resolveRelations, serializeContractKey, serializeFieldValue, string, stringSet, ttl, validateDepth, validateGsiAmbiguity, when, whenMember };