@effect-dynamodb/schema 1.36.1 → 1.37.0
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/Aggregate.d.ts +19 -11
- package/dist/Aggregate.d.ts.map +1 -1
- package/dist/Aggregate.js.map +1 -1
- package/dist/DynamoModel.d.ts +9 -1
- package/dist/DynamoModel.d.ts.map +1 -1
- package/dist/DynamoModel.js.map +1 -1
- package/dist/DynamoSchema.d.ts +20 -0
- package/dist/DynamoSchema.d.ts.map +1 -1
- package/dist/DynamoSchema.js +14 -0
- package/dist/DynamoSchema.js.map +1 -1
- package/dist/Entity.d.ts +153 -21
- package/dist/Entity.d.ts.map +1 -1
- package/dist/Entity.js +102 -2
- package/dist/Entity.js.map +1 -1
- package/dist/Errors.d.ts +27 -0
- package/dist/Errors.d.ts.map +1 -1
- package/dist/Errors.js +24 -0
- package/dist/Errors.js.map +1 -1
- package/dist/KeyComposer.d.ts +165 -27
- package/dist/KeyComposer.d.ts.map +1 -1
- package/dist/KeyComposer.js +251 -22
- package/dist/KeyComposer.js.map +1 -1
- package/dist/ZOrder.d.ts +173 -0
- package/dist/ZOrder.d.ts.map +1 -0
- package/dist/ZOrder.js +39 -0
- package/dist/ZOrder.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/AggregateEdges.d.ts +81 -12
- package/dist/internal/AggregateEdges.d.ts.map +1 -1
- package/dist/internal/AggregateEdges.js +17 -21
- package/dist/internal/AggregateEdges.js.map +1 -1
- package/dist/internal/AggregateTypes.d.ts +51 -2
- package/dist/internal/AggregateTypes.d.ts.map +1 -1
- package/dist/internal/CompositeCodec.d.ts +27 -12
- package/dist/internal/CompositeCodec.d.ts.map +1 -1
- package/dist/internal/CompositeCodec.js +93 -23
- package/dist/internal/CompositeCodec.js.map +1 -1
- package/dist/internal/EntityConfig.d.ts +12 -9
- package/dist/internal/EntityConfig.d.ts.map +1 -1
- package/dist/internal/EntityTypes.d.ts +77 -2
- package/dist/internal/EntityTypes.d.ts.map +1 -1
- package/dist/internal/KeyText136.d.ts +153 -0
- package/dist/internal/KeyText136.d.ts.map +1 -0
- package/dist/internal/KeyText136.js +357 -0
- package/dist/internal/KeyText136.js.map +1 -0
- package/dist/internal/NumericKey.d.ts +71 -0
- package/dist/internal/NumericKey.d.ts.map +1 -0
- package/dist/internal/NumericKey.js +128 -0
- package/dist/internal/NumericKey.js.map +1 -0
- package/dist/internal/SchemaAccessors.d.ts +6 -5
- package/dist/internal/SchemaAccessors.d.ts.map +1 -1
- package/dist/internal/SchemaAccessors.js +6 -5
- package/dist/internal/SchemaAccessors.js.map +1 -1
- package/dist/internal/ZOrderCurve.d.ts +256 -0
- package/dist/internal/ZOrderCurve.d.ts.map +1 -0
- package/dist/internal/ZOrderCurve.js +630 -0
- package/dist/internal/ZOrderCurve.js.map +1 -0
- package/dist/internal/ZOrderDimension.d.ts +70 -0
- package/dist/internal/ZOrderDimension.d.ts.map +1 -0
- package/dist/internal/ZOrderDimension.js +283 -0
- package/dist/internal/ZOrderDimension.js.map +1 -0
- package/package.json +1 -1
package/dist/ZOrder.d.ts
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZOrder — the dimensions of a Z-order sort key (#171).
|
|
3
|
+
*
|
|
4
|
+
* A Z-order index interleaves the bits of several model fields into one binary
|
|
5
|
+
* sort key, so a query can bound any of them (`.within()`) and read a few key
|
|
6
|
+
* ranges instead of a whole partition. Declare it on a secondary index's sort
|
|
7
|
+
* key, one entry per dimension:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* search: {
|
|
11
|
+
* name: "gsi2",
|
|
12
|
+
* pk: { field: "gsi2pk", composite: ["region"] },
|
|
13
|
+
* sk: {
|
|
14
|
+
* field: "gsi2sk",
|
|
15
|
+
* prefix: ["agencyId"],
|
|
16
|
+
* zorder: [
|
|
17
|
+
* { field: "price", min: 0, max: 5_000_000, step: 1_000 },
|
|
18
|
+
* { field: "bedrooms", min: 0, max: 15 },
|
|
19
|
+
* { field: "listedAt", from: "2024-01-01", unit: "hours", bits: 16 },
|
|
20
|
+
* "status",
|
|
21
|
+
* ],
|
|
22
|
+
* },
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* An entry names a model field, and the field's type decides which options it
|
|
27
|
+
* takes ({@link DimensionFor}): a number or bigint field a range, a date field
|
|
28
|
+
* a time window, a literal union its members (a bare name takes them in the
|
|
29
|
+
* schema's order), a string field a byte width. `Entity.make` types each entry
|
|
30
|
+
* from the model, so a misspelled field, a misspelled option or an option of
|
|
31
|
+
* another kind is a compile error; at runtime it checks the options
|
|
32
|
+
* (`[EDD-9087]`) and the field
|
|
33
|
+
* (`[EDD-9088]`). Declaration order is interleave priority.
|
|
34
|
+
*
|
|
35
|
+
* This module holds the types only. The curve algebra (interleaving, range
|
|
36
|
+
* planning) is internal.
|
|
37
|
+
*/
|
|
38
|
+
import type { DateTime } from "effect";
|
|
39
|
+
/** The ways a field's values map onto levels. */
|
|
40
|
+
export type DimensionKind = "int" | "float" | "dateTime" | "literals" | "string";
|
|
41
|
+
/** The level width of a date-time dimension. */
|
|
42
|
+
export type DateTimeUnit = "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks";
|
|
43
|
+
/** A literal member of a literals dimension. */
|
|
44
|
+
export type LiteralValue = string | number | boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A dimension over a `number` or `bigint` field: `min`..`max` in steps of
|
|
47
|
+
* `step` (default 1). Values below `min` or above `max` share the edge levels,
|
|
48
|
+
* and the exact bound check on each read keeps results exact. A `bigint` field
|
|
49
|
+
* takes integer options and is quantized in `bigint` arithmetic.
|
|
50
|
+
*/
|
|
51
|
+
export interface NumericDimension<F extends string = string> {
|
|
52
|
+
readonly field: F;
|
|
53
|
+
readonly min: number;
|
|
54
|
+
readonly max: number;
|
|
55
|
+
readonly step?: number | undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A dimension over a date field: `2^bits` levels of one `unit` each, starting
|
|
59
|
+
* at `from`. Instants before `from` or past the last level share the edge
|
|
60
|
+
* levels. The field must have a known storage format (a `DynamoModel` date
|
|
61
|
+
* schema or an Effect date schema), so its order is known.
|
|
62
|
+
*/
|
|
63
|
+
export interface DateTimeDimension<F extends string = string> {
|
|
64
|
+
readonly field: F;
|
|
65
|
+
readonly from: string | Date | DateTime.DateTime;
|
|
66
|
+
readonly unit: DateTimeUnit;
|
|
67
|
+
readonly bits: number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A dimension over a literal union (or `boolean`) field, one level per member.
|
|
71
|
+
* Without `values` the levels follow the schema's member order (`false`, `true`
|
|
72
|
+
* for a boolean); `values` reorders them, and must list every member. Ranges
|
|
73
|
+
* (`{ gte: "b" }`) mean "at or after `b` in this order". `bits` reserves room
|
|
74
|
+
* for members added later: adding one keeps stored addresses valid only while
|
|
75
|
+
* it fits the declared width.
|
|
76
|
+
*
|
|
77
|
+
* A plain `string` field takes one too, with `values` listed
|
|
78
|
+
* ({@link ListedLiteralsDimension}); writing a value outside them fails. A
|
|
79
|
+
* plain `number` field doesn't: it takes a range ({@link NumericDimension}),
|
|
80
|
+
* whose order is the numbers' own.
|
|
81
|
+
*/
|
|
82
|
+
export interface LiteralsDimension<F extends string = string, L = LiteralValue> {
|
|
83
|
+
readonly field: F;
|
|
84
|
+
readonly values?: ReadonlyArray<L> | undefined;
|
|
85
|
+
readonly bits?: number | undefined;
|
|
86
|
+
}
|
|
87
|
+
/** A {@link LiteralsDimension} whose `values` are required: over a plain `string` field. */
|
|
88
|
+
export interface ListedLiteralsDimension<F extends string = string, L = LiteralValue> extends LiteralsDimension<F, L> {
|
|
89
|
+
readonly values: ReadonlyArray<L>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A dimension over a string field: the first `bytes` (1..16) UTF-8 bytes of
|
|
93
|
+
* the value, in byte order — the order DynamoDB sorts strings in. Values
|
|
94
|
+
* sharing those bytes share a level.
|
|
95
|
+
*/
|
|
96
|
+
export interface StringDimension<F extends string = string> {
|
|
97
|
+
readonly field: F;
|
|
98
|
+
readonly bytes: number;
|
|
99
|
+
}
|
|
100
|
+
/** Any dimension entry, as `Entity.make` reads it at runtime. */
|
|
101
|
+
export type AnyDimension = string | NumericDimension | DateTimeDimension | LiteralsDimension | StringDimension;
|
|
102
|
+
type HasExtraKeys<M, P> = [Exclude<keyof M, keyof P>] extends [never] ? false : true;
|
|
103
|
+
/** A member that is a whole primitive type (`string`, a branded `number`, …), not a literal. */
|
|
104
|
+
type IsWide<M> = M extends string ? string extends M ? true : HasExtraKeys<M, string> : M extends number ? number extends M ? true : HasExtraKeys<M, number> : M extends bigint ? bigint extends M ? true : HasExtraKeys<M, bigint> : M extends boolean ? false : true;
|
|
105
|
+
/** Is `V` a union of literal members (`boolean` included)? */
|
|
106
|
+
type IsLiterals<V> = true extends (V extends unknown ? IsWide<V> : never) ? false : true;
|
|
107
|
+
/**
|
|
108
|
+
* The entries a dimension over field `F`, of model type `V`, takes:
|
|
109
|
+
*
|
|
110
|
+
* | Field type | Entry |
|
|
111
|
+
* |---|---|
|
|
112
|
+
* | `number` | {@link NumericDimension} |
|
|
113
|
+
* | `bigint` | {@link NumericDimension} |
|
|
114
|
+
* | a date (`DateTime`, `Date`) | {@link DateTimeDimension} |
|
|
115
|
+
* | a string literal union | `F`, {@link LiteralsDimension} or {@link StringDimension} |
|
|
116
|
+
* | a number literal union | `F`, {@link LiteralsDimension} or {@link NumericDimension} |
|
|
117
|
+
* | `boolean`, or a mixed literal union | `F` or {@link LiteralsDimension} |
|
|
118
|
+
* | `string` | {@link StringDimension} or {@link ListedLiteralsDimension} |
|
|
119
|
+
*
|
|
120
|
+
* Any other field (an object, an array) takes none. A field whose type is
|
|
121
|
+
* unknown takes any entry, and `Entity.make` checks it at runtime.
|
|
122
|
+
*/
|
|
123
|
+
export type DimensionFor<F extends string, V> = unknown extends V ? AnyDimensionOf<F> : DimensionOf<F, Exclude<V, undefined | null>>;
|
|
124
|
+
type AnyDimensionOf<F extends string> = F | NumericDimension<F> | DateTimeDimension<F> | LiteralsDimension<F> | StringDimension<F>;
|
|
125
|
+
type DimensionOf<F extends string, V> = [V] extends [never] ? never : [V] extends [DateTime.DateTime | Date] ? DateTimeDimension<F> : [V] extends [number | bigint] ? IsLiterals<V> extends true ? F | LiteralsDimension<F, V> | NumericDimension<F> : NumericDimension<F> : [V] extends [string] ? IsLiterals<V> extends true ? F | LiteralsDimension<F, V> | StringDimension<F> : StringDimension<F> | ListedLiteralsDimension<F, string> : [V] extends [LiteralValue] ? IsLiterals<V> extends true ? F | LiteralsDimension<F, V> : never : never;
|
|
126
|
+
/**
|
|
127
|
+
* The dimension entries of a model with fields `TFields` (field name → model
|
|
128
|
+
* type): for each field, the entries its type takes ({@link DimensionFor}).
|
|
129
|
+
*/
|
|
130
|
+
export type Dimension<TFields = Record<string, unknown>> = {
|
|
131
|
+
readonly [F in keyof TFields & string]-?: DimensionFor<F, TFields[F]>;
|
|
132
|
+
}[keyof TFields & string];
|
|
133
|
+
/**
|
|
134
|
+
* A sort-key prefix composite: matched exactly, in front of the address. A
|
|
135
|
+
* bare name is stored length-prefixed; `{ field, hash: n }` stores the first
|
|
136
|
+
* `n` bytes (1..8) of its FNV-1a-64 hash, which keeps long values short.
|
|
137
|
+
*/
|
|
138
|
+
export type PrefixPart<F extends string = string> = F | {
|
|
139
|
+
readonly field: F;
|
|
140
|
+
readonly hash: number;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* @internal A dimension's declaration as plain data, resolved against its
|
|
144
|
+
* field — what the stored layout depends on, for fingerprints and `explain`.
|
|
145
|
+
*/
|
|
146
|
+
export type DimensionSpec = {
|
|
147
|
+
readonly kind: "int" | "float";
|
|
148
|
+
readonly field: string;
|
|
149
|
+
readonly min: number;
|
|
150
|
+
readonly max: number;
|
|
151
|
+
readonly step: number;
|
|
152
|
+
readonly bits: number;
|
|
153
|
+
} | {
|
|
154
|
+
readonly kind: "dateTime";
|
|
155
|
+
readonly field: string;
|
|
156
|
+
/** `from` as an ISO instant. */
|
|
157
|
+
readonly from: string;
|
|
158
|
+
readonly fromMs: number;
|
|
159
|
+
readonly unit: DateTimeUnit;
|
|
160
|
+
readonly bits: number;
|
|
161
|
+
} | {
|
|
162
|
+
readonly kind: "literals";
|
|
163
|
+
readonly field: string;
|
|
164
|
+
readonly values: ReadonlyArray<LiteralValue>;
|
|
165
|
+
readonly bits: number;
|
|
166
|
+
} | {
|
|
167
|
+
readonly kind: "string";
|
|
168
|
+
readonly field: string;
|
|
169
|
+
readonly bytes: number;
|
|
170
|
+
readonly bits: number;
|
|
171
|
+
};
|
|
172
|
+
export {};
|
|
173
|
+
//# sourceMappingURL=ZOrder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZOrder.d.ts","sourceRoot":"","sources":["../src/ZOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEtC,iDAAiD;AACjD,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEhF,gDAAgD;AAChD,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAE9F,gDAAgD;AAChD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACzD,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;IACjB,QAAQ,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I,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpG;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB;IACE,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAA;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gCAAgC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAA"}
|
package/dist/ZOrder.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZOrder — the dimensions of a Z-order sort key (#171).
|
|
3
|
+
*
|
|
4
|
+
* A Z-order index interleaves the bits of several model fields into one binary
|
|
5
|
+
* sort key, so a query can bound any of them (`.within()`) and read a few key
|
|
6
|
+
* ranges instead of a whole partition. Declare it on a secondary index's sort
|
|
7
|
+
* key, one entry per dimension:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* search: {
|
|
11
|
+
* name: "gsi2",
|
|
12
|
+
* pk: { field: "gsi2pk", composite: ["region"] },
|
|
13
|
+
* sk: {
|
|
14
|
+
* field: "gsi2sk",
|
|
15
|
+
* prefix: ["agencyId"],
|
|
16
|
+
* zorder: [
|
|
17
|
+
* { field: "price", min: 0, max: 5_000_000, step: 1_000 },
|
|
18
|
+
* { field: "bedrooms", min: 0, max: 15 },
|
|
19
|
+
* { field: "listedAt", from: "2024-01-01", unit: "hours", bits: 16 },
|
|
20
|
+
* "status",
|
|
21
|
+
* ],
|
|
22
|
+
* },
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* An entry names a model field, and the field's type decides which options it
|
|
27
|
+
* takes ({@link DimensionFor}): a number or bigint field a range, a date field
|
|
28
|
+
* a time window, a literal union its members (a bare name takes them in the
|
|
29
|
+
* schema's order), a string field a byte width. `Entity.make` types each entry
|
|
30
|
+
* from the model, so a misspelled field, a misspelled option or an option of
|
|
31
|
+
* another kind is a compile error; at runtime it checks the options
|
|
32
|
+
* (`[EDD-9087]`) and the field
|
|
33
|
+
* (`[EDD-9088]`). Declaration order is interleave priority.
|
|
34
|
+
*
|
|
35
|
+
* This module holds the types only. The curve algebra (interleaving, range
|
|
36
|
+
* planning) is internal.
|
|
37
|
+
*/
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=ZOrder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZOrder.js","sourceRoot":"","sources":["../src/ZOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -27,12 +27,14 @@ export type { EmbedderService } from "./Embedder.js";
|
|
|
27
27
|
export { Embedder } from "./Embedder.js";
|
|
28
28
|
export type { AnyRefValue, EntityDefinition, EntityDefinition as EntityType, } from "./Entity.js";
|
|
29
29
|
export * as Entity from "./Entity.js";
|
|
30
|
-
export { AdditionalItemConditionFailed, AggregateAssemblyError, AggregateDecompositionError, AggregateTransactionOverflow, AppendTooLarge, CascadePartialFailure, CompositeKeyHoleError, CompositeNullableError, CompressorNotRegistered, ConcurrentModification, ConditionalCheckFailed, DeleteAppliedButUnreadable, DuplicateCommand, DynamoError, DynamoValidationError, EmbeddingError, InternalServerError, ItemDeleted, ItemNotDeleted, ItemNotFound, makeCompositeKeyHoleError, makeCompositeNullableError, OptimisticLockError, ProjectionSourceConflict, RefNotFound, ResourceNotFoundError, StaleAppend, StreamRecordIdentifierMissing, StreamSealed, ThrottlingError, TRANSACT_WRITE_ITEMS_LIMIT, TransactionCancelled, TransactionOverflow, UniqueConstraintViolation, UpdateAppliedButUnreadable, ValidationError, VectorIndexBackfilling, VersionConflict, } from "./Errors.js";
|
|
30
|
+
export { AdditionalItemConditionFailed, AggregateAssemblyError, AggregateDecompositionError, AggregateTransactionOverflow, AppendTooLarge, CascadePartialFailure, CompositeKeyHoleError, CompositeNullableError, CompressorNotRegistered, ConcurrentModification, ConditionalCheckFailed, DeleteAppliedButUnreadable, DuplicateCommand, DynamoError, DynamoValidationError, EmbeddingError, InternalServerError, ItemDeleted, ItemNotDeleted, ItemNotFound, ItemNotMoved, makeCompositeKeyHoleError, makeCompositeNullableError, OptimisticLockError, ProjectionSourceConflict, RefNotFound, ResourceNotFoundError, StaleAppend, StreamRecordIdentifierMissing, StreamSealed, ThrottlingError, TRANSACT_WRITE_ITEMS_LIMIT, TransactionCancelled, TransactionOverflow, UniqueConstraintViolation, UpdateAppliedButUnreadable, ValidationError, VectorIndexBackfilling, VersionConflict, } from "./Errors.js";
|
|
31
31
|
export type { AppendInputType, AppendSuccess, EntityInputType, EntityKeyType, EntityRecordType, EntityRefInputType, EntityRefUpdateType, EntityUpdateType, IndexPkComposites, IndexPkInput, IndexSkComposites, ModelType, PrimaryKeyComposites, RefErrors, SystemFieldsType, VectorErrors, } from "./internal/EntityTypes.js";
|
|
32
|
-
export type { GsiConfig, IndexDefinition, KeyPart } from "./KeyComposer.js";
|
|
32
|
+
export type { GsiConfig, IndexDefinition, KeyPart, KeyValue, ZOrderKeyPart, ZOrderSkPart, } from "./KeyComposer.js";
|
|
33
33
|
export * as KeyComposer from "./KeyComposer.js";
|
|
34
34
|
export type { ProjectionResult } from "./Projection.js";
|
|
35
35
|
export * as Projection from "./Projection.js";
|
|
36
36
|
export type { DistanceFunction, Similarity, VectorFilterInput, VectorFilterOperand, VectorIndexConfig, VectorIndexDefinition, VectorSourceConfig, } from "./VectorIndex.js";
|
|
37
37
|
export * as VectorIndex from "./VectorIndex.js";
|
|
38
|
+
export type * as ZOrder from "./ZOrder.js";
|
|
39
|
+
export type { AnyDimension, DateTimeDimension, DateTimeUnit, Dimension, DimensionFor, DimensionKind, ListedLiteralsDimension, LiteralsDimension, LiteralValue, NumericDimension, PrefixPart, StringDimension, } from "./ZOrder.js";
|
|
38
40
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,IAAI,UAAU,GAC/B,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EAChB,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,6BAA6B,EAC7B,YAAY,EACZ,eAAe,EACf,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,eAAe,EACf,aAAa,EACb,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EAChB,YAAY,GACb,MAAM,2BAA2B,CAAA;AAClC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,YAAY,EAAE,mBAAmB,EAAE,cAAc,E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AChB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EAChB,YAAY,GACb,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,aAAa,EACb,YAAY,GACb,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,YAAY,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,eAAe,GAChB,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export * as DynamoModel from "./DynamoModel.js";
|
|
|
22
22
|
export * as DynamoSchema from "./DynamoSchema.js";
|
|
23
23
|
export { Embedder } from "./Embedder.js";
|
|
24
24
|
export * as Entity from "./Entity.js";
|
|
25
|
-
export { AdditionalItemConditionFailed, AggregateAssemblyError, AggregateDecompositionError, AggregateTransactionOverflow, AppendTooLarge, CascadePartialFailure, CompositeKeyHoleError, CompositeNullableError, CompressorNotRegistered, ConcurrentModification, ConditionalCheckFailed, DeleteAppliedButUnreadable, DuplicateCommand, DynamoError, DynamoValidationError, EmbeddingError, InternalServerError, ItemDeleted, ItemNotDeleted, ItemNotFound, makeCompositeKeyHoleError, makeCompositeNullableError, OptimisticLockError, ProjectionSourceConflict, RefNotFound, ResourceNotFoundError, StaleAppend, StreamRecordIdentifierMissing, StreamSealed, ThrottlingError, TRANSACT_WRITE_ITEMS_LIMIT, TransactionCancelled, TransactionOverflow, UniqueConstraintViolation, UpdateAppliedButUnreadable, ValidationError, VectorIndexBackfilling, VersionConflict, } from "./Errors.js";
|
|
25
|
+
export { AdditionalItemConditionFailed, AggregateAssemblyError, AggregateDecompositionError, AggregateTransactionOverflow, AppendTooLarge, CascadePartialFailure, CompositeKeyHoleError, CompositeNullableError, CompressorNotRegistered, ConcurrentModification, ConditionalCheckFailed, DeleteAppliedButUnreadable, DuplicateCommand, DynamoError, DynamoValidationError, EmbeddingError, InternalServerError, ItemDeleted, ItemNotDeleted, ItemNotFound, ItemNotMoved, makeCompositeKeyHoleError, makeCompositeNullableError, OptimisticLockError, ProjectionSourceConflict, RefNotFound, ResourceNotFoundError, StaleAppend, StreamRecordIdentifierMissing, StreamSealed, ThrottlingError, TRANSACT_WRITE_ITEMS_LIMIT, TransactionCancelled, TransactionOverflow, UniqueConstraintViolation, UpdateAppliedButUnreadable, ValidationError, VectorIndexBackfilling, VersionConflict, } from "./Errors.js";
|
|
26
26
|
export * as KeyComposer from "./KeyComposer.js";
|
|
27
27
|
export * as Projection from "./Projection.js";
|
|
28
28
|
export * as VectorIndex from "./VectorIndex.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA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EAChB,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,6BAA6B,EAC7B,YAAY,EACZ,eAAe,EACf,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,eAAe,GAChB,MAAM,aAAa,CAAA;AA2BpB,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAU7C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA"}
|
|
@@ -44,7 +44,18 @@ export interface RefEntity<M extends Schema.Top = Schema.Top, TIndexes = unknown
|
|
|
44
44
|
*/
|
|
45
45
|
export interface OneEdge<E extends RefEntity = RefEntity> {
|
|
46
46
|
readonly _tag: "OneEdge";
|
|
47
|
-
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated The name given to the deprecated `one(name, config)` form. It
|
|
49
|
+
* is not read: the `edges` key names the edge. Absent from `one(config)`;
|
|
50
|
+
* removed in the next major release.
|
|
51
|
+
*/
|
|
52
|
+
readonly name?: string;
|
|
53
|
+
readonly entityType: string;
|
|
54
|
+
readonly entity?: E;
|
|
55
|
+
readonly discriminator?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
/** Configuration for a one edge */
|
|
58
|
+
export interface OneEdgeConfig<E extends RefEntity = RefEntity> {
|
|
48
59
|
readonly entityType: string;
|
|
49
60
|
readonly entity?: E;
|
|
50
61
|
readonly discriminator?: Record<string, unknown>;
|
|
@@ -54,6 +65,10 @@ export interface ManyEdgeConfig<E extends RefEntity = RefEntity> {
|
|
|
54
65
|
readonly entityType: string;
|
|
55
66
|
readonly entity?: E;
|
|
56
67
|
readonly inputField?: string;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Not read: it changes nothing an edge item stores or returns.
|
|
70
|
+
* Leave it out; it is removed in the next major release.
|
|
71
|
+
*/
|
|
57
72
|
readonly edgeAttributes?: ReadonlyArray<string>;
|
|
58
73
|
readonly sk?: {
|
|
59
74
|
readonly composite: ReadonlyArray<string>;
|
|
@@ -69,10 +84,16 @@ export interface ManyEdgeConfig<E extends RefEntity = RefEntity> {
|
|
|
69
84
|
*/
|
|
70
85
|
export interface ManyEdge<E extends RefEntity = RefEntity> {
|
|
71
86
|
readonly _tag: "ManyEdge";
|
|
72
|
-
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated The name given to the deprecated `many(name, config)` form. It
|
|
89
|
+
* is not read: the `edges` key names the edge. Absent from `many(config)`;
|
|
90
|
+
* removed in the next major release.
|
|
91
|
+
*/
|
|
92
|
+
readonly name?: string;
|
|
73
93
|
readonly entityType: string;
|
|
74
94
|
readonly entity?: E;
|
|
75
95
|
readonly inputField?: string;
|
|
96
|
+
/** @deprecated Not read; see {@link ManyEdgeConfig.edgeAttributes}. */
|
|
76
97
|
readonly edgeAttributes?: ReadonlyArray<string>;
|
|
77
98
|
readonly sk?: {
|
|
78
99
|
readonly composite: ReadonlyArray<string>;
|
|
@@ -93,24 +114,72 @@ export interface RefEdge<E extends RefEntity = RefEntity> {
|
|
|
93
114
|
/** Union of edge types */
|
|
94
115
|
export type AggregateEdge = OneEdge<any> | ManyEdge<any> | RefEdge<any>;
|
|
95
116
|
/**
|
|
96
|
-
* Create a one-to-one edge descriptor.
|
|
117
|
+
* Create a one-to-one edge descriptor. The `edges` key it is declared under
|
|
118
|
+
* names the schema field it decomposes.
|
|
97
119
|
*
|
|
98
120
|
* Generic over the referenced entity `E` so the entity's branded primary-key
|
|
99
121
|
* identifier flows into the derived aggregate input/update types. When `entity`
|
|
100
122
|
* is omitted, `E` defaults to `RefEntity` and the edge id falls back to `string`.
|
|
101
123
|
*/
|
|
102
|
-
export declare
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
export declare function
|
|
124
|
+
export declare function one<const E extends RefEntity = RefEntity>(config: OneEdgeConfig<E>): OneEdge<E>;
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated The name is not read: the `edges` key names the edge. Use
|
|
127
|
+
* `Aggregate.one(config)`; the `(name, config)` form is removed in the next
|
|
128
|
+
* major release.
|
|
129
|
+
*/
|
|
130
|
+
export declare function one<const E extends RefEntity = RefEntity>(name: string, config: OneEdgeConfig<E>): OneEdge<E>;
|
|
131
|
+
/**
|
|
132
|
+
* The declared `sk.composite` of a many edge, kept on its type so
|
|
133
|
+
* `Aggregate.make` can check each name against the edge field's element
|
|
134
|
+
* (`ManyEdgeSkPaths`); nothing when none is declared.
|
|
135
|
+
*/
|
|
136
|
+
export type ManyEdgeSk<SK> = [SK] extends [never] ? {} : {
|
|
137
|
+
readonly sk: {
|
|
138
|
+
readonly composite: SK;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Create a one-to-many edge descriptor. The `edges` key it is declared under
|
|
143
|
+
* names the schema field it decomposes. `sk.composite` names attributes of the
|
|
144
|
+
* edge field's element (a dotted path reaches into a hydrated ref:
|
|
145
|
+
* `"umpire.id"`); `Aggregate.make` checks them against its schema.
|
|
146
|
+
*/
|
|
147
|
+
export declare function many<const E extends RefEntity, const IF extends string, const SK extends ReadonlyArray<string> = never>(config: ManyEdgeConfig<E> & {
|
|
109
148
|
readonly inputField: IF;
|
|
149
|
+
readonly sk?: {
|
|
150
|
+
readonly composite: SK;
|
|
151
|
+
};
|
|
110
152
|
}): ManyEdge<E> & {
|
|
111
153
|
readonly inputField: IF;
|
|
112
|
-
}
|
|
113
|
-
export declare function many<const E extends RefEntity
|
|
154
|
+
} & ManyEdgeSk<SK>;
|
|
155
|
+
export declare function many<const E extends RefEntity, const SK extends ReadonlyArray<string> = never>(config: ManyEdgeConfig<E> & {
|
|
156
|
+
readonly sk?: {
|
|
157
|
+
readonly composite: SK;
|
|
158
|
+
};
|
|
159
|
+
}): ManyEdge<E> & ManyEdgeSk<SK>;
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated The name is not read: the `edges` key names the edge. Use
|
|
162
|
+
* `Aggregate.many(config)`; the `(name, config)` form is removed in the next
|
|
163
|
+
* major release.
|
|
164
|
+
*/
|
|
165
|
+
export declare function many<const E extends RefEntity, const IF extends string, const SK extends ReadonlyArray<string> = never>(name: string, config: ManyEdgeConfig<E> & {
|
|
166
|
+
readonly inputField: IF;
|
|
167
|
+
readonly sk?: {
|
|
168
|
+
readonly composite: SK;
|
|
169
|
+
};
|
|
170
|
+
}): ManyEdge<E> & {
|
|
171
|
+
readonly inputField: IF;
|
|
172
|
+
} & ManyEdgeSk<SK>;
|
|
173
|
+
/**
|
|
174
|
+
* @deprecated The name is not read: the `edges` key names the edge. Use
|
|
175
|
+
* `Aggregate.many(config)`; the `(name, config)` form is removed in the next
|
|
176
|
+
* major release.
|
|
177
|
+
*/
|
|
178
|
+
export declare function many<const E extends RefEntity, const SK extends ReadonlyArray<string> = never>(name: string, config: ManyEdgeConfig<E> & {
|
|
179
|
+
readonly sk?: {
|
|
180
|
+
readonly composite: SK;
|
|
181
|
+
};
|
|
182
|
+
}): ManyEdge<E> & ManyEdgeSk<SK>;
|
|
114
183
|
/**
|
|
115
184
|
* Create a ref edge descriptor — no decomposition, hydrates via entity, data
|
|
116
185
|
* stays inline. Generic over `E` so the entity's branded identifier flows into
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateEdges.d.ts","sourceRoot":"","sources":["../../src/internal/AggregateEdges.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAMpC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,GAA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GAAG,CAA4B,CAAA"}
|
|
@@ -3,29 +3,25 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extracted from Aggregate.ts for decomposition. Not part of the public API.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
...(config.entity !== undefined && { entity: config.entity }),
|
|
23
|
-
...(config.discriminator !== undefined && { discriminator: config.discriminator }),
|
|
24
|
-
});
|
|
25
|
-
export function many(name, config) {
|
|
6
|
+
export function one(nameOrConfig, legacy) {
|
|
7
|
+
const named = typeof nameOrConfig === "string";
|
|
8
|
+
const config = named ? legacy : nameOrConfig;
|
|
9
|
+
return {
|
|
10
|
+
_tag: "OneEdge",
|
|
11
|
+
...(named && { name: nameOrConfig }),
|
|
12
|
+
entityType: config.entityType,
|
|
13
|
+
// Spread rather than assign: under `exactOptionalPropertyTypes` an absent
|
|
14
|
+
// optional field must stay absent, not be set to an explicit `undefined`.
|
|
15
|
+
...(config.entity !== undefined && { entity: config.entity }),
|
|
16
|
+
...(config.discriminator !== undefined && { discriminator: config.discriminator }),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function many(nameOrConfig, legacy) {
|
|
20
|
+
const named = typeof nameOrConfig === "string";
|
|
21
|
+
const config = named ? legacy : nameOrConfig;
|
|
26
22
|
return {
|
|
27
23
|
_tag: "ManyEdge",
|
|
28
|
-
name,
|
|
24
|
+
...(named && { name: nameOrConfig }),
|
|
29
25
|
entityType: config.entityType,
|
|
30
26
|
...(config.entity !== undefined && { entity: config.entity }),
|
|
31
27
|
...(config.inputField !== undefined && { inputField: config.inputField }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateEdges.js","sourceRoot":"","sources":["../../src/intern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,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC;QACzE,GAAG,CAAC,MAAM,CAAC,cAAc,KAAK,SAAS,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC;QACrF,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,SAAS,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QACjD,GAAG,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;QACnE,GAAG,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;KACvE,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAA4B,MAAS,EAAc,EAAE,CAAC,CAAC;IACxE,IAAI,EAAE,SAAS;IACf,MAAM;CACP,CAAC,CAAA;AAEF,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAmB,EAAwB,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAA;AAC/F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAmB,EAAyB,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAA;AAClG,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAmB,EAAwB,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAA"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extracted from Aggregate.ts for decomposition. Not part of the public API.
|
|
5
5
|
*/
|
|
6
|
-
import type { Schema } from "effect";
|
|
6
|
+
import type { DateTime, Schema } from "effect";
|
|
7
7
|
import type { DiscriminatorConfig, UpdateContext } from "./AggregateCursor.js";
|
|
8
8
|
import type { AggregateEdge, ManyEdge, OneEdge, RefEdge, RefEntity } from "./AggregateEdges.js";
|
|
9
|
-
import type { RefEntityIdentifierValue } from "./EntityTypes.js";
|
|
9
|
+
import type { ModelFieldName, ModelFields, RefEntityIdentifierValue } from "./EntityTypes.js";
|
|
10
10
|
/**
|
|
11
11
|
* A composable sub-aggregate definition — a graph shape that can be embedded
|
|
12
12
|
* in a parent aggregate via `.with()`.
|
|
@@ -128,5 +128,54 @@ type _StripUndefined<T> = undefined extends T ? Exclude<T, undefined> : T;
|
|
|
128
128
|
type _Simplify<T> = T extends infer O ? {
|
|
129
129
|
[K in keyof O]: O[K];
|
|
130
130
|
} : never;
|
|
131
|
+
/**
|
|
132
|
+
* @internal An aggregate's `edges`: keyed by fields of its schema. The record
|
|
133
|
+
* half keeps it an edges record; the keyed half gives an editor the field
|
|
134
|
+
* names. {@link AggregateEdgesGuard} on the config refuses the rest.
|
|
135
|
+
*/
|
|
136
|
+
export type AggregateEdgesConfig<TSchema extends Schema.Top> = Record<string, AggregateEdge | BoundSubAggregate<any, any>> & {
|
|
137
|
+
readonly [K in ModelFieldName<TSchema>]?: AggregateEdge | BoundSubAggregate<any, any>;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* @internal Over the edges as written (`TEdges`): a key that is not a schema
|
|
141
|
+
* field is typed `never`, and a many edge whose `sk.composite` names a path its
|
|
142
|
+
* element lacks is typed with the paths it may name, so each error lands on
|
|
143
|
+
* that edge's key. A guard on the config rather than in `TEdges`'s constraint
|
|
144
|
+
* (the constraint naming its own parameter) keeps the editor's completions.
|
|
145
|
+
*/
|
|
146
|
+
export type AggregateEdgesGuard<TSchema extends Schema.Top, TEdges> = {
|
|
147
|
+
readonly [K in keyof TEdges as K extends ModelFieldName<TSchema> ? never : K]: never;
|
|
148
|
+
} & {
|
|
149
|
+
readonly [K in keyof TEdges & ModelFieldName<TSchema>]: ManyEdgeSkCheck<TEdges[K], ModelFields<TSchema>[K]>;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* The attribute paths of a many edge's element that `sk.composite` may name:
|
|
153
|
+
* its scalar fields, and the scalar fields one level into an object field (a
|
|
154
|
+
* hydrated ref: `"umpire.id"`) — not the object itself, which the runtime
|
|
155
|
+
* refuses as a non-scalar composite. Any name when the element's type is
|
|
156
|
+
* unknown.
|
|
157
|
+
*/
|
|
158
|
+
export type ManyEdgeSkPaths<TField> = unknown extends TField ? string : ElementPaths<NonNullable<TField> extends ReadonlyArray<infer El> ? El : never>;
|
|
159
|
+
/** A value a key composes from as one scalar: a primitive, or a date. */
|
|
160
|
+
type IsScalar<V> = V extends string | number | bigint | boolean ? true : V extends Date | DateTime.DateTime ? true : false;
|
|
161
|
+
/** A nested object whose fields a dotted path reaches (not a collection or a date). */
|
|
162
|
+
type IsRecordLike<V> = IsScalar<V> extends true ? false : V extends ReadonlyArray<unknown> | ReadonlySet<unknown> | ReadonlyMap<unknown, unknown> | Uint8Array | ((...args: ReadonlyArray<any>) => unknown) ? false : V extends object ? true : false;
|
|
163
|
+
type ScalarKeys<O> = {
|
|
164
|
+
readonly [K in keyof O & string]: IsScalar<NonNullable<O[K]>> extends true ? K : never;
|
|
165
|
+
}[keyof O & string];
|
|
166
|
+
type ElementPaths<El> = unknown extends El ? string : [El] extends [never] ? never : {
|
|
167
|
+
readonly [K in keyof El & string]: IsScalar<NonNullable<El[K]>> extends true ? K : IsRecordLike<NonNullable<El[K]>> extends true ? `${K}.${ScalarKeys<NonNullable<El[K]>>}` : never;
|
|
168
|
+
}[keyof El & string];
|
|
169
|
+
/** A many edge whose `sk.composite` names something its element lacks: the paths it may name. */
|
|
170
|
+
type ManyEdgeSkCheck<TEdge, TField> = TEdge extends {
|
|
171
|
+
readonly _tag: "ManyEdge";
|
|
172
|
+
readonly sk: {
|
|
173
|
+
readonly composite: infer C extends ReadonlyArray<string>;
|
|
174
|
+
};
|
|
175
|
+
} ? [Exclude<C[number], ManyEdgeSkPaths<TField>>] extends [never] ? unknown : {
|
|
176
|
+
readonly sk: {
|
|
177
|
+
readonly composite: ReadonlyArray<ManyEdgeSkPaths<TField>>;
|
|
178
|
+
};
|
|
179
|
+
} : unknown;
|
|
131
180
|
export {};
|
|
132
181
|
//# sourceMappingURL=AggregateTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateTypes.d.ts","sourceRoot":"","sources":["../../src/internal/AggregateTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"AggregateTypes.d.ts","sourceRoot":"","sources":["../../src/internal/AggregateTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAM7F;;;GAGG;AACH,MAAM,WAAW,YAAY,CAC3B,OAAO,SAAS,MAAM,CAAC,GAAG,EAC1B,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CACjF,MAAM,EACN,aAAa,GAAG,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAC5C;IAED,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C,QAAQ,CAAC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