effect-dynamodb 1.6.0 → 1.7.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/Entity.d.ts.map +1 -1
- package/dist/Entity.js +196 -135
- package/dist/Entity.js.map +1 -1
- package/dist/Errors.d.ts +85 -15
- package/dist/Errors.d.ts.map +1 -1
- package/dist/Errors.js +77 -19
- package/dist/Errors.js.map +1 -1
- package/dist/KeyComposer.d.ts +94 -79
- package/dist/KeyComposer.d.ts.map +1 -1
- package/dist/KeyComposer.js +185 -144
- package/dist/KeyComposer.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/EntitySchemas.d.ts.map +1 -1
- package/dist/internal/EntitySchemas.js +11 -7
- package/dist/internal/EntitySchemas.js.map +1 -1
- package/dist/internal/EntityTypes.d.ts +8 -6
- package/dist/internal/EntityTypes.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/Errors.d.ts
CHANGED
|
@@ -274,19 +274,38 @@ declare const CompositeKeyHoleError_base: new <A extends Record<string, any> = {
|
|
|
274
274
|
readonly _tag: "CompositeKeyHoleError";
|
|
275
275
|
} & Readonly<A>;
|
|
276
276
|
/**
|
|
277
|
-
* EDD-9024 —
|
|
278
|
-
* omitted-with-`sparse`) while a composite at position `j > i` was still
|
|
279
|
-
* present in the composed payload. Composed keys can't carry holes
|
|
280
|
-
* meaningfully — `acc#A#child#Y` with `parent` cleared composes to a
|
|
281
|
-
* syntactically invalid prefix that no `begins_with` query would match.
|
|
277
|
+
* EDD-9024 — DEPRECATED in v1.7.1.
|
|
282
278
|
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
279
|
+
* @deprecated Since v1.7.1, this error is no longer thrown at runtime. It is
|
|
280
|
+
* kept as an exported class for back-compat with consumers who type-imported
|
|
281
|
+
* it (e.g. inside `Effect.catchTag("CompositeKeyHoleError", ...)` blocks).
|
|
282
|
+
* No code path constructs or throws this error anymore.
|
|
287
283
|
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
284
|
+
* **Why deprecated.** v1.7.0's "throw under preserve on hole pattern" was a
|
|
285
|
+
* defensive runtime safety net for a case the type system already catches:
|
|
286
|
+
* required composites can't be omitted under `exactOptionalPropertyTypes`
|
|
287
|
+
* since v1.7.0 reverted the v1.6 NullishOr widening. The only remaining
|
|
288
|
+
* runtime "hole" shape is "optional leading composite absent + present
|
|
289
|
+
* trailing composite," which is a normal write the consumer expressly chose.
|
|
290
|
+
*
|
|
291
|
+
* **What replaces it.** Hole patterns now collapse into the unified per-half
|
|
292
|
+
* can't-compose rule:
|
|
293
|
+
* - `'sparse'` half → REMOVE that half's key (drops the half).
|
|
294
|
+
* - `'preserve'` half + composite of the half is in `Entity.remove([...])`
|
|
295
|
+
* → REMOVE that half's key (cascade override fires).
|
|
296
|
+
* - `'preserve'` half + no composite in `Entity.remove([...])` → noop (the
|
|
297
|
+
* stored key is left untouched; may be stale until the next write that
|
|
298
|
+
* touches the half supplies enough composites to recompose, or an
|
|
299
|
+
* `Entity.remove` cascade fires).
|
|
300
|
+
*
|
|
301
|
+
* See `DESIGN.md §7 Policy-Aware GSI Composition` (v1.7.1 unified rule).
|
|
302
|
+
*
|
|
303
|
+
* **Migration.** Remove any `Effect.catchTag("CompositeKeyHoleError", ...)`
|
|
304
|
+
* handlers — the throw site is gone and the catch is dead code. If you were
|
|
305
|
+
* relying on the throw to detect bad payloads, switch to declaring the
|
|
306
|
+
* relevant GSI half as `'sparse'` (the consumer-side semantic that always
|
|
307
|
+
* matches the throw's intent — drop the index entry on can't-compose) or
|
|
308
|
+
* supply the surviving composites via `set` in the same update.
|
|
290
309
|
*/
|
|
291
310
|
export declare class CompositeKeyHoleError extends CompositeKeyHoleError_base<{
|
|
292
311
|
readonly entityType: string;
|
|
@@ -295,14 +314,18 @@ export declare class CompositeKeyHoleError extends CompositeKeyHoleError_base<{
|
|
|
295
314
|
readonly trailingComposite: string;
|
|
296
315
|
readonly clearedPosition: number;
|
|
297
316
|
readonly trailingPosition: number;
|
|
298
|
-
|
|
317
|
+
/** Which GSI key attribute the hole is in — `"pk"` (gsiNpk) or `"sk"` (gsiNsk). */
|
|
318
|
+
readonly key: "pk" | "sk";
|
|
299
319
|
/** Human-readable description, prefixed with `EDD-9024`. */
|
|
300
320
|
readonly message: string;
|
|
301
321
|
}> {
|
|
302
322
|
}
|
|
303
323
|
/**
|
|
304
|
-
* Build a {@link CompositeKeyHoleError} with a formatted message.
|
|
305
|
-
*
|
|
324
|
+
* Build a {@link CompositeKeyHoleError} with a formatted message.
|
|
325
|
+
*
|
|
326
|
+
* @deprecated Since v1.7.1 this builder is unused — no code path raises EDD-9024
|
|
327
|
+
* at runtime. Kept exported only for back-compat with consumers who imported
|
|
328
|
+
* the helper. See {@link CompositeKeyHoleError} for the migration path.
|
|
306
329
|
*/
|
|
307
330
|
export declare const makeCompositeKeyHoleError: (params: {
|
|
308
331
|
readonly entityType: string;
|
|
@@ -311,7 +334,54 @@ export declare const makeCompositeKeyHoleError: (params: {
|
|
|
311
334
|
readonly trailingComposite: string;
|
|
312
335
|
readonly clearedPosition: number;
|
|
313
336
|
readonly trailingPosition: number;
|
|
314
|
-
readonly
|
|
337
|
+
readonly key: "pk" | "sk";
|
|
315
338
|
}) => CompositeKeyHoleError;
|
|
339
|
+
declare const CompositeNullableError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
340
|
+
readonly _tag: "CompositeNullableError";
|
|
341
|
+
} & Readonly<A>;
|
|
342
|
+
/**
|
|
343
|
+
* EDD-9025 — A composite attribute on `primaryKey`, `indexes`, or a `unique`
|
|
344
|
+
* constraint has a Schema whose type union includes `null`. Composites
|
|
345
|
+
* participate in string composition (`acc#X#alert#Y`); `null` is not a
|
|
346
|
+
* meaningful slot value — only present-with-value or absent. Allowing
|
|
347
|
+
* `Schema.NullOr` / `Schema.NullishOr` / `Schema.Union([..., Schema.Null])`
|
|
348
|
+
* on a composite would let `set({ composite: null })` typecheck, then either
|
|
349
|
+
* blow up at runtime or silently produce a key with the literal string
|
|
350
|
+
* `"null"` as a slot.
|
|
351
|
+
*
|
|
352
|
+
* Raised at `Entity.make()` time. The error names the entity, the
|
|
353
|
+
* surface where the composite is declared (primary key / a GSI / a unique
|
|
354
|
+
* constraint), the offending composite attribute, and the resolved Schema
|
|
355
|
+
* path that contains `null`.
|
|
356
|
+
*
|
|
357
|
+
* Resolution: declare the attribute as `Schema.optional(...)` (which
|
|
358
|
+
* produces `T | undefined` without `null`). Sparse-pattern usage is fully
|
|
359
|
+
* supported under v3's two-way payload classification — `undefined` is
|
|
360
|
+
* "absent" for GSI composition purposes.
|
|
361
|
+
*
|
|
362
|
+
* See `DESIGN.md §7 Policy-Aware GSI Composition` (EDD-9025 footgun gate).
|
|
363
|
+
*/
|
|
364
|
+
export declare class CompositeNullableError extends CompositeNullableError_base<{
|
|
365
|
+
readonly entityType: string;
|
|
366
|
+
/** "primaryKey" | "index:<name>" | "unique:<name>" */
|
|
367
|
+
readonly surface: string;
|
|
368
|
+
readonly compositeAttribute: string;
|
|
369
|
+
/** Resolved schema path that revealed the `null` branch. */
|
|
370
|
+
readonly schemaPath: string;
|
|
371
|
+
/** Human-readable description, prefixed with `EDD-9025`. */
|
|
372
|
+
readonly message: string;
|
|
373
|
+
}> {
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Build a {@link CompositeNullableError} with a formatted message. Centralises
|
|
377
|
+
* the message format so call sites (Entity.make validation paths) stay
|
|
378
|
+
* consistent.
|
|
379
|
+
*/
|
|
380
|
+
export declare const makeCompositeNullableError: (params: {
|
|
381
|
+
readonly entityType: string;
|
|
382
|
+
readonly surface: string;
|
|
383
|
+
readonly compositeAttribute: string;
|
|
384
|
+
readonly schemaPath: string;
|
|
385
|
+
}) => CompositeNullableError;
|
|
316
386
|
export {};
|
|
317
387
|
//# sourceMappingURL=Errors.d.ts.map
|
package/dist/Errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;AAE1C,oDAAoD;AACpD,qBAAa,WAAY,SAAQ,iBAAgC;IAC/D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB,CAAC;CAAG;;;;AAEL,kDAAkD;AAClD,qBAAa,eAAgB,SAAQ,qBAAoC;IACvE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB,CAAC;CAAG;;;;AAEL,oDAAoD;AACpD,qBAAa,qBAAsB,SAAQ,2BAA0C;IACnF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB,CAAC;CAAG;;;;AAEL,yDAAyD;AACzD,qBAAa,mBAAoB,SAAQ,yBAAwC;IAC/E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB,CAAC;CAAG;;;;AAEL,wDAAwD;AACxD,qBAAa,qBAAsB,SAAQ,2BAA0C;IACnF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB,CAAC;CAAG;;;;AAEL,iDAAiD;AACjD,qBAAa,YAAa,SAAQ,kBAAiC;IACjE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAA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AAA;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;CAC1B,KAAG,qBASA,CAAA;;;;AAEJ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,sBAAuB,SAAQ,4BAA2C;IACrF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,CAAC;CAAG;AAEL;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,QAAQ;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B,KAAG,sBASA,CAAA"}
|
package/dist/Errors.js
CHANGED
|
@@ -128,33 +128,91 @@ export class CascadePartialFailure extends Data.TaggedError("CascadePartialFailu
|
|
|
128
128
|
export class VersionConflict extends Data.TaggedError("VersionConflict") {
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
|
-
* EDD-9024 —
|
|
132
|
-
* omitted-with-`sparse`) while a composite at position `j > i` was still
|
|
133
|
-
* present in the composed payload. Composed keys can't carry holes
|
|
134
|
-
* meaningfully — `acc#A#child#Y` with `parent` cleared composes to a
|
|
135
|
-
* syntactically invalid prefix that no `begins_with` query would match.
|
|
131
|
+
* EDD-9024 — DEPRECATED in v1.7.1.
|
|
136
132
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
133
|
+
* @deprecated Since v1.7.1, this error is no longer thrown at runtime. It is
|
|
134
|
+
* kept as an exported class for back-compat with consumers who type-imported
|
|
135
|
+
* it (e.g. inside `Effect.catchTag("CompositeKeyHoleError", ...)` blocks).
|
|
136
|
+
* No code path constructs or throws this error anymore.
|
|
141
137
|
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
138
|
+
* **Why deprecated.** v1.7.0's "throw under preserve on hole pattern" was a
|
|
139
|
+
* defensive runtime safety net for a case the type system already catches:
|
|
140
|
+
* required composites can't be omitted under `exactOptionalPropertyTypes`
|
|
141
|
+
* since v1.7.0 reverted the v1.6 NullishOr widening. The only remaining
|
|
142
|
+
* runtime "hole" shape is "optional leading composite absent + present
|
|
143
|
+
* trailing composite," which is a normal write the consumer expressly chose.
|
|
144
|
+
*
|
|
145
|
+
* **What replaces it.** Hole patterns now collapse into the unified per-half
|
|
146
|
+
* can't-compose rule:
|
|
147
|
+
* - `'sparse'` half → REMOVE that half's key (drops the half).
|
|
148
|
+
* - `'preserve'` half + composite of the half is in `Entity.remove([...])`
|
|
149
|
+
* → REMOVE that half's key (cascade override fires).
|
|
150
|
+
* - `'preserve'` half + no composite in `Entity.remove([...])` → noop (the
|
|
151
|
+
* stored key is left untouched; may be stale until the next write that
|
|
152
|
+
* touches the half supplies enough composites to recompose, or an
|
|
153
|
+
* `Entity.remove` cascade fires).
|
|
154
|
+
*
|
|
155
|
+
* See `DESIGN.md §7 Policy-Aware GSI Composition` (v1.7.1 unified rule).
|
|
156
|
+
*
|
|
157
|
+
* **Migration.** Remove any `Effect.catchTag("CompositeKeyHoleError", ...)`
|
|
158
|
+
* handlers — the throw site is gone and the catch is dead code. If you were
|
|
159
|
+
* relying on the throw to detect bad payloads, switch to declaring the
|
|
160
|
+
* relevant GSI half as `'sparse'` (the consumer-side semantic that always
|
|
161
|
+
* matches the throw's intent — drop the index entry on can't-compose) or
|
|
162
|
+
* supply the surviving composites via `set` in the same update.
|
|
144
163
|
*/
|
|
145
164
|
export class CompositeKeyHoleError extends Data.TaggedError("CompositeKeyHoleError") {
|
|
146
165
|
}
|
|
147
166
|
/**
|
|
148
|
-
* Build a {@link CompositeKeyHoleError} with a formatted message.
|
|
149
|
-
*
|
|
167
|
+
* Build a {@link CompositeKeyHoleError} with a formatted message.
|
|
168
|
+
*
|
|
169
|
+
* @deprecated Since v1.7.1 this builder is unused — no code path raises EDD-9024
|
|
170
|
+
* at runtime. Kept exported only for back-compat with consumers who imported
|
|
171
|
+
* the helper. See {@link CompositeKeyHoleError} for the migration path.
|
|
150
172
|
*/
|
|
151
173
|
export const makeCompositeKeyHoleError = (params) => new CompositeKeyHoleError({
|
|
152
174
|
...params,
|
|
153
|
-
message: `[EDD-9024] Composite key hole on GSI "${params.indexName}" of entity "${params.entityType}": ` +
|
|
154
|
-
`composite "${params.clearedComposite}" at ${params.
|
|
155
|
-
`
|
|
156
|
-
`
|
|
157
|
-
`
|
|
158
|
-
|
|
175
|
+
message: `[EDD-9024 — DEPRECATED] Composite key hole on GSI "${params.indexName}" of entity "${params.entityType}": ` +
|
|
176
|
+
`composite "${params.clearedComposite}" at ${params.key} position ${params.clearedPosition} is absent, ` +
|
|
177
|
+
`but composite "${params.trailingComposite}" at ${params.key} position ${params.trailingPosition} is still present. ` +
|
|
178
|
+
`Since v1.7.1 this error is no longer thrown — hole patterns collapse into the unified per-half can't-compose rule ` +
|
|
179
|
+
`(REMOVE the half under 'sparse' or removedSet cascade; noop under 'preserve' without removedSet).`,
|
|
180
|
+
});
|
|
181
|
+
/**
|
|
182
|
+
* EDD-9025 — A composite attribute on `primaryKey`, `indexes`, or a `unique`
|
|
183
|
+
* constraint has a Schema whose type union includes `null`. Composites
|
|
184
|
+
* participate in string composition (`acc#X#alert#Y`); `null` is not a
|
|
185
|
+
* meaningful slot value — only present-with-value or absent. Allowing
|
|
186
|
+
* `Schema.NullOr` / `Schema.NullishOr` / `Schema.Union([..., Schema.Null])`
|
|
187
|
+
* on a composite would let `set({ composite: null })` typecheck, then either
|
|
188
|
+
* blow up at runtime or silently produce a key with the literal string
|
|
189
|
+
* `"null"` as a slot.
|
|
190
|
+
*
|
|
191
|
+
* Raised at `Entity.make()` time. The error names the entity, the
|
|
192
|
+
* surface where the composite is declared (primary key / a GSI / a unique
|
|
193
|
+
* constraint), the offending composite attribute, and the resolved Schema
|
|
194
|
+
* path that contains `null`.
|
|
195
|
+
*
|
|
196
|
+
* Resolution: declare the attribute as `Schema.optional(...)` (which
|
|
197
|
+
* produces `T | undefined` without `null`). Sparse-pattern usage is fully
|
|
198
|
+
* supported under v3's two-way payload classification — `undefined` is
|
|
199
|
+
* "absent" for GSI composition purposes.
|
|
200
|
+
*
|
|
201
|
+
* See `DESIGN.md §7 Policy-Aware GSI Composition` (EDD-9025 footgun gate).
|
|
202
|
+
*/
|
|
203
|
+
export class CompositeNullableError extends Data.TaggedError("CompositeNullableError") {
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Build a {@link CompositeNullableError} with a formatted message. Centralises
|
|
207
|
+
* the message format so call sites (Entity.make validation paths) stay
|
|
208
|
+
* consistent.
|
|
209
|
+
*/
|
|
210
|
+
export const makeCompositeNullableError = (params) => new CompositeNullableError({
|
|
211
|
+
...params,
|
|
212
|
+
message: `[EDD-9025] Entity "${params.entityType}": composite attribute "${params.compositeAttribute}" ` +
|
|
213
|
+
`on ${params.surface} resolves to a Schema that includes \`null\` (${params.schemaPath}). ` +
|
|
214
|
+
`Composites participate in string composition and cannot be null — only present-with-value or absent. ` +
|
|
215
|
+
`Replace the nullable wrapper with \`Schema.optional(...)\` (T | undefined) to express the sparse ` +
|
|
216
|
+
`pattern, or supply a non-nullable schema for "${params.compositeAttribute}".`,
|
|
159
217
|
});
|
|
160
218
|
//# sourceMappingURL=Errors.js.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sBAAuB,SAAQ,IAAI,CAAC,WAAW,CAAC,wBAAwB,CASnF;CAAG;AAEL;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAK1C,EAA0B,EAAE,CAC3B,IAAI,sBAAsB,CAAC;IACzB,GAAG,MAAM;IACT,OAAO,EACL,sBAAsB,MAAM,CAAC,UAAU,2BAA2B,MAAM,CAAC,kBAAkB,IAAI;QAC/F,MAAM,MAAM,CAAC,OAAO,iDAAiD,MAAM,CAAC,UAAU,KAAK;QAC3F,uGAAuG;QACvG,mGAAmG;QACnG,iDAAiD,MAAM,CAAC,kBAAkB,IAAI;CACjF,CAAC,CAAA"}
|
package/dist/KeyComposer.d.ts
CHANGED
|
@@ -6,31 +6,54 @@
|
|
|
6
6
|
* the key format; KeyComposer extracts attribute values and delegates.
|
|
7
7
|
*/
|
|
8
8
|
import type * as DynamoSchema from "./DynamoSchema.js";
|
|
9
|
-
import {
|
|
9
|
+
import type { CompositeKeyHoleError } from "./Errors.js";
|
|
10
10
|
/** Index key part definition (pk or sk of an index) */
|
|
11
11
|
export interface KeyPart {
|
|
12
12
|
readonly field: string;
|
|
13
13
|
readonly composite: ReadonlyArray<string>;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Per-
|
|
17
|
-
* `.append` handle a
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
* Per-half policy value controlling how `Entity.update` and time-series
|
|
17
|
+
* `.append` handle a GSI half the writer touches but can't compose.
|
|
18
|
+
*
|
|
19
|
+
* Per-half evaluation gate (v1.7.1): a half is *touched* iff at least one of
|
|
20
|
+
* its composite names appears in the update payload (regardless of value,
|
|
21
|
+
* including `undefined`) OR appears in `Entity.remove([...])`. Untouched
|
|
22
|
+
* halves are skipped entirely — no SET, no REMOVE, no policy fires.
|
|
23
|
+
*
|
|
24
|
+
* For *touched* halves the policy decides the outcome when the structural
|
|
25
|
+
* rule can't compose (empty leading prefix OR hole pattern):
|
|
26
|
+
* - `"sparse"` — REMOVE this half's key attribute (the half drops out of the
|
|
27
|
+
* GSI). The other half follows its own per-half outcome independently —
|
|
28
|
+
* there is no GSI-wide cascade. The DDB projection rule means an item with
|
|
29
|
+
* only one key attribute is invisible in the GSI; the surviving half's
|
|
30
|
+
* value is preserved for rejoin without other writers re-firing.
|
|
31
|
+
* - `"preserve"` — noop (leave the stored key for this half untouched). The
|
|
32
|
+
* stored value may go stale until either (a) the next write that touches
|
|
33
|
+
* this half supplies enough composites to recompose, or (b) a composite of
|
|
34
|
+
* this half is named in `Entity.remove([...])` — the cascade override
|
|
35
|
+
* then REMOVEs this half's key.
|
|
36
|
+
*
|
|
37
|
+
* Halves not declared in `indexPolicy` default to `"preserve"`. See
|
|
38
|
+
* `DESIGN.md §7 Policy-Aware GSI Composition` for the full decision rules
|
|
39
|
+
* (per-half evaluation gate, per-half outcome, cascade override, decision
|
|
40
|
+
* table).
|
|
41
|
+
*/
|
|
42
|
+
export type IndexPolicyKey = "sparse" | "preserve";
|
|
43
|
+
/**
|
|
44
|
+
* Per-half index policy declaration. Both halves default to `"preserve"`
|
|
45
|
+
* when omitted (or when `indexPolicy` is omitted entirely from the GSI
|
|
46
|
+
* config).
|
|
47
|
+
*
|
|
48
|
+
* The standard composition path has only payload-level information (no
|
|
49
|
+
* read-before-write), so per-attribute policy callbacks were removed in
|
|
50
|
+
* v3 — within a single half, per-attribute mixing has no coherent semantic
|
|
51
|
+
* because a half is a single concatenated string.
|
|
52
|
+
*/
|
|
53
|
+
export interface IndexPolicy {
|
|
54
|
+
readonly pk?: IndexPolicyKey | undefined;
|
|
55
|
+
readonly sk?: IndexPolicyKey | undefined;
|
|
56
|
+
}
|
|
34
57
|
/** Index definition for primary or secondary index (internal format) */
|
|
35
58
|
export interface IndexDefinition {
|
|
36
59
|
readonly index?: string | undefined;
|
|
@@ -40,9 +63,9 @@ export interface IndexDefinition {
|
|
|
40
63
|
readonly sk: KeyPart;
|
|
41
64
|
readonly casing?: DynamoSchema.Casing | undefined;
|
|
42
65
|
/**
|
|
43
|
-
* Optional per-
|
|
44
|
-
*
|
|
45
|
-
*
|
|
66
|
+
* Optional per-half policy for `Entity.update` and `.append`. Not consulted
|
|
67
|
+
* on `put()` — put always omits a GSI's keys when any of its composites is
|
|
68
|
+
* missing.
|
|
46
69
|
*/
|
|
47
70
|
readonly indexPolicy?: IndexPolicy | undefined;
|
|
48
71
|
}
|
|
@@ -60,13 +83,9 @@ export interface GsiConfig {
|
|
|
60
83
|
/** Sort key: physical field name + composite attributes. */
|
|
61
84
|
readonly sk: KeyPart;
|
|
62
85
|
/**
|
|
63
|
-
* Per-
|
|
64
|
-
* time-series `.append`. Defaults to `"preserve"`
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* At append-time, returned keys must be members of the `appendInput`
|
|
68
|
-
* schema (enforced at `Entity.make()`) — composites owned by other writers
|
|
69
|
-
* cannot have policy at append-time, since `.append` cannot touch them.
|
|
86
|
+
* Per-half sparse/preserve policy. Applied by `Entity.update` and
|
|
87
|
+
* time-series `.append`. Defaults to `"preserve"` on each half. Not
|
|
88
|
+
* applied on `put()`. See `DESIGN.md §7 Policy-Aware GSI Composition`.
|
|
70
89
|
*/
|
|
71
90
|
readonly indexPolicy?: IndexPolicy | undefined;
|
|
72
91
|
}
|
|
@@ -143,72 +162,68 @@ export interface GsiUpdateResult {
|
|
|
143
162
|
}
|
|
144
163
|
/**
|
|
145
164
|
* Compose a sort key from the leading prefix `[sk_0, ..., sk_(stopBefore-1)]`
|
|
146
|
-
* of an index's SK composites. Used by
|
|
147
|
-
* trailing SK composite is
|
|
148
|
-
*
|
|
149
|
-
*
|
|
165
|
+
* of an index's SK composites. Used by v3's structural composition rule when a
|
|
166
|
+
* trailing SK composite is absent and the half's `indexPolicy.sk` is
|
|
167
|
+
* `"preserve"` (or absent — defaults to preserve), or when a hole pattern is
|
|
168
|
+
* encountered under `"sparse"`.
|
|
150
169
|
*
|
|
151
170
|
* `stopBefore === 0` produces the bare entity/collection prefix with no
|
|
152
171
|
* composite values (the item still belongs to the GSI but at the broadest
|
|
153
172
|
* scope — `begins_with(sk, "<prefix>")` matches it).
|
|
154
173
|
*
|
|
155
|
-
* See `DESIGN.md §7
|
|
174
|
+
* See `DESIGN.md §7 Policy-Aware GSI Composition`.
|
|
156
175
|
*/
|
|
157
176
|
export declare const composeSkPrefixUpTo: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>, stopBefore: number) => string;
|
|
158
177
|
/**
|
|
159
178
|
* Policy-aware GSI key composition for `Entity.update` and time-series
|
|
160
|
-
* `.append
|
|
161
|
-
*
|
|
162
|
-
*
|
|
179
|
+
* `.append` — v1.7.1 per-half structural composition with per-half evaluation
|
|
180
|
+
* gate and per-half cascade.
|
|
181
|
+
*
|
|
182
|
+
* **Per-half evaluation gate (v1.7.1).** Each half (PK and SK) is independently
|
|
183
|
+
* checked for whether the writer touched it. A half is "touched" iff at least
|
|
184
|
+
* one of its composite names appears in `updatePayload` (regardless of value,
|
|
185
|
+
* including `undefined`) OR appears in `removedSet`. **Untouched halves are
|
|
186
|
+
* skipped entirely — no SET, no REMOVE, no policy fires.** This closes the
|
|
187
|
+
* v1.7.0 multi-writer leak where a "stamp" writer that doesn't touch a GSI's
|
|
188
|
+
* composites would still trigger the policy and blow away another writer's
|
|
189
|
+
* key.
|
|
190
|
+
*
|
|
191
|
+
* **Two-way payload classification.**
|
|
163
192
|
* - **present** (`attr: <value>` in payload, or inherited from `keyRecord`)
|
|
164
193
|
* — value is used in composition.
|
|
165
|
-
* - **
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* -
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* the policy is a declarative statement about the GSI's membership.
|
|
194
|
+
* - **absent** (key omitted, or `attr: null`, or `attr: undefined`) — the
|
|
195
|
+
* structural rule treats all three identically.
|
|
196
|
+
*
|
|
197
|
+
* **Per-half outcome (v1.7.1 unified rule).** For each touched half:
|
|
198
|
+
* 1. Run the structural rule (longest leading prefix of present values in
|
|
199
|
+
* the merged record).
|
|
200
|
+
* 2. If the prefix is non-empty AND there's no hole → SET (full or truncated).
|
|
201
|
+
* 3. Otherwise (empty leading prefix OR hole pattern):
|
|
202
|
+
* - `'sparse'` → REMOVE this half's key.
|
|
203
|
+
* - `'preserve'` AND any composite of this half is in `removedSet` →
|
|
204
|
+
* REMOVE (cascade override under preserve).
|
|
205
|
+
* - `'preserve'` AND no composite in `removedSet` → noop (stored key
|
|
206
|
+
* retained, may be stale until next write touches the half).
|
|
207
|
+
*
|
|
208
|
+
* **Per-half roll-up (v1.7.1).** Each half's outcome applies to its own key
|
|
209
|
+
* attribute only. PK dropping doesn't drop SK; SK dropping doesn't drop PK.
|
|
210
|
+
* The item may be invisible in the GSI during a single-half-dropped period
|
|
211
|
+
* (DDB projection rule needs both keys for query visibility), but the
|
|
212
|
+
* surviving half's value persists for rejoin without other writers re-firing.
|
|
213
|
+
* The v1.7.0 GSI-wide cascade is gone.
|
|
214
|
+
*
|
|
215
|
+
* **`Entity.remove([attr])` cascade (v1.7.1: per-half).** Composites in
|
|
216
|
+
* `removedSet` contribute to the merged record as "absent" (same as
|
|
217
|
+
* undefined-in-payload) AND make their containing half "touched" for the
|
|
218
|
+
* evaluation gate AND trigger the cascade override under preserve. The
|
|
219
|
+
* cascade no longer drops both halves of every GSI containing the cleared
|
|
220
|
+
* attribute — only the half(s) whose composite list contains it.
|
|
193
221
|
*
|
|
194
222
|
* See `DESIGN.md §7 Policy-Aware GSI Composition` for the full decision
|
|
195
|
-
*
|
|
196
|
-
* for the trailing-clear truncation contract.
|
|
197
|
-
*
|
|
198
|
-
* @throws {CompositeKeyHoleError} EDD-9024 on hole-pattern detection.
|
|
223
|
+
* table and worked multi-writer examples.
|
|
199
224
|
*/
|
|
200
225
|
export declare const composeGsiKeysForUpdatePolicyAware: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, indexes: Record<string, IndexDefinition>, updatePayload: Record<string, unknown>, keyRecord: Record<string, unknown>, options?: {
|
|
201
226
|
readonly removedSet?: ReadonlySet<string> | undefined;
|
|
202
|
-
/**
|
|
203
|
-
* Attributes that appear in `updatePayload` with value `null` or
|
|
204
|
-
* `undefined` — i.e. the consumer explicitly cleared them. The library
|
|
205
|
-
* distinguishes this from omission to give consumers an unambiguous
|
|
206
|
-
* "drop this composite from the key" instruction; `null` and
|
|
207
|
-
* `undefined` collapse here to eliminate the long-standing footgun of
|
|
208
|
-
* dev confusion between the two in TypeScript with
|
|
209
|
-
* `exactOptionalPropertyTypes`.
|
|
210
|
-
*/
|
|
211
|
-
readonly clearedSet?: ReadonlySet<string> | undefined;
|
|
212
227
|
}) => GsiUpdateResult;
|
|
213
228
|
/** @internal — re-export for documentation cross-reference. */
|
|
214
229
|
export type { CompositeKeyHoleError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyComposer.d.ts","sourceRoot":"","sources":["../src/KeyComposer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAQtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"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