@karmaniverous/entity-manager 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +37 -36
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EntityMap, TranscodeRegistry, ConditionalProperty, Exactify, PropertiesOfType, TranscodableProperties, FlattenEntityMap, Transcodes, MutuallyExclusive, NotNever, DefaultTranscodeRegistry, SortOrder } from '@karmaniverous/entity-tools';
|
|
2
|
-
import
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
import { z as z$1, ZodType } from 'zod';
|
|
3
4
|
import { BatchProcessOptions } from '@karmaniverous/batch-process';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -147,15 +148,15 @@ type EntityKey<CC extends BaseConfigMap> = Record<CC['HashKey'] | CC['RangeKey']
|
|
|
147
148
|
*/
|
|
148
149
|
type EntityToken<CC extends BaseConfigMap> = keyof Exactify<CC['EntityMap']> & string;
|
|
149
150
|
|
|
150
|
-
declare const configSchema: z.ZodObject<{
|
|
151
|
-
entities: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
152
|
-
defaultLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
153
|
-
defaultPageSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
154
|
-
shardBumps: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
155
|
-
timestamp: z.ZodNumber;
|
|
156
|
-
charBits: z.ZodNumber;
|
|
157
|
-
chars: z.ZodNumber;
|
|
158
|
-
}, z.core.$strict>>>>, z.ZodTransform<{
|
|
151
|
+
declare const configSchema: z$1.ZodObject<{
|
|
152
|
+
entities: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
153
|
+
defaultLimit: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodNumber>>;
|
|
154
|
+
defaultPageSize: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodNumber>>;
|
|
155
|
+
shardBumps: z$1.ZodPipe<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
156
|
+
timestamp: z$1.ZodNumber;
|
|
157
|
+
charBits: z$1.ZodNumber;
|
|
158
|
+
chars: z$1.ZodNumber;
|
|
159
|
+
}, z$1.core.$strict>>>>, z$1.ZodTransform<{
|
|
159
160
|
timestamp: number;
|
|
160
161
|
charBits: number;
|
|
161
162
|
chars: number;
|
|
@@ -164,36 +165,36 @@ declare const configSchema: z.ZodObject<{
|
|
|
164
165
|
charBits: number;
|
|
165
166
|
chars: number;
|
|
166
167
|
}[]>>;
|
|
167
|
-
timestampProperty: z.ZodString;
|
|
168
|
-
uniqueProperty: z.ZodString;
|
|
169
|
-
}, z.core.$strict>>>>;
|
|
170
|
-
generatedProperties: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
171
|
-
sharded: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
172
|
-
unsharded: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
173
|
-
}, z.core.$strip>>>;
|
|
174
|
-
hashKey: z.ZodString;
|
|
175
|
-
indexes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
176
|
-
hashKey: z.ZodString;
|
|
177
|
-
rangeKey: z.ZodString;
|
|
178
|
-
projections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
179
|
-
}, z.core.$strip>>>>;
|
|
180
|
-
generatedKeyDelimiter: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
181
|
-
generatedValueDelimiter: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
182
|
-
propertyTranscodes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
183
|
-
rangeKey: z.ZodString;
|
|
184
|
-
shardKeyDelimiter: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
185
|
-
throttle: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
186
|
-
transcodes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
187
|
-
encode: z.ZodCustom<unknown, unknown>;
|
|
188
|
-
decode: z.ZodCustom<unknown, unknown>;
|
|
189
|
-
}, z.core.$strict>>>>;
|
|
190
|
-
}, z.core.$strict>;
|
|
168
|
+
timestampProperty: z$1.ZodString;
|
|
169
|
+
uniqueProperty: z$1.ZodString;
|
|
170
|
+
}, z$1.core.$strict>>>>;
|
|
171
|
+
generatedProperties: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodObject<{
|
|
172
|
+
sharded: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodArray<z$1.ZodString>>>>;
|
|
173
|
+
unsharded: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodArray<z$1.ZodString>>>>;
|
|
174
|
+
}, z$1.core.$strip>>>;
|
|
175
|
+
hashKey: z$1.ZodString;
|
|
176
|
+
indexes: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
177
|
+
hashKey: z$1.ZodString;
|
|
178
|
+
rangeKey: z$1.ZodString;
|
|
179
|
+
projections: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
180
|
+
}, z$1.core.$strip>>>>;
|
|
181
|
+
generatedKeyDelimiter: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
|
|
182
|
+
generatedValueDelimiter: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
|
|
183
|
+
propertyTranscodes: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>>;
|
|
184
|
+
rangeKey: z$1.ZodString;
|
|
185
|
+
shardKeyDelimiter: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
|
|
186
|
+
throttle: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodNumber>>;
|
|
187
|
+
transcodes: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
188
|
+
encode: z$1.ZodCustom<unknown, unknown>;
|
|
189
|
+
decode: z$1.ZodCustom<unknown, unknown>;
|
|
190
|
+
}, z$1.core.$strict>>>>;
|
|
191
|
+
}, z$1.core.$strict>;
|
|
191
192
|
/**
|
|
192
193
|
* Simplified type taken on by a {@link Config | `Config`} object after parsing in the {@link EntityManager | `EntityManager`} constructor.
|
|
193
194
|
*
|
|
194
195
|
* @category EntityManager
|
|
195
196
|
*/
|
|
196
|
-
type ParsedConfig = z.infer<typeof configSchema>;
|
|
197
|
+
type ParsedConfig = z$1.infer<typeof configSchema>;
|
|
197
198
|
|
|
198
199
|
/**
|
|
199
200
|
* A partial {@link EntityItem | `EntityItem`} restricted to keys defined in `C`.
|
|
@@ -660,7 +661,7 @@ type TranscodedPropertiesFrom<CC> = CC extends {
|
|
|
660
661
|
type EntitiesFromSchema<CC> = CC extends {
|
|
661
662
|
entitiesSchema?: infer S;
|
|
662
663
|
} ? S extends Record<string, ZodType> ? {
|
|
663
|
-
[K in keyof S & string]: infer<S[K]>;
|
|
664
|
+
[K in keyof S & string]: z.infer<S[K]>;
|
|
664
665
|
} & EntityMap : EntityMap : EntityMap;
|
|
665
666
|
/**
|
|
666
667
|
* Derive the union of index token names from a values-first config input.
|
package/package.json
CHANGED