graphddb 0.7.6 → 0.7.8

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
@@ -3,10 +3,10 @@ import {
3
3
  buildBridgeBundle,
4
4
  buildManifest,
5
5
  buildOperations
6
- } from "./chunk-QOA5MSMD.js";
6
+ } from "./chunk-NZRCBEWS.js";
7
7
  import {
8
8
  MetadataRegistry
9
- } from "./chunk-F2DI3GTI.js";
9
+ } from "./chunk-HFFIB77D.js";
10
10
  import {
11
11
  createDefaultLinter
12
12
  } from "./chunk-PDUVTYC5.js";
@@ -1,4 +1,4 @@
1
- import { C as CdcEmulatorOptions, e as ChangeHandler, U as Unsubscribe, F as FaultSpec, g as ConcurrentRecomputeRef, c as ChangeEvent, E as EventLog, R as ReplayOptions, S as ShardId, V as ViewDefinition, m as EntityMetadata } from './maintenance-view-adapter-B4oU6udW.js';
1
+ import { C as CdcEmulatorOptions, e as ChangeHandler, U as Unsubscribe, F as FaultSpec, g as ConcurrentRecomputeRef, c as ChangeEvent, E as EventLog, R as ReplayOptions, S as ShardId, V as ViewDefinition, m as EntityMetadata } from './maintenance-view-adapter-BCbgKG5d.js';
2
2
 
3
3
  /**
4
4
  * CDC emulator (issue #72). Subscribes to the core write-capture seam
@@ -1,5 +1,5 @@
1
- import { Q as QueryModelContract, x as QueryMethodSpec, y as CommandModelContract, z as CommandMethodSpec, A as ContractSpec, G as QuerySpec, H as CommandSpec, I as TransactionSpec, J as ContextSpec, K as SPEC_VERSION, L as ParamSpec, m as EntityMetadata, N as ParamDescriptor, O as EntityRef, X as ConditionInput, Y as Param, M as ModelStatic, w as DDBModel, Z as DefinitionMap, _ as OperationsDocument, $ as AnyOperationDefinition, a0 as Manifest, a1 as BridgeBundle, a2 as ConditionSpec, a3 as PreparedBody } from './maintenance-view-adapter-B4oU6udW.js';
2
- import { M as MetadataRegistry } from './registry-uYUbg3If.js';
1
+ import { Q as QueryModelContract, x as QueryMethodSpec, y as CommandModelContract, z as CommandMethodSpec, A as ContractSpec, G as QuerySpec, H as CommandSpec, I as TransactionSpec, J as ContextSpec, K as SPEC_VERSION, L as ParamSpec, m as EntityMetadata, N as ParamDescriptor, O as EntityRef, X as ConditionInput, Y as Param, M as ModelStatic, w as DDBModel, Z as DefinitionMap, _ as OperationsDocument, $ as AnyOperationDefinition, a0 as Manifest, a1 as BridgeBundle, a2 as ConditionSpec, a3 as PreparedBody } from './maintenance-view-adapter-BCbgKG5d.js';
2
+ import { M as MetadataRegistry } from './registry-pAnFcc62.js';
3
3
 
4
4
  /**
5
5
  * Contract-layer serialization (issue #59, CQRS Contract layer, Epic #57;
@@ -401,8 +401,13 @@ interface TxWriteInstruction {
401
401
  /**
402
402
  * The write / assertion condition (subset). Optional on `put` / `update` /
403
403
  * `delete`; **required** on a `conditionCheck` (the assertion it makes).
404
+ *
405
+ * A tx condition operand may be a `p.*` field reference ({@link
406
+ * TransactionRef}) — the serializer renders it to a `{ $param }` marker — so
407
+ * the recorded leaf type is widened with `TransactionRef` in the tx context
408
+ * (#246), matching what the recorder captures from {@link TxWriteOptions}.
404
409
  */
405
- readonly condition?: ConditionInput;
410
+ readonly condition?: ConditionInput<TransactionRef>;
406
411
  /** Optional declarative guard (skip this item when it does not hold). */
407
412
  readonly when?: WhenComparison;
408
413
  }
@@ -419,7 +424,7 @@ interface TxForEachInstruction {
419
424
  type TxInstruction = TxWriteInstruction | TxForEachInstruction;
420
425
  /** Options accepted by `tx.put/update/delete`. */
421
426
  interface TxWriteOptions {
422
- readonly condition?: ConditionInput;
427
+ readonly condition?: ConditionInput<TransactionRef>;
423
428
  readonly when?: WhenComparison;
424
429
  }
425
430
  /**
@@ -429,7 +434,7 @@ interface TxWriteOptions {
429
434
  * the check entirely when the guard does not hold.
430
435
  */
431
436
  interface TxConditionCheckOptions {
432
- readonly condition: ConditionInput;
437
+ readonly condition: ConditionInput<TransactionRef>;
433
438
  readonly when?: WhenComparison;
434
439
  }
435
440
  /** Options accepted by `tx.forEach`. */
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- export { a as LintResult, L as LintRule, b as Linter, M as MetadataRegistry } from './registry-uYUbg3If.js';
2
- import { aO as SelectableOf, aP as PrimaryKeyOf, aQ as RequestContext, aR as Middleware, aS as ReadRequestKind, aT as CtxModel, aU as ReadParams, aV as ReadRequestCtx, D as DynamoDBOperation, aW as Item, n as Executor, aX as RetryPolicy, ap as ExecutionPlanSpec, aY as KeyDefinition, aZ as GsiDefinition, a_ as ModelKind, a$ as FieldOptions, b0 as DynamoType, b1 as ProjectionTransform, b2 as MaintainEvent, b3 as MembershipPredicate, b4 as MaintainConsistency, b5 as MaintainUpdateMode, b6 as MembershipPredicateOp, b7 as RelationOptions, b8 as AggregateOptions, b9 as AggregateValue, ba as SelectBuilderSpec, bb as RawCondition, m as EntityMetadata, I as TransactionSpec, a0 as Manifest, bc as RetryOverride, bd as ExecutionPlan, be as FieldMetadata, bf as ResolvedKey, o as ReadExecOptions, p as ExecutorResult, q as BatchGetExecInput, P as PutInput, W as WriteExecOptions, r as WriteResult, s as UpdateInput, t as DeleteInput, u as BatchWriteExecItem, v as BatchExecOptions, T as TransactWriteExecItem, M as ModelStatic, w as DDBModel, bg as Slot, bh as PreparedWriteExecOptions, bi as CommandReturn, bj as ParallelOpResult, a3 as PreparedBody, bk as PreparedStatement, bl as RelationMetadata, aD as TransactionItemSpec, bm as MaintainEffect, V as ViewDefinition, Y as Param, N as ParamDescriptor, Z as DefinitionMap, bn as OperationDefinition, bo as WriteDefinitionOptions, bp as PartialQueryKeyOf, bq as StrictSelectSpec, br as ReadDefinitionOptions, bs as EntityInput, bt as UniqueQueryKeyOf } from './maintenance-view-adapter-B4oU6udW.js';
3
- export { bu as AggregateMetadata, $ as AnyOperationDefinition, bv as BatchDeleteRequest, bw as BatchGetOptions, bx as BatchGetRequest, by as BatchGetResult, bz as BatchPutRequest, B as BatchResult, bA as BatchWriteRequest, a1 as BridgeBundle, bB as CONTRACT_RANGE_FANOUT_CONCURRENCY, C as CdcEmulatorOptions, a as CdcMode, bC as CdcModelRegistry, bD as CdcSubscribeHandlers, bE as Change, b as ChangeBatch, c as ChangeEvent, d as ChangeEventName, e as ChangeHandler, f as ClockMode, bF as CollectionEffect, bG as CollectionOptions, bH as Column, bI as ColumnMap, a4 as CommandContractMethodSpec, bJ as CommandInputShape, bK as CommandMethod, z as CommandMethodSpec, y as CommandModelContract, bL as CommandPlan, a5 as CommandResolutionTarget, bM as CommandResultKind, bN as CommandSelectShape, H as CommandSpec, a6 as CompiledFragment, a8 as ComposeSpec, g as ConcurrentRecomputeRef, bO as CondSlot, bP as ConditionCheckInput, X as ConditionInput, a2 as ConditionSpec, bQ as Connection, J as ContextSpec, bR as ContractCallSignature, aa as ContractCardinality, bS as ContractCommandParams, ab as ContractCommandResult, bT as ContractComposeNode, bU as ContractFromRef, ac as ContractInputArity, bV as ContractItem, bW as ContractKeyFieldRef, bX as ContractKeyInput, bY as ContractKeyRef, ad as ContractKeySpec, ae as ContractKind, bZ as ContractMethodOp, b_ as ContractParamRef, b$ as ContractQueryParams, af as ContractResolution, A as ContractSpec, c0 as CounterAggregate, c1 as CounterEffect, c2 as CtxBase, c3 as DEFAULT_MAX_ATTEMPTS, c4 as DEFAULT_RETRY_POLICY, c5 as DeleteOptions, c6 as DeriveEffect, ah as DerivedEdgeWrite, an as DerivedUpdate, c7 as DescriptorBinding, c8 as ENTITY_WRITES_MARKER, c9 as EdgeEffect, ca as EffectPath, cb as EmbeddedMetadata, cc as EmitEffect, O as EntityRef, cd as EntityWritesDefinition, ce as EntityWritesShape, E as EventLog, cf as ExecutableCommandContract, cg as ExecutableQueryContract, F as FaultSpec, ch as FilterInput, aq as FilterSpec, ci as FragmentInput, cj as GsiDefinitionMarker, ck as GsiOptions, cl as IdempotencyEffect, cm as InProcessWriteDescriptor, cn as InlineSnapshotSpec, co as InputArity, cp as KeyDefinitionMarker, cq as KeySegment, cr as KeySlot, cs as KeyStructure, ct as KeyedResult, cu as LIFECYCLE_CONTRACT_MARKER, cv as LifecycleContract, cw as LifecycleEffects, cx as LiteralParam, cy as MaintainItem, cz as MaintainTrigger, cA as MaintenanceGraph, as as ManifestEntity, at as ManifestField, au as ManifestFieldType, av as ManifestGsi, aw as ManifestKey, ax as ManifestRelation, ay as ManifestTable, cB as MembershipEffect, cC as ModelRef, cD as MutateMode, cE as MutateOptions, cF as MutateParallelResult, cG as MutateTransactionResult, cH as MutationBody, cI as MutationDescriptorMap, cJ as MutationFragment, cK as MutationInputProxy, cL as MutationInputRef, cM as MutationIntent, cN as NumberParam, cO as OperationKind, az as OperationSpec, _ as OperationsDocument, cP as PREPARE_CACHE_MAX, cQ as ParamKind, L as ParamSpec, cR as ParamStructure, cS as PersistCtx, cT as PersistOrigin, cU as PlannedCommandMethod, cV as PreparedInputProxy, cW as PreparedParamRef, cX as PreparedReadExecOptions, cY as PreparedReadRoute, cZ as PreparedReadStatement, c_ as PreparedWriteRoute, c$ as PreparedWriteStatement, d0 as ProjectionMap, d1 as ProjectionTransformOp, d2 as PutOptions, aA as QueryContractMethodSpec, d3 as QueryEnvelopeResult, d4 as QueryKeyOf, d5 as QueryMethod, x as QueryMethodSpec, Q as QueryModelContract, d6 as QueryResult, G as QuerySpec, aB as RangeConditionSpec, d7 as ReadEnvelope, d8 as ReadOpCtx, d9 as ReadOpKind, aC as ReadOperationType, da as ReadRouteDescriptor, db as ReadRouteOptions, dc as ReadRouteResult, dd as RecordedCompose, de as RelationBuilder, df as RelationConsistency, dg as RelationLimitOptions, dh as RelationPattern, di as RelationProjection, dj as RelationReadOptions, dk as RelationSelect, dl as RelationSpec, dm as RelationUpdateMode, dn as RelationWriteOptions, R as ReplayOptions, dp as RequiresEffect, dq as Resolution, dr as RetryInfo, ds as RetryOperationKind, K as SPEC_VERSION, dt as SegmentSpec, du as SegmentedKey, dv as SelectBuilder, dw as SelectOf, S as ShardId, dx as SnapshotEffect, h as StartingPosition, i as StreamViewType, dy as StringParam, j as SubscribeHandler, k as SubscribeHandlers, dz as TransactionContext, aE as TransactionItemType, dA as UniqueEffect, dB as Updatable, dC as UpdateOptions, dD as ViewSourceSlice, aF as WhenSpec, dE as WriteCtx, dF as WriteDescriptor, dG as WriteEnvelope, dH as WriteInput, dI as WriteKind, dJ as WriteLifecyclePhase, dK as WriteMiddleware, aG as WriteOperationType, dL as WriteRecorder, dM as WriteResultProjection, dN as attachModelClass, dO as buildDeleteInput, dP as buildMaintenanceGraph, dQ as buildPutInput, l as buildSubscribeHandler, dR as buildUpdateInput, dS as collectViewDefinitions, aI as compileFragment, aJ as compileMutationPlan, aK as compileSingleFragmentPlan, dT as cond, dU as contractOfMethodSpec, dV as definePlan, dW as entityWrites, dX as executeBatchGet, dY as executeBatchWrite, dZ as executeCommandMethod, d_ as executeDelete, d$ as executeKeyedBatchGet, e0 as executePut, e1 as executeQueryMethod, e2 as executeRangeFanout, e3 as executeTransaction, e4 as executeUpdate, e5 as from, e6 as getEntityWrites, e7 as gsi, e8 as identity, e9 as isColumn, ea as isCommandModelContract, eb as isCommandPlan, ec as isContractComposeNode, ed as isContractFromRef, ee as isContractKeyFieldRef, ef as isContractKeyRef, eg as isContractParamRef, eh as isEntityWritesDefinition, ei as isKeySegment, ej as isLifecycleContract, ek as isMaintainTrigger, el as isMutationFragment, em as isMutationInputRef, en as isParam, eo as isPlannedCommandMethod, ep as isPreparedParamRef, eq as isQueryModelContract, er as isRetryableError, es as isRetryableTransactionCancellation, et as k, eu as key, ev as lifecyclePhaseForIntent, ew as maintainTrigger, ex as mintContractKeyFieldRef, ey as mintContractParamRef, ez as mutation, eA as param, eB as prepare, eC as preview, eD as publicCommandModel, eE as publicQueryModel, eF as query, aM as resolveLifecycle, eG as wholeKeysSentinel } from './maintenance-view-adapter-B4oU6udW.js';
1
+ export { a as LintResult, L as LintRule, b as Linter, M as MetadataRegistry } from './registry-pAnFcc62.js';
2
+ import { aO as SelectableOf, aP as PrimaryKeyOf, aQ as RequestContext, aR as Middleware, aS as ReadRequestKind, aT as CtxModel, aU as ReadParams, aV as ReadRequestCtx, D as DynamoDBOperation, aW as Item, n as Executor, aX as RetryPolicy, ap as ExecutionPlanSpec, aY as KeyDefinition, aZ as GsiDefinition, a_ as ModelKind, a$ as FieldOptions, b0 as DynamoType, b1 as ProjectionTransform, b2 as MaintainEvent, b3 as MembershipPredicate, b4 as MaintainConsistency, b5 as MaintainUpdateMode, b6 as MembershipPredicateOp, b7 as RelationOptions, b8 as AggregateOptions, b9 as AggregateValue, ba as SelectBuilderSpec, bb as RawCondition, m as EntityMetadata, I as TransactionSpec, a0 as Manifest, bc as RetryOverride, bd as ExecutionPlan, be as FieldMetadata, bf as ResolvedKey, o as ReadExecOptions, p as ExecutorResult, q as BatchGetExecInput, P as PutInput, W as WriteExecOptions, r as WriteResult, s as UpdateInput, t as DeleteInput, u as BatchWriteExecItem, v as BatchExecOptions, T as TransactWriteExecItem, M as ModelStatic, w as DDBModel, bg as Slot, bh as PreparedWriteExecOptions, bi as CommandReturn, bj as ParallelOpResult, a3 as PreparedBody, bk as PreparedStatement, bl as RelationMetadata, aD as TransactionItemSpec, bm as MaintainEffect, V as ViewDefinition, Y as Param, N as ParamDescriptor, Z as DefinitionMap, bn as OperationDefinition, bo as WriteDefinitionOptions, bp as PartialQueryKeyOf, bq as StrictSelectSpec, br as ReadDefinitionOptions, bs as EntityInput, bt as UniqueQueryKeyOf } from './maintenance-view-adapter-BCbgKG5d.js';
3
+ export { bu as AggregateMetadata, $ as AnyOperationDefinition, bv as BatchDeleteRequest, bw as BatchGetOptions, bx as BatchGetRequest, by as BatchGetResult, bz as BatchPutRequest, B as BatchResult, bA as BatchWriteRequest, a1 as BridgeBundle, bB as CONTRACT_RANGE_FANOUT_CONCURRENCY, C as CdcEmulatorOptions, a as CdcMode, bC as CdcModelRegistry, bD as CdcSubscribeHandlers, bE as Change, b as ChangeBatch, c as ChangeEvent, d as ChangeEventName, e as ChangeHandler, f as ClockMode, bF as CollectionEffect, bG as CollectionOptions, bH as Column, bI as ColumnMap, a4 as CommandContractMethodSpec, bJ as CommandInputShape, bK as CommandMethod, z as CommandMethodSpec, y as CommandModelContract, bL as CommandPlan, a5 as CommandResolutionTarget, bM as CommandResultKind, bN as CommandSelectShape, H as CommandSpec, a6 as CompiledFragment, a8 as ComposeSpec, g as ConcurrentRecomputeRef, bO as CondSlot, bP as ConditionCheckInput, X as ConditionInput, a2 as ConditionSpec, bQ as Connection, J as ContextSpec, bR as ContractCallSignature, aa as ContractCardinality, bS as ContractCommandParams, ab as ContractCommandResult, bT as ContractComposeNode, bU as ContractFromRef, ac as ContractInputArity, bV as ContractItem, bW as ContractKeyFieldRef, bX as ContractKeyInput, bY as ContractKeyRef, ad as ContractKeySpec, ae as ContractKind, bZ as ContractMethodOp, b_ as ContractParamRef, b$ as ContractQueryParams, af as ContractResolution, A as ContractSpec, c0 as CounterAggregate, c1 as CounterEffect, c2 as CtxBase, c3 as DEFAULT_MAX_ATTEMPTS, c4 as DEFAULT_RETRY_POLICY, c5 as DeleteOptions, c6 as DeriveEffect, ah as DerivedEdgeWrite, an as DerivedUpdate, c7 as DescriptorBinding, c8 as ENTITY_WRITES_MARKER, c9 as EdgeEffect, ca as EffectPath, cb as EmbeddedMetadata, cc as EmitEffect, O as EntityRef, cd as EntityWritesDefinition, ce as EntityWritesShape, E as EventLog, cf as ExecutableCommandContract, cg as ExecutableQueryContract, F as FaultSpec, ch as FilterInput, aq as FilterSpec, ci as FragmentCondition, cj as FragmentConditionOperatorObject, ck as FragmentInput, cl as GsiDefinitionMarker, cm as GsiOptions, cn as IdempotencyEffect, co as InProcessWriteDescriptor, cp as InlineSnapshotSpec, cq as InputArity, cr as KeyDefinitionMarker, cs as KeySegment, ct as KeySlot, cu as KeyStructure, cv as KeyedResult, cw as LIFECYCLE_CONTRACT_MARKER, cx as LifecycleContract, cy as LifecycleEffects, cz as LiteralParam, cA as MaintainItem, cB as MaintainTrigger, cC as MaintenanceGraph, as as ManifestEntity, at as ManifestField, au as ManifestFieldType, av as ManifestGsi, aw as ManifestKey, ax as ManifestRelation, ay as ManifestTable, cD as MembershipEffect, cE as ModelRef, cF as MutateMode, cG as MutateOptions, cH as MutateParallelResult, cI as MutateTransactionResult, cJ as MutationBody, cK as MutationDescriptorMap, cL as MutationFragment, cM as MutationInputProxy, cN as MutationInputRef, cO as MutationIntent, cP as NumberParam, cQ as OperationKind, az as OperationSpec, _ as OperationsDocument, cR as PREPARE_CACHE_MAX, cS as ParamKind, L as ParamSpec, cT as ParamStructure, cU as PersistCtx, cV as PersistOrigin, cW as PlannedCommandMethod, cX as PreparedInputProxy, cY as PreparedParamRef, cZ as PreparedReadExecOptions, c_ as PreparedReadRoute, c$ as PreparedReadStatement, d0 as PreparedWriteRoute, d1 as PreparedWriteStatement, d2 as ProjectionMap, d3 as ProjectionTransformOp, d4 as PutOptions, aA as QueryContractMethodSpec, d5 as QueryEnvelopeResult, d6 as QueryKeyOf, d7 as QueryMethod, x as QueryMethodSpec, Q as QueryModelContract, d8 as QueryResult, G as QuerySpec, aB as RangeConditionSpec, d9 as ReadEnvelope, da as ReadOpCtx, db as ReadOpKind, aC as ReadOperationType, dc as ReadRouteDescriptor, dd as ReadRouteOptions, de as ReadRouteResult, df as RecordedCompose, dg as RelationBuilder, dh as RelationConsistency, di as RelationLimitOptions, dj as RelationPattern, dk as RelationProjection, dl as RelationReadOptions, dm as RelationSelect, dn as RelationSpec, dp as RelationUpdateMode, dq as RelationWriteOptions, R as ReplayOptions, dr as RequiresEffect, ds as Resolution, dt as RetryInfo, du as RetryOperationKind, K as SPEC_VERSION, dv as SegmentSpec, dw as SegmentedKey, dx as SelectBuilder, dy as SelectOf, S as ShardId, dz as SnapshotEffect, h as StartingPosition, i as StreamViewType, dA as StringParam, j as SubscribeHandler, k as SubscribeHandlers, dB as TransactionContext, aE as TransactionItemType, dC as UniqueEffect, dD as Updatable, dE as UpdateOptions, dF as ViewSourceSlice, aF as WhenSpec, dG as WriteCtx, dH as WriteDescriptor, dI as WriteEnvelope, dJ as WriteInput, dK as WriteKind, dL as WriteLifecyclePhase, dM as WriteMiddleware, aG as WriteOperationType, dN as WriteRecorder, dO as WriteResultProjection, dP as attachModelClass, dQ as buildDeleteInput, dR as buildMaintenanceGraph, dS as buildPutInput, l as buildSubscribeHandler, dT as buildUpdateInput, dU as collectViewDefinitions, aI as compileFragment, aJ as compileMutationPlan, aK as compileSingleFragmentPlan, dV as cond, dW as contractOfMethodSpec, dX as definePlan, dY as entityWrites, dZ as executeBatchGet, d_ as executeBatchWrite, d$ as executeCommandMethod, e0 as executeDelete, e1 as executeKeyedBatchGet, e2 as executePut, e3 as executeQueryMethod, e4 as executeRangeFanout, e5 as executeTransaction, e6 as executeUpdate, e7 as from, e8 as getEntityWrites, e9 as gsi, ea as identity, eb as isColumn, ec as isCommandModelContract, ed as isCommandPlan, ee as isContractComposeNode, ef as isContractFromRef, eg as isContractKeyFieldRef, eh as isContractKeyRef, ei as isContractParamRef, ej as isEntityWritesDefinition, ek as isKeySegment, el as isLifecycleContract, em as isMaintainTrigger, en as isMutationFragment, eo as isMutationInputRef, ep as isParam, eq as isPlannedCommandMethod, er as isPreparedParamRef, es as isQueryModelContract, et as isRetryableError, eu as isRetryableTransactionCancellation, ev as k, ew as key, ex as lifecyclePhaseForIntent, ey as maintainTrigger, ez as mintContractKeyFieldRef, eA as mintContractParamRef, eB as mutation, eC as param, eD as prepare, eE as preview, eF as publicCommandModel, eG as publicQueryModel, eH as query, aM as resolveLifecycle, eI as wholeKeysSentinel } from './maintenance-view-adapter-BCbgKG5d.js';
4
4
  import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
5
5
  import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
6
- export { C as CdcEmulator, M as MAINT_OUTBOX_PK_PREFIX, a as MaintenanceDrain, b as MaintenanceDrainOptions, c as createCdcEmulator, d as createMaintenanceDrain, e as createMaintenanceDrainHandler, p as parseChange } from './from-change-bwwGGQDB.js';
7
- import { P as PreparedWriteOpSpec, a as PreparedPlanDocument } from './index-CFySSIg4.js';
8
- export { A as AnyModelContract, B as BuiltContracts, C as ContextOwnership, b as ContextOwnershipMap, c as ContractBoundaryViolation, d as ContractInputs, e as ContractMap, f as ContractN1Violation, g as PreparedBindSpec, h as PreparedPlanSpec, i as PreparedReadRouteSpec, T as TransactionDefinition, j as TransactionParamShape, k as TransactionRef, l as TxConditionCheckOptions, m as TxForEachInstruction, n as TxForEachOptions, o as TxInstruction, p as TxRecorder, q as TxWriteInstruction, r as TxWriteOptions, W as WhenComparison, s as assertBundleSerializable, t as assertContractBoundaries, u as assertContractN1Safe, v as assertJsonSerializable, w as assertSupportedCondition, x as buildBridgeBundle, y as buildContexts, z as buildContracts, D as buildManifest, E as buildOperations, F as buildQuerySpec, G as buildTransactionSpec, H as buildTransactions, I as collectContractBoundaryViolations, J as collectContractN1Violations, K as defineTransaction, L as defineTransactions, M as isTransactionRef, N as when } from './index-CFySSIg4.js';
9
- export { c as createDefaultLinter, g as gsiAmbiguityRule, m as missingGsiRule, n as noScanRule, q as queryBoundaryRule, r as relationDepthRule, a as requireLimitRule } from './relation-depth-JFdnwU7k.js';
6
+ export { C as CdcEmulator, M as MAINT_OUTBOX_PK_PREFIX, a as MaintenanceDrain, b as MaintenanceDrainOptions, c as createCdcEmulator, d as createMaintenanceDrain, e as createMaintenanceDrainHandler, p as parseChange } from './from-change-w2Ih8fkm.js';
7
+ import { P as PreparedWriteOpSpec, a as PreparedPlanDocument } from './index-Deugy2sa.js';
8
+ export { A as AnyModelContract, B as BuiltContracts, C as ContextOwnership, b as ContextOwnershipMap, c as ContractBoundaryViolation, d as ContractInputs, e as ContractMap, f as ContractN1Violation, g as PreparedBindSpec, h as PreparedPlanSpec, i as PreparedReadRouteSpec, T as TransactionDefinition, j as TransactionParamShape, k as TransactionRef, l as TxConditionCheckOptions, m as TxForEachInstruction, n as TxForEachOptions, o as TxInstruction, p as TxRecorder, q as TxWriteInstruction, r as TxWriteOptions, W as WhenComparison, s as assertBundleSerializable, t as assertContractBoundaries, u as assertContractN1Safe, v as assertJsonSerializable, w as assertSupportedCondition, x as buildBridgeBundle, y as buildContexts, z as buildContracts, D as buildManifest, E as buildOperations, F as buildQuerySpec, G as buildTransactionSpec, H as buildTransactions, I as collectContractBoundaryViolations, J as collectContractN1Violations, K as defineTransaction, L as defineTransactions, M as isTransactionRef, N as when } from './index-Deugy2sa.js';
9
+ export { c as createDefaultLinter, g as gsiAmbiguityRule, m as missingGsiRule, n as noScanRule, q as queryBoundaryRule, r as relationDepthRule, a as requireLimitRule } from './relation-depth-C9t4s9bt.js';
10
10
 
11
11
  /**
12
12
  * Query options with conditional `consistentRead` availability.
@@ -2011,6 +2011,8 @@ declare function createMaintenanceRebuilder(opts?: MaintenanceRebuildOptions): M
2011
2011
 
2012
2012
  /** Scalar leaf types that may be replaced by a {@link Param} placeholder. */
2013
2013
  type Replaceable = string | number;
2014
+ /** `null` / `undefined` — peeled off an optional leaf before the scalar test. */
2015
+ type Nullish = null | undefined;
2014
2016
  /**
2015
2017
  * Relaxes an input type `K` so each scalar leaf additionally accepts a
2016
2018
  * {@link Param} standing in for that leaf's value type. Non-scalar leaves and
@@ -2019,8 +2021,25 @@ type Replaceable = string | number;
2019
2021
  *
2020
2022
  * A leaf of type `V` becomes `V | Param<V>`; a `string` literal field that is a
2021
2023
  * fixed discriminator (no param) is still assignable as its literal.
2022
- */
2023
- type Parameterize<K> = K extends Replaceable ? K | Param<K> : K extends object ? {
2024
+ *
2025
+ * The scalar test is written with a **tuple wrap** (`[…] extends […]`) so it does
2026
+ * **not** distribute over a literal-union leaf. A field typed `'a' | 'b'`
2027
+ * therefore yields the whole-union placeholder `Param<'a' | 'b'>` (what
2028
+ * `param.literal('a','b')` produces) rather than the distributed
2029
+ * `Param<'a'> | Param<'b'>`, which rejected the multi-value literal param (#246).
2030
+ * Because `Param` is covariant in its value type, a single-member placeholder
2031
+ * (`param.literal('a')` → `Param<'a'>`) still fits, while a placeholder carrying a
2032
+ * value **outside** the union (`Param<'a' | 'x'>`), a wider-typed placeholder
2033
+ * (`Param<string>` / `Param<number>` on a literal field), or a plain literal not
2034
+ * in the union stays a type error.
2035
+ *
2036
+ * `null` / `undefined` are peeled off first (via `Exclude`/`Extract`) and carried
2037
+ * through verbatim, so an **optional** leaf (`Partial<EntityInput>` in
2038
+ * `defineUpdate` changes) keeps accepting its placeholder — the tuple wrap alone
2039
+ * would otherwise send `string | undefined` down the object arm and drop the
2040
+ * placeholder.
2041
+ */
2042
+ type Parameterize<K> = [Exclude<K, Nullish>] extends [Replaceable] ? [Exclude<K, Nullish>] extends [never] ? K : Exclude<K, Nullish> | Param<Exclude<K, Nullish>> | Extract<K, Nullish> : K extends object ? {
2024
2043
  [P in keyof K]: Parameterize<K[P]>;
2025
2044
  } : K;
2026
2045
  /**
package/dist/index.js CHANGED
@@ -1,6 +1,18 @@
1
1
  import {
2
2
  queryBoundaryRule
3
3
  } from "./chunk-MMVHOUM4.js";
4
+ import {
5
+ CdcEmulator,
6
+ MAINT_OUTBOX_PK_PREFIX,
7
+ MaintenanceDrain,
8
+ compareDesc,
9
+ createCdcEmulator,
10
+ createMaintenanceDrain,
11
+ createMaintenanceDrainHandler,
12
+ orderAndTrimCollection,
13
+ pathField,
14
+ projectFrom
15
+ } from "./chunk-IA6MW2HP.js";
4
16
  import {
5
17
  BatchGetResult,
6
18
  DDBModel,
@@ -90,19 +102,7 @@ import {
90
102
  validateDepth,
91
103
  when,
92
104
  wholeKeysSentinel
93
- } from "./chunk-QOA5MSMD.js";
94
- import {
95
- CdcEmulator,
96
- MAINT_OUTBOX_PK_PREFIX,
97
- MaintenanceDrain,
98
- compareDesc,
99
- createCdcEmulator,
100
- createMaintenanceDrain,
101
- createMaintenanceDrainHandler,
102
- orderAndTrimCollection,
103
- pathField,
104
- projectFrom
105
- } from "./chunk-5NXNEW43.js";
105
+ } from "./chunk-NZRCBEWS.js";
106
106
  import {
107
107
  BATCH_GET_MAX_KEYS,
108
108
  BATCH_WRITE_MAX_ITEMS,
@@ -157,7 +157,7 @@ import {
157
157
  resolveConditionTree,
158
158
  resolveModelClass,
159
159
  serializeFieldValue
160
- } from "./chunk-F2DI3GTI.js";
160
+ } from "./chunk-HFFIB77D.js";
161
161
  import {
162
162
  Linter,
163
163
  TableMapping,
@@ -768,6 +768,7 @@ function isWholePlaceholder(template) {
768
768
  return /^\{[^{}]+\}$/.test(template);
769
769
  }
770
770
  function resolveValue(template, params, element) {
771
+ if (typeof template !== "string") return template;
771
772
  if (isWholePlaceholder(template)) {
772
773
  const name = template.slice(1, -1);
773
774
  if (name.startsWith("item.")) {
@@ -1,7 +1,7 @@
1
- import { L as LintRule } from '../registry-uYUbg3If.js';
2
- export { a as LintResult, b as Linter } from '../registry-uYUbg3If.js';
3
- export { c as createDefaultLinter, g as gsiAmbiguityRule, m as missingGsiRule, n as noScanRule, q as queryBoundaryRule, r as relationDepthRule, a as requireLimitRule } from '../relation-depth-JFdnwU7k.js';
4
- import '../maintenance-view-adapter-B4oU6udW.js';
1
+ import { L as LintRule } from '../registry-pAnFcc62.js';
2
+ export { a as LintResult, b as Linter } from '../registry-pAnFcc62.js';
3
+ export { c as createDefaultLinter, g as gsiAmbiguityRule, m as missingGsiRule, n as noScanRule, q as queryBoundaryRule, r as relationDepthRule, a as requireLimitRule } from '../relation-depth-C9t4s9bt.js';
4
+ import '../maintenance-view-adapter-BCbgKG5d.js';
5
5
  import '@aws-sdk/client-dynamodb';
6
6
 
7
7
  /**