graphddb 0.3.1 → 0.4.1

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 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, F as FieldOptions, q as DynamoType, r as RelationOptions, A as AggregateOptions, s as AggregateValue, t as SelectBuilderSpec, u as RawCondition, v as TransactionSpec, w as Manifest, x as RetryOverride, y as ExecutionPlan, z as FieldMetadata, H 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, J as CdcEmulatorOptions, L as ChangeHandler, N as Unsubscribe, O as FaultSpec, Q as ConcurrentRecomputeRef, C as ChangeEvent, V as EventLog, X as ReplayOptions, Y as ShardId, Z as ViewDefinition, _ as ProjectionDefinition, $ as RelationMetadata, a0 as TransactionItemSpec, a1 as MaintainEffect, M as ModelStatic, f as DDBModel, a2 as Param, a3 as ParamDescriptor, a4 as DefinitionMap, a5 as OperationDefinition, a6 as WriteDefinitionOptions, a7 as PartialQueryKeyOf, a8 as StrictSelectSpec, a9 as EntityInput, aa as UniqueQueryKeyOf, ab as EntityRef, ac as ConditionInput, ad as QueryModelContract, ae as QueryMethodSpec, af as CommandModelContract, ag as CommandMethodSpec, ah as ContractSpec, ai as QuerySpec, aj as CommandSpec, ak as ContextSpec, al as OperationsDocument, am as AnyOperationDefinition, an as BridgeBundle, ao as ConditionSpec } from './types-DuJ08bgc.js';
2
- export { ap as AggregateMetadata, aq as BatchDeleteRequest, ar as BatchGetOptions, as as BatchGetRequest, at as BatchGetResult, au as BatchPutRequest, av as BatchResult, aw as BatchWriteRequest, ax as CONTRACT_RANGE_FANOUT_CONCURRENCY, ay as CdcMode, az as Change, aA as ChangeBatch, aB as ChangeEventName, aC as ClockMode, aD as CollectionEffect, aE as CollectionOptions, aF as Column, aG as ColumnMap, aH as CommandContractMethodSpec, aI as CommandInputShape, aJ as CommandMethod, aK as CommandPlan, aL as CommandResolutionTarget, aM as CommandResultKind, aN as CommandSelectShape, aO as CompiledFragment, aP as ComposeSpec, aQ as CondSlot, aR as ConditionCheckInput, aS as Connection, aT as ContractCallSignature, aU as ContractCardinality, aV as ContractCommandParams, aW as ContractCommandResult, aX as ContractComposeNode, aY as ContractFromRef, aZ as ContractInputArity, a_ as ContractItem, a$ as ContractKeyFieldRef, b0 as ContractKeyInput, b1 as ContractKeyRef, b2 as ContractKeySpec, b3 as ContractKind, b4 as ContractMethodOp, b5 as ContractParamRef, b6 as ContractQueryParams, b7 as ContractResolution, b8 as CounterAggregate, b9 as CounterEffect, ba as CtxBase, bb as DEFAULT_MAX_ATTEMPTS, bc as DEFAULT_RETRY_POLICY, bd as DeleteOptions, be as DeriveEffect, bf as DerivedEdgeWrite, bg as DerivedUpdate, bh as DescriptorBinding, bi as ENTITY_WRITES_MARKER, bj as EdgeEffect, bk as EffectPath, bl as EmbeddedMetadata, bm as EmitEffect, bn as EntityWritesDefinition, bo as EntityWritesShape, bp as ExecutableCommandContract, bq as ExecutableQueryContract, br as FilterInput, bs as FilterSpec, bt as FragmentInput, bu as GsiDefinitionMarker, bv as GsiOptions, bw as IdempotencyEffect, bx as InProcessWriteDescriptor, by as InputArity, bz as KeyDefinitionMarker, bA as KeySegment, bB as KeySlot, bC as KeyStructure, bD as KeyedResult, bE as LIFECYCLE_CONTRACT_MARKER, bF as LifecycleContract, bG as LifecycleEffects, bH as LiteralParam, bI as MaintainConsistency, bJ as MaintainEvent, bK as MaintainItem, bL as MaintainTrigger, bM as MaintainUpdateMode, bN as MaintenanceGraph, bO as ManifestEntity, bP as ManifestField, bQ as ManifestFieldType, bR as ManifestGsi, bS as ManifestKey, bT as ManifestRelation, bU as ManifestTable, bV as MembershipEffect, bW as MembershipPredicate, bX as MembershipPredicateOp, bY as ModelRef, bZ as MutateMode, b_ as MutateOptions, b$ as MutateParallelResult, c0 as MutateTransactionResult, c1 as MutationBody, c2 as MutationDescriptorMap, c3 as MutationFragment, c4 as MutationInputProxy, c5 as MutationInputRef, c6 as MutationIntent, c7 as NumberParam, c8 as OperationKind, c9 as OperationSpec, ca as ParallelOpResult, cb as ParamKind, cc as ParamSpec, cd as ParamStructure, ce as PersistCtx, cf as PersistOrigin, cg as PlannedCommandMethod, ch as ProjectionDefinitionInput, ci as ProjectionDefinitionMap, cj as ProjectionMap, ck as ProjectionTransform, cl as ProjectionTransformOp, cm as ProjectionVia, 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 TransactionContext, c_ as TransactionItemType, c$ as UniqueEffect, d0 as Updatable, d1 as UpdateOptions, d2 as VersionedDefinition, d3 as VersionedDefinitionInput, d4 as ViewDefinitionInput, d5 as ViewDefinitionMap, d6 as ViewRegistry, d7 as ViewSource, d8 as ViewSourceSlice, d9 as WhenSpec, da as WriteCtx, db as WriteDescriptor, dc as WriteEnvelope, dd as WriteInput, de as WriteKind, df as WriteLifecyclePhase, dg as WriteMiddleware, dh as WriteOperationType, di as WriteRecorder, dj as WriteResultProjection, dk as attachModelClass, dl as buildDeleteInput, dm as buildMaintenanceGraph, dn as buildPutInput, dp as buildUpdateInput, dq as compileFragment, dr as compileMutationPlan, ds as compileSingleFragmentPlan, dt as cond, du as contractOfMethodSpec, dv as definePlan, dw as defineProjection, dx as defineProjections, dy as defineVersioned, dz as defineView, dA as defineViews, dB as entityWrites, dC as executeBatchGet, dD as executeBatchWrite, dE as executeCommandMethod, dF as executeDelete, dG as executeKeyedBatchGet, dH as executePut, dI as executeQueryMethod, dJ as executeRangeFanout, dK as executeTransaction, dL as executeUpdate, dM as from, dN as getEntityWrites, dO as gsi, dP as identity, dQ as isColumn, dR as isCommandModelContract, dS as isCommandPlan, dT as isContractComposeNode, dU as isContractFromRef, dV as isContractKeyFieldRef, dW as isContractKeyRef, dX as isContractParamRef, dY as isEntityWritesDefinition, dZ as isKeySegment, d_ as isLifecycleContract, d$ as isMaintainTrigger, e0 as isMutationFragment, e1 as isMutationInputRef, e2 as isParam, e3 as isPlannedCommandMethod, e4 as isProjectionDefinition, e5 as isQueryModelContract, e6 as isRetryableError, e7 as isRetryableTransactionCancellation, e8 as isViewDefinition, e9 as k, ea as key, eb as lifecyclePhaseForIntent, ec as maintainTrigger, ed as mintContractKeyFieldRef, ee as mintContractParamRef, ef as mutation, eg as param, eh as preview, ei as publicCommandModel, ej as publicQueryModel, ek as query, el as resolveLifecycle, em as whenMember, en as wholeKeysSentinel } from './types-DuJ08bgc.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-BWOrWcbd.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-BWOrWcbd.js';
3
3
  import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
4
4
  import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
5
5
 
@@ -378,6 +378,21 @@ declare function validateGsiAmbiguity(primaryKey: KeyDefinition | null, gsiDefin
378
378
  interface ModelOptions {
379
379
  table: string;
380
380
  prefix?: string;
381
+ /**
382
+ * The model's maintenance kind (issue #152). Defaults to `'entity'` (a plain
383
+ * stored entity). `'materializedView'` / `'sparseView'` mark it a maintained view
384
+ * row whose `@maintainedFrom` declarations feed the maintenance graph. A
385
+ * `sparseView` requires every `@maintainedFrom` to carry a `when` predicate (the
386
+ * adapter validates this).
387
+ */
388
+ kind?: ModelKind;
389
+ /**
390
+ * Optional human-readable description of the entity (issue #154). Pure
391
+ * documentation metadata — recorded into {@link EntityMetadata.description} and
392
+ * propagated to `manifest.json` + the generated Python class docstring. It does
393
+ * NOT affect storage, keys, or any runtime behaviour. Omit for unchanged output.
394
+ */
395
+ description?: string;
381
396
  }
382
397
  declare function model(options: ModelOptions): (target: Function, context: ClassDecoratorContext) => void;
383
398
 
@@ -481,9 +496,294 @@ declare const map: FieldDecorator<Record<string, unknown>>;
481
496
 
482
497
  declare function embedded(modelFactory: () => new (...args: unknown[]) => unknown): (_value: undefined, context: ClassFieldDecoratorContext) => void;
483
498
 
484
- declare function hasMany(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>, options?: RelationOptions): (_value: undefined, context: ClassFieldDecoratorContext) => void;
499
+ /**
500
+ * Symbolic `(self, source) =>` evaluation for the `@maintainedFrom` view authoring
501
+ * and the versioned relation `pattern` union (issue #152).
502
+ *
503
+ * ## Why this module exists (existing-mechanism reuse, not a new invention)
504
+ *
505
+ * `key()` / `gsi()` already evaluate an author callback by handing it a **Proxy
506
+ * accessor** (`createColumnMap`, `src/select/column.ts`): any `c.<field>` access
507
+ * returns a branded {@link import('../select/column.js').Column} sentinel carrying
508
+ * the field NAME, never a real value — so the structure (which field is
509
+ * referenced, where) is captured verbatim and a value transform is structurally
510
+ * impossible. The maintained-authoring `(self, source) =>` callback is the SAME
511
+ * shape of problem (capture *which* source/self field fills *which* output slot,
512
+ * declaratively), so it reuses the SAME Proxy-sentinel mechanism, specialized to
513
+ * the two roots the maintained vocabulary needs:
514
+ *
515
+ * - **`source.<field>`** → a {@link SourceRef} sentinel whose `path` is the
516
+ * payload-rooted `$.entity.<field>` the existing maintenance IR
517
+ * ({@link import('../define/entity-writes.js').ProjectionTransform}) reads. This
518
+ * is the value position (a projected value / key value / order-by / predicate
519
+ * operand). Typed `keyof Source`.
520
+ * - **`self.<field>`** → a {@link SelfRef} sentinel naming a field of the view /
521
+ * relation-target model (the `collection.field` position — which view attribute
522
+ * holds the maintained list). Typed `keyof Self`.
523
+ *
524
+ * The output-attribute *names* (the keys of `keyBind` / `project`) are plain
525
+ * `keyof Self` string literals — NOT computed keys — exactly the "key = name
526
+ * (typed string), value = reference (proxy)" rule the issue fixes.
527
+ *
528
+ * The lowering target is UNCHANGED: a {@link SourceRef} lowers to the same
529
+ * `$.entity.<field>` path the old string-based builder produced, so the maintenance
530
+ * IR (`ViewSourceSlice` / `MaintainEffect`) is byte-identical — only the authoring
531
+ * surface (this symbolic capture) is new.
532
+ */
533
+
534
+ /** Brand identifying a {@link SourceRef} (`source.<field>`) at runtime. */
535
+ declare const SOURCE_REF: unique symbol;
536
+ /** Brand identifying a {@link SelfRef} (`self.<field>`) at runtime. */
537
+ declare const SELF_REF: unique symbol;
538
+ /**
539
+ * A captured reference to a **source** field (`source.<field>`), the value
540
+ * position of the maintained vocabulary. Carries the field name and the
541
+ * payload-rooted `$.entity.<field>` {@link path} the maintenance IR reads. Branded
542
+ * so the adapter can distinguish a faithful reference from a literal and reject a
543
+ * coerced / mis-used reference loudly.
544
+ */
545
+ interface SourceRef {
546
+ readonly [SOURCE_REF]: true;
547
+ /** The source field name (e.g. `authorId`). */
548
+ readonly field: string;
549
+ /** The payload-rooted source value path (`$.entity.<field>`). */
550
+ readonly path: string;
551
+ }
552
+ /**
553
+ * A captured reference to a **self** field (`self.<field>`), naming a field of the
554
+ * model being defined (the view / relation-target). Used in the `collection.field`
555
+ * position (which attribute holds the maintained list). Branded.
556
+ */
557
+ interface SelfRef {
558
+ readonly [SELF_REF]: true;
559
+ /** The self (view / relation-target) field name (e.g. `latestPosts`). */
560
+ readonly field: string;
561
+ }
562
+ /**
563
+ * The typed `source` accessor handed to a `(self, source) =>` callback: one
564
+ * {@link SourceRef} per field of the source entity, each typed with the field's
565
+ * declared value type (so `preview(source.body, n)` type-checks against a string
566
+ * field and a key-value position type-checks against the bound view-key field).
567
+ *
568
+ * @typeParam S - The source entity instance type.
569
+ */
570
+ type SourceProxy<S> = [unknown] extends [S] ? Readonly<Record<string, SourceRef>> : {
571
+ readonly [K in keyof S]-?: SourceRef & {
572
+ readonly __value?: S[K];
573
+ };
574
+ };
575
+ /**
576
+ * The typed `self` accessor handed to a `(self, source) =>` callback: one
577
+ * {@link SelfRef} per field of the model being defined. Used in the value position
578
+ * of `collection.field` (which self attribute holds the maintained collection).
579
+ *
580
+ * @typeParam T - The model (view / relation-target) instance type.
581
+ */
582
+ type SelfProxy<T> = [unknown] extends [T] ? Readonly<Record<string, SelfRef>> : {
583
+ readonly [K in keyof T]-?: SelfRef & {
584
+ readonly __value?: T[K];
585
+ };
586
+ };
587
+ /**
588
+ * A projected value in a maintained `project` map: either a {@link SourceRef}
589
+ * (identity capture of a source field) or an explicit {@link ProjectionTransform}
590
+ * (e.g. `preview(source.body, 120)`). This is the value side of the "key = name,
591
+ * value = reference" rule; the key side is a `keyof Self` string literal.
592
+ */
593
+ type ProjectionValue = SourceRef | ProjectionTransform;
594
+
595
+ /**
596
+ * `@maintainedFrom` — the class-level, decorator-declarative view authoring of
597
+ * issue #152 (the Contract-layer replacement for `defineView` / `ViewRegistry`).
598
+ *
599
+ * ## What it is
600
+ *
601
+ * A maintained **view** (`@model({ kind: 'materializedView' | 'sparseView' })`) is
602
+ * its own modelled row maintained from the lifecycle events of one or more source
603
+ * entities. Each source contributes via a CLASS-LEVEL `@maintainedFrom` decorator
604
+ * (stackable — multiple sources each fill different view fields). This is the
605
+ * `@model`/`@hasMany` collector流儀: each `@maintainedFrom` pushes a
606
+ * {@link MaintainedFromMetadata} into a module-level collector and `@model` drains
607
+ * it into `EntityMetadata.maintainedFrom`.
608
+ *
609
+ * ## Symbolic `(self, source) =>` evaluation (existing-mechanism reuse)
610
+ *
611
+ * The options are authored as a `(self, source) => ({...})` callback evaluated
612
+ * eagerly at decoration time with the SAME Proxy-sentinel mechanism `key()`/`gsi()`
613
+ * use (`src/decorators/maintained-symbolic.ts`):
614
+ *
615
+ * - `source.<field>` → a {@link SourceRef} (value position) lowering to
616
+ * `$.entity.<field>` — the exact path the old string builder produced, so the IR
617
+ * is byte-identical.
618
+ * - `self.<field>` → a {@link SelfRef} naming a view field (the `collection.field`
619
+ * position).
620
+ * - Object KEYS (`keyBind` / `project` left-hand side) stay `keyof Self` string
621
+ * literals (NOT computed keys).
622
+ * - `on: ['created' | 'updated' | 'removed'][]` — the source is the decorator's
623
+ * first argument, so the `'Post.created'` logical-name string is gone (the bug
624
+ * class #124/#130 hit is removed by construction).
625
+ *
626
+ * ## Order independence (issue #152 hardening)
627
+ *
628
+ * Stacking order carries NO meaning. The adapter
629
+ * (`src/relation/maintenance-view-adapter.ts`) rejects — at build time, loudly and
630
+ * symmetrically (same error whichever order the decorators are stacked) — any two
631
+ * `@maintainedFrom` declarations that write the SAME projection target, the SAME
632
+ * `collection.field`, or bind the SAME view-key field inconsistently. A legitimate
633
+ * multi-source view (different sources filling DIFFERENT fields) is fine.
634
+ */
635
+
636
+ type AnyModelClass$1 = new (...args: any[]) => any;
637
+ type SourceFactory = () => AnyModelClass$1;
638
+ /**
639
+ * A map keyed by `keyof Self` (the typed view fields) with value type `V`. When
640
+ * `Self` is left at its `unknown` default (the un-annotated decorator), it widens to
641
+ * a permissive `Record<string, V>` so authoring works without an explicit generic;
642
+ * supply `Self` to get `keyof Self` key-name checking.
643
+ */
644
+ type SelfKeyed<Self, V> = [unknown] extends [Self] ? Readonly<Record<string, V>> : {
645
+ readonly [K in keyof Self]?: V;
646
+ };
647
+ /**
648
+ * The author-facing options object a `@maintainedFrom` callback returns. Keys
649
+ * (`keyBind` / `project` left-hand side) are `keyof Self` string literals; values
650
+ * are symbolic {@link SourceRef} (`source.<field>`) / transforms / {@link SelfRef}
651
+ * (`self.<field>`). `collection` and `when` are mutually exclusive.
652
+ *
653
+ * @typeParam Self - The view model instance type (drives `keyof Self` keys).
654
+ */
655
+ interface MaintainedFromOptions<Self = unknown> {
656
+ /** The lifecycle events of the source that maintain the view row. */
657
+ readonly on: readonly MaintainEvent[];
658
+ /**
659
+ * The view-row key binding: view-row key field (`keyof Self`) → a `source.<field>`
660
+ * reference resolving which view row this source event maintains.
661
+ */
662
+ readonly keyBind: SelfKeyed<Self, SourceRef>;
663
+ /**
664
+ * The projection of the source payload into the view row: target attribute
665
+ * (`keyof Self`) → a `source.<field>` reference or a transform (`preview(...)`).
666
+ */
667
+ readonly project: SelfKeyed<Self, ProjectionValue>;
668
+ /**
669
+ * Declares this source maintains a bounded, ordered COLLECTION slice of the view
670
+ * row. `field` is a `self.<field>` reference (which view attribute holds the
671
+ * list); `orderBy` is a `source.<field>` reference. Mutually exclusive with `when`.
672
+ */
673
+ readonly collection?: {
674
+ readonly field: SelfRef;
675
+ readonly maxItems?: number;
676
+ readonly order?: 'ASC' | 'DESC';
677
+ readonly orderBy?: SourceRef;
678
+ };
679
+ /** Sparse-view membership predicate (sparseView kind). Mutually exclusive with `collection`. */
680
+ readonly when?: MembershipPredicate;
681
+ readonly consistency?: MaintainConsistency;
682
+ readonly updateMode?: MaintainUpdateMode;
683
+ }
684
+ /** The `(self, source) =>` symbolic callback evaluated at decoration time. */
685
+ type MaintainedFromCallback<Self, Source> = (self: SelfProxy<Self>, source: SourceProxy<Source>) => MaintainedFromOptions<Self>;
686
+ /**
687
+ * Build a {@link MembershipPredicate} for a sparse view. The view row is PUT when
688
+ * the predicate holds and DELETED when it flips false. The operand is a symbolic
689
+ * `source.<field>` reference (or a bare path string) lowered to `$.entity.<field>`.
690
+ *
691
+ * Named `whenMember` (not `when`) to avoid colliding with the transaction-condition
692
+ * `when` helper.
693
+ *
694
+ * @example `whenMember(source.status, 'eq', 'active')`
695
+ * @example `whenMember(source.archived, 'falsy')`
696
+ */
697
+ declare function whenMember(operand: SourceRef | string, op: MembershipPredicateOp, value?: unknown): MembershipPredicate;
698
+ /**
699
+ * `@maintainedFrom(source, (self, source) => options)` — the class-level view
700
+ * maintainer decorator (issue #152). Stackable: apply once per source. Evaluates
701
+ * the symbolic callback at decoration time and records the lowered
702
+ * {@link MaintainedFromMetadata} into the collector for `@model` to drain.
703
+ *
704
+ * @typeParam Self - The view model instance type (typed `keyof Self` keys).
705
+ * @typeParam Source - The source entity instance type (typed `source.<field>`).
706
+ *
707
+ * @example
708
+ * ```ts
709
+ * @model({ table: 'AppTable', kind: 'materializedView' })
710
+ * @maintainedFrom(() => PostModel, (self, source) => ({
711
+ * keyBind: { userId: source.authorId, threadId: source.threadId },
712
+ * on: ['created', 'removed'],
713
+ * project: { lastPostAt: source.createdAt, textPreview: preview(source.body, 120) },
714
+ * collection: { field: self.latestPosts, orderBy: source.createdAt, order: 'DESC', maxItems: 20 },
715
+ * }))
716
+ * class UserThreadListModel extends DDBModel { … }
717
+ * ```
718
+ */
719
+ declare function maintainedFrom<Self = unknown, Source = unknown>(source: SourceFactory, callback: MaintainedFromCallback<Self, Source>): (target: Function, context: ClassDecoratorContext) => void;
720
+
721
+ /**
722
+ * Versioned relation `pattern` discriminated union (issue #152, section B).
723
+ *
724
+ * Versioned is "a preset that re-uses the core snapshot effect", so it rides on the
725
+ * `@hasOne` / `@hasMany` `pattern` discriminator instead of a dedicated decorator:
726
+ *
727
+ * - `@hasOne(() => Latest, (self, source) => ({ pattern: 'versionedLatest', on, project }))`
728
+ * — a SINGLE maintained row, OVERWRITTEN per revision (keyed without the version).
729
+ * - `@hasMany(() => History, (self, source) => ({ pattern: 'versionedHistory', on, project }))`
730
+ * — one APPENDED row per revision (keyed WITH the version).
731
+ *
732
+ * ## Three type-level guards (issue #152 B (a)/(b)/(c))
733
+ *
734
+ * (a) Per-pattern fields — the options union is discriminated on `pattern`, so each
735
+ * member admits exactly its own fields.
736
+ * (b) Cardinality integrity — `versionedLatest` is only assignable to a `@hasOne`
737
+ * callback's return and `versionedHistory` only to `@hasMany`'s, enforced by the
738
+ * distinct callback option types {@link HasOneVersionedOptions} /
739
+ * {@link HasManyVersionedOptions} the two decorators accept.
740
+ * (c) Symbolic refs — `source.<field>` is `keyof Source` and `project` keys are
741
+ * `keyof Self`, via the shared {@link SourceProxy} / proxy-sentinel mechanism.
742
+ *
743
+ * Both lower to the SAME snapshot×2 IR the old `defineVersioned` produced (the
744
+ * adapter `src/relation/maintenance-view-adapter.ts` turns the recorded
745
+ * `RelationOptions.versioned` into `defineView`-shaped `ViewDefinition`s). The
746
+ * latest/history KEY binding is derived from the TARGET model's own key input fields
747
+ * (each bound from the same-named source field) — latest keys omit the version,
748
+ * history keys include it, by the two models' own `key` definitions.
749
+ */
750
+
751
+ /** A versioned-latest options object (single overwritten row). */
752
+ interface VersionedLatestOptions<Self = unknown> {
753
+ readonly pattern: 'versionedLatest';
754
+ readonly on: readonly MaintainEvent[];
755
+ readonly project: SelfKeyed<Self, ProjectionValue>;
756
+ readonly consistency?: MaintainConsistency;
757
+ readonly updateMode?: MaintainUpdateMode;
758
+ }
759
+ /** A versioned-history options object (append-only per-revision rows). */
760
+ interface VersionedHistoryOptions<Self = unknown> {
761
+ readonly pattern: 'versionedHistory';
762
+ readonly on: readonly MaintainEvent[];
763
+ readonly project: SelfKeyed<Self, ProjectionValue>;
764
+ readonly consistency?: MaintainConsistency;
765
+ readonly updateMode?: MaintainUpdateMode;
766
+ }
767
+ /**
768
+ * The options a `@hasOne` versioned callback may return — `versionedLatest` ONLY.
769
+ * (Cardinality integrity: a `versionedHistory` on `@hasOne` is a type error.)
770
+ */
771
+ type HasOneVersionedOptions<Self = unknown> = VersionedLatestOptions<Self>;
772
+ /**
773
+ * The options a `@hasMany` versioned callback may return — `versionedHistory` ONLY.
774
+ * (Cardinality integrity: a `versionedLatest` on `@hasMany` is a type error.)
775
+ */
776
+ type HasManyVersionedOptions<Self = unknown> = VersionedHistoryOptions<Self>;
777
+ /** The `(self, source) =>` versioned callback for `@hasOne`. */
778
+ type HasOneVersionedCallback<Self, Source> = (self: SelfProxy<Self>, source: SourceProxy<Source>) => HasOneVersionedOptions<Self>;
779
+ /** The `(self, source) =>` versioned callback for `@hasMany`. */
780
+ type HasManyVersionedCallback<Self, Source> = (self: SelfProxy<Self>, source: SourceProxy<Source>) => HasManyVersionedOptions<Self>;
781
+
782
+ declare function hasMany(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>, options?: RelationOptions): (value: undefined, context: ClassFieldDecoratorContext) => void;
783
+ declare function hasMany<Self = unknown, Source = unknown>(targetFactory: () => new (...args: unknown[]) => unknown, callback: HasManyVersionedCallback<Self, Source>): (value: undefined, context: ClassFieldDecoratorContext) => void;
485
784
  declare function belongsTo(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>, options?: RelationOptions): (_value: undefined, context: ClassFieldDecoratorContext) => void;
486
- declare function hasOne(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>): (_value: undefined, context: ClassFieldDecoratorContext) => void;
785
+ declare function hasOne(targetFactory: () => new (...args: unknown[]) => unknown, keyBinding: Record<string, string>): (value: undefined, context: ClassFieldDecoratorContext) => void;
786
+ declare function hasOne<Self = unknown, Source = unknown>(targetFactory: () => new (...args: unknown[]) => unknown, callback: HasOneVersionedCallback<Self, Source>): (value: undefined, context: ClassFieldDecoratorContext) => void;
487
787
 
488
788
  /**
489
789
  * `@aggregate` — a **scalar-aggregate** field decorator (Epic #118 §5.2 counter /
@@ -1216,105 +1516,6 @@ declare function createMaintenanceDrain(opts?: MaintenanceDrainOptions): Mainten
1216
1516
  */
1217
1517
  declare function createMaintenanceDrainHandler(opts?: MaintenanceDrainOptions): ChangeHandler;
1218
1518
 
1219
- /**
1220
- * External-projection **sink drain** (issue #132) — the asynchronous runtime for
1221
- * `defineProjection` (`externalProjection`, Epic #118 §5.3 / RFC §4.A.8).
1222
- *
1223
- * A `defineProjection` declares a stream + idempotency projection of a source
1224
- * entity into an EXTERNAL sink (BigQuery / S3 / OpenSearch / Neptune in
1225
- * production). The transport is the CDC stream: the source entity's writes surface
1226
- * as {@link ChangeEvent}s (real DynamoDB Streams in production, the
1227
- * {@link import('./emulator.js').CdcEmulator} in dev/test), and THIS consumer
1228
- * projects each event's source image and upserts it into the sink.
1229
- *
1230
- * ## At-least-once → exactly-once-effect via the idempotency key
1231
- *
1232
- * The CDC substrate delivers at-least-once (a single source event may be delivered
1233
- * more than once). An external sink upsert is the ONE place a duplicate would
1234
- * double-write, so the projection folds redelivery by the declared
1235
- * `idempotencyKey` (a source attribute, e.g. `resultId`): the sink is an UPSERT
1236
- * keyed by that value, so re-delivering the same source event overwrites the same
1237
- * sink record rather than appending a second. This is the standard "make
1238
- * at-least-once idempotent with a business key" pattern; the sink need only
1239
- * support an idempotent put keyed by the idempotency key.
1240
- *
1241
- * ## The sink abstraction (dev/test vs production)
1242
- *
1243
- * {@link ProjectionSink} is the minimal contract a real sink adapter implements
1244
- * (`upsert(key, record)` / `delete(key)`). Production wires a BigQuery / S3 /
1245
- * OpenSearch adapter; dev/test uses {@link InMemoryProjectionSink}, an in-process
1246
- * map that the integration tests assert convergence + idempotency against. The
1247
- * drain itself is sink-agnostic — it resolves the projection, computes the key,
1248
- * and calls the adapter.
1249
- */
1250
-
1251
- /**
1252
- * The minimal contract a projection sink adapter implements. An upsert is keyed by
1253
- * the idempotency key (so a redelivery overwrites the same record), a delete
1254
- * removes it (for a source `removed` event projected to the sink).
1255
- */
1256
- interface ProjectionSink {
1257
- /** Upsert the projected record under the idempotency key (idempotent). */
1258
- upsert(key: string, record: Record<string, unknown>): void | Promise<void>;
1259
- /** Remove the record under the idempotency key (for a projected `removed`). */
1260
- delete?(key: string): void | Promise<void>;
1261
- }
1262
- /**
1263
- * An in-process {@link ProjectionSink} for dev/test — a map keyed by the
1264
- * idempotency key. Mirrors what a real sink (BigQuery / S3) does logically: an
1265
- * upsert keyed by a business key folds at-least-once redelivery to one record. The
1266
- * integration tests assert convergence + idempotency against {@link records}.
1267
- */
1268
- declare class InMemoryProjectionSink implements ProjectionSink {
1269
- /** The current sink contents, keyed by the idempotency key. */
1270
- readonly records: Map<string, Record<string, unknown>>;
1271
- /** Total upsert CALLS (including redelivered ones) — distinguishes calls from records. */
1272
- private upserts;
1273
- upsert(key: string, record: Record<string, unknown>): void;
1274
- delete(key: string): void;
1275
- /** The number of distinct sink records (the converged projection size). */
1276
- size(): number;
1277
- /** The total upsert calls (≥ size when redelivery occurred). */
1278
- upsertCount(): number;
1279
- /** Reset the sink (test). */
1280
- reset(): void;
1281
- }
1282
- /** Options for {@link createProjectionSinkDrain}. */
1283
- interface ProjectionSinkDrainOptions {
1284
- /** The {@link ProjectionDefinition}s (`defineProjection`) this drain applies. */
1285
- readonly projections: readonly ProjectionDefinition[];
1286
- /** The external sink adapter the projected records are upserted into. */
1287
- readonly sink: ProjectionSink;
1288
- }
1289
- /**
1290
- * A projection sink drain (issue #132): a CDC consumer ({@link ChangeHandler}) that
1291
- * projects each source event into the external sink, folding at-least-once delivery
1292
- * by the projection's idempotency key. Construct via
1293
- * {@link createProjectionSinkDrain}, then subscribe its {@link handler} to a
1294
- * {@link import('./emulator.js').CdcEmulator} (dev/test) or a real Streams Lambda.
1295
- */
1296
- declare class ProjectionSinkDrain {
1297
- private readonly sink;
1298
- /** Source-entity CLASS name (the `event.model` the capture seam records) → projections. */
1299
- private readonly bySource;
1300
- /** Per-(shard,seq) de-dup within one handler invocation (at-least-once). */
1301
- private applied;
1302
- constructor(opts: ProjectionSinkDrainOptions);
1303
- /** The CDC {@link ChangeHandler} to subscribe to an emulator / Streams source. */
1304
- readonly handler: ChangeHandler;
1305
- /** Project one source event into the sink for every matching projection. */
1306
- private applyOne;
1307
- /** Clear the per-delivery de-dup set (test reset). */
1308
- reset(): void;
1309
- }
1310
- /** Create a {@link ProjectionSinkDrain} (issue #132). */
1311
- declare function createProjectionSinkDrain(opts: ProjectionSinkDrainOptions): ProjectionSinkDrain;
1312
- /**
1313
- * Create just the CDC {@link ChangeHandler} for a projection sink drain — the form
1314
- * to subscribe to an emulator or wire into a production Streams Lambda.
1315
- */
1316
- declare function createProjectionSinkHandler(opts: ProjectionSinkDrainOptions): ChangeHandler;
1317
-
1318
1519
  /**
1319
1520
  * Per-key cursor envelope for batched `range` (`list`) contract methods (issue
1320
1521
  * #62, CQRS single-service runtime; spec `docs/cqrs-contract.md`,
@@ -2068,13 +2269,13 @@ type EntityOf<M> = M extends ModelStatic<infer T, infer _C> ? T : never;
2068
2269
  * the model's unique-key boundary (`UniqueQueryKeyOf`); `select` is the strict
2069
2270
  * projection (#37) typed against the entity.
2070
2271
  */
2071
- declare function defineQuery<M extends ModelStatic<DDBModel, AnyModelClass>, const K extends Parameterize<UniqueQueryKeyOf<ClassOf<M>>>, const S extends SelectableOf<EntityOf<M>>>(model: M, key: K & ExactParam<UniqueQueryKeyOf<ClassOf<M>>, K>, select: S & StrictSelectSpec<EntityOf<M>, S>): OperationDefinition<EntityOf<M>, 'query', K, S, undefined, CollectParams<K>>;
2272
+ declare function defineQuery<M extends ModelStatic<DDBModel, AnyModelClass>, const K extends Parameterize<UniqueQueryKeyOf<ClassOf<M>>>, const S extends SelectableOf<EntityOf<M>>>(model: M, key: K & ExactParam<UniqueQueryKeyOf<ClassOf<M>>, K>, select: S & StrictSelectSpec<EntityOf<M>, S>, options?: ReadDefinitionOptions): OperationDefinition<EntityOf<M>, 'query', K, S, undefined, CollectParams<K>>;
2072
2273
  /**
2073
2274
  * Define a parameterized **partition read** (`list`). The `key` accepts a
2074
2275
  * partial (partition-key) input with {@link Param} placeholders; `select` is
2075
2276
  * the strict projection typed against the entity.
2076
2277
  */
2077
- declare function defineList<M extends ModelStatic<DDBModel, AnyModelClass>, const K extends Parameterize<PartialQueryKeyOf<ClassOf<M>>>, const S extends SelectableOf<EntityOf<M>>>(model: M, key: K & ExactParam<PartialQueryKeyOf<ClassOf<M>>, K>, select: S & StrictSelectSpec<EntityOf<M>, S>): OperationDefinition<EntityOf<M>, 'list', K, S, undefined, CollectParams<K>>;
2278
+ declare function defineList<M extends ModelStatic<DDBModel, AnyModelClass>, const K extends Parameterize<PartialQueryKeyOf<ClassOf<M>>>, const S extends SelectableOf<EntityOf<M>>>(model: M, key: K & ExactParam<PartialQueryKeyOf<ClassOf<M>>, K>, select: S & StrictSelectSpec<EntityOf<M>, S>, options?: ReadDefinitionOptions): OperationDefinition<EntityOf<M>, 'list', K, S, undefined, CollectParams<K>>;
2078
2279
  /**
2079
2280
  * Define a parameterized **put** (`put`). The `item` accepts {@link Param}
2080
2281
  * placeholders at scalar leaves and is otherwise checked against `EntityInput`
@@ -2802,4 +3003,4 @@ declare function assertBundleSerializable(bundle: BridgeBundle): void;
2802
3003
  */
2803
3004
  declare function buildBridgeBundle(queries?: DefinitionMap, commands?: DefinitionMap, registry?: typeof MetadataRegistry, transactions?: Record<string, TransactionDefinition>, contractInputs?: ContractInputs): BridgeBundle;
2804
3005
 
2805
- 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, InMemoryProjectionSink, Item, KeyDefinition, type LintResult, type LintRule, Linter, type ListInput, type ListOptions, MAINT_OUTBOX_PK_PREFIX, MAX_TRANSACT_ITEMS, MaintainEffect, MaintenanceDrain, type MaintenanceDrainOptions, type MaintenanceRebuildOptions, MaintenanceRebuilder, Manifest, MetadataRegistry, Middleware, type ModelOptions, ModelStatic, OLD_VALUE_NAMESPACE, OperationDefinition, OperationsDocument, Param, ParamDescriptor, type Parameterize, PartialQueryKeyOf, type PerKeyCursorEnvelope, type PlanInput, PrimaryKeyOf, ProjectionDefinition, type ProjectionResult, type ProjectionSink, ProjectionSinkDrain, type ProjectionSinkDrainOptions, 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, ShardId, 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, 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, createProjectionSinkDrain, createProjectionSinkHandler, 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, map, max, missingGsiRule, model, noScanRule, number, numberSet, plan, queryBoundaryRule, relationDepthRule, requireLimitRule, resolveKey, resolveRelations, serializeContractKey, serializeFieldValue, string, stringSet, validateDepth, validateGsiAmbiguity, when };
3006
+ 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, validateDepth, validateGsiAmbiguity, when, whenMember };