@karmaniverous/entity-manager 6.9.0 → 6.9.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 +13 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -384,6 +384,16 @@ declare const configSchema: z.ZodEffects<z.ZodObject<{
|
|
|
384
384
|
*/
|
|
385
385
|
type ParsedConfig = z.infer<typeof configSchema>;
|
|
386
386
|
|
|
387
|
+
/**
|
|
388
|
+
* A partial {@link EntityItem | `EntityItem`} restricted to keys defined in `C`.
|
|
389
|
+
*
|
|
390
|
+
* @typeParam C - {@link ConfigMap | `ConfigMap`} that defines an {@link Config | `EntityManager configuration`}'s {@link EntityMap | `EntityMap`}, key properties, and {@link TranscodeMap | `TranscodeMap`}. If omitted, defaults to {@link BaseConfigMap | `BaseConfigMap`}.
|
|
391
|
+
*
|
|
392
|
+
* @category QueryBuilder
|
|
393
|
+
* @protected
|
|
394
|
+
*/
|
|
395
|
+
type PageKey<C extends BaseConfigMap> = Pick<EntityItem<C>, C['HashKey'] | C['RangeKey'] | C['ShardedKeys'] | C['UnshardedKeys'] | C['TranscodedProperties']>;
|
|
396
|
+
|
|
387
397
|
/**
|
|
388
398
|
* A result returned by a {@link ShardQueryFunction | `ShardQueryFunction`} querying an individual shard.
|
|
389
399
|
*
|
|
@@ -398,7 +408,7 @@ interface ShardQueryResult<C extends BaseConfigMap> {
|
|
|
398
408
|
/** The returned records. */
|
|
399
409
|
items: EntityItem<C>[];
|
|
400
410
|
/** The page key for the next query on this shard. */
|
|
401
|
-
pageKey?:
|
|
411
|
+
pageKey?: PageKey<C>;
|
|
402
412
|
}
|
|
403
413
|
|
|
404
414
|
/**
|
|
@@ -407,7 +417,7 @@ interface ShardQueryResult<C extends BaseConfigMap> {
|
|
|
407
417
|
* This function will typically be composed dynamically to express a specific query index & logic. The arguments to this function will be provided by the {@link EntityManager.query | `EntityManager.query`} method, which assembles many returned pages queried across multiple shards into a single query result.
|
|
408
418
|
*
|
|
409
419
|
* @param hashKey - The hash key value of the shard being queried.
|
|
410
|
-
* @param pageKey - The
|
|
420
|
+
* @param pageKey - The {@link PageKey | `PageKey`} returned by the previous query on this shard.
|
|
411
421
|
* @param pageSize - The maximum number of items to return from this query.
|
|
412
422
|
*
|
|
413
423
|
* @typeParam C - {@link ConfigMap | `ConfigMap`} that defines an {@link Config | `EntityManager configuration`}'s {@link EntityMap | `EntityMap`}, key properties, and {@link TranscodeMap | `TranscodeMap`}. If omitted, defaults to {@link BaseConfigMap | `BaseConfigMap`}.
|
|
@@ -415,7 +425,7 @@ interface ShardQueryResult<C extends BaseConfigMap> {
|
|
|
415
425
|
* @category EntityManager
|
|
416
426
|
* @protected
|
|
417
427
|
*/
|
|
418
|
-
type ShardQueryFunction<C extends BaseConfigMap> = (hashKey: string, pageKey?:
|
|
428
|
+
type ShardQueryFunction<C extends BaseConfigMap> = (hashKey: string, pageKey?: PageKey<C>, pageSize?: number) => Promise<ShardQueryResult<C>>;
|
|
419
429
|
|
|
420
430
|
/**
|
|
421
431
|
* Relates a specific index token to a {@link ShardQueryFunction | `ShardQueryFunction`} to be performed on that index.
|
|
@@ -698,14 +708,4 @@ type ConfigMap<M extends Partial<BaseConfigMap> = Partial<BaseConfigMap>> = Vali
|
|
|
698
708
|
TranscodeMap: 'TranscodeMap' extends keyof M ? NonNullable<M['TranscodeMap']> : DefaultTranscodeMap;
|
|
699
709
|
}>;
|
|
700
710
|
|
|
701
|
-
/**
|
|
702
|
-
* A partial {@link EntityItem | `EntityItem`} restricted to keys defined in `C`.
|
|
703
|
-
*
|
|
704
|
-
* @typeParam C - {@link ConfigMap | `ConfigMap`} that defines an {@link Config | `EntityManager configuration`}'s {@link EntityMap | `EntityMap`}, key properties, and {@link TranscodeMap | `TranscodeMap`}. If omitted, defaults to {@link BaseConfigMap | `BaseConfigMap`}.
|
|
705
|
-
*
|
|
706
|
-
* @category QueryBuilder
|
|
707
|
-
* @protected
|
|
708
|
-
*/
|
|
709
|
-
type PageKey<C extends BaseConfigMap> = Pick<EntityItem<C>, C['HashKey'] | C['RangeKey'] | C['ShardedKeys'] | C['UnshardedKeys'] | C['TranscodedProperties']>;
|
|
710
|
-
|
|
711
711
|
export { type BaseConfigMap, BaseEntityClient, type BaseEntityClientOptions, BaseQueryBuilder, type BaseQueryBuilderOptions, type Config, type ConfigMap, type EntityItem, EntityManager, type EntityToken, type PageKey, type ParsedConfig, type QueryBuilderQueryOptions, type QueryOptions, type QueryResult, type ShardBump, type ShardQueryFunction, type ShardQueryMap, type ShardQueryResult, type ValidateConfigMap };
|
package/package.json
CHANGED