@karmaniverous/entity-manager 7.1.1 → 7.2.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/index.d.ts +8 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -763,6 +763,10 @@ declare abstract class BaseEntityClient<CC extends BaseConfigMap> {
|
|
|
763
763
|
constructor(options: BaseEntityClientOptions<CC>);
|
|
764
764
|
}
|
|
765
765
|
|
|
766
|
+
type ConfigOfClient<EC> = EC extends BaseEntityClient<infer CC> ? CC : never;
|
|
767
|
+
type EntityClientRecordByToken<EC, ET extends EntityToken<ConfigOfClient<EC>>> = EntityRecordByToken<ConfigOfClient<EC>, ET>;
|
|
768
|
+
type EntityClientItemByToken<EC, ET extends EntityToken<ConfigOfClient<EC>>> = EntityItemByToken<ConfigOfClient<EC>, ET>;
|
|
769
|
+
|
|
766
770
|
/**
|
|
767
771
|
* Constructor options for {@link BaseQueryBuilder | `BaseQueryBuilder`}.
|
|
768
772
|
*
|
|
@@ -788,10 +792,11 @@ interface BaseQueryBuilderOptions<CC extends BaseConfigMap, EntityClient extends
|
|
|
788
792
|
* Same as {@link QueryOptions | `QueryOptions`} for {@link EntityManager.query | `EntityManager.query`}, excluding `entityToken`, `pageKeyMap`, and `shardQueryMap`.
|
|
789
793
|
*
|
|
790
794
|
* @typeParam CC - {@link ConfigMap | `ConfigMap`} that defines an {@link Config | `EntityManager configuration`}'s {@link EntityMap | `EntityMap`}, key properties, and {@link TranscodeRegistry | `TranscodeRegistry`}. If omitted, defaults to {@link BaseConfigMap | `BaseConfigMap`}.
|
|
795
|
+
* @typeParam ET - Entity token narrowing the item types for options.item.
|
|
791
796
|
*
|
|
792
797
|
* @category QueryBuilder
|
|
793
798
|
*/
|
|
794
|
-
type QueryBuilderQueryOptions<CC extends BaseConfigMap, CF = unknown> = Omit<QueryOptions<CC,
|
|
799
|
+
type QueryBuilderQueryOptions<CC extends BaseConfigMap, ET extends EntityToken<CC>, CF = unknown> = Omit<QueryOptions<CC, ET, string, CF>, 'entityToken' | 'pageKeyMap' | 'shardQueryMap'>;
|
|
795
800
|
|
|
796
801
|
/**
|
|
797
802
|
* Abstract base class supporting a fluent API for building a {@link ShardQueryMap | `ShardQueryMap`} using a database client.
|
|
@@ -828,8 +833,8 @@ declare abstract class BaseQueryBuilder<CC extends BaseConfigMap, EntityClient e
|
|
|
828
833
|
* @returns - The {@link ShardQueryMap | `ShardQueryMap`} object.
|
|
829
834
|
*/
|
|
830
835
|
build(): ShardQueryMap<CC, ET, ITS, CF, K>;
|
|
831
|
-
query(options: QueryBuilderQueryOptions<CC, CF>): Promise<QueryResult<CC, ET, ITS, K>>;
|
|
836
|
+
query(options: QueryBuilderQueryOptions<CC, ET, CF>): Promise<QueryResult<CC, ET, ITS, K>>;
|
|
832
837
|
}
|
|
833
838
|
|
|
834
839
|
export { BaseEntityClient, BaseQueryBuilder, EntityManager, configSchema, createEntityManager };
|
|
835
|
-
export type { BaseConfigMap, BaseEntityClientOptions, BaseQueryBuilderOptions, CapturedConfigMapFrom, Config, ConfigInput, ConfigMap, EntitiesFromSchema, EntityItem, EntityItemByToken, EntityKey, EntityOfToken, EntityRecord, EntityRecordByToken, EntityToken, HasIndexFor, HashKeyFrom, IndexComponentTokens, IndexHashKeyOf, IndexRangeKeyOf, IndexTokensFrom, IndexTokensOf, KeysFrom, PageKey, PageKeyByIndex, ParsedConfig, Projected, ProjectedItemByToken, QueryBuilderQueryOptions, QueryOptions, QueryOptionsByCC, QueryOptionsByCF, QueryResult, RangeKeyFrom, ShardBump, ShardQueryFunction, ShardQueryMap, ShardQueryMapByCC, ShardQueryMapByCF, ShardQueryResult, ShardedKeysFrom, TranscodedPropertiesFrom, UnshardedKeysFrom, ValidateConfigMap };
|
|
840
|
+
export type { BaseConfigMap, BaseEntityClientOptions, BaseQueryBuilderOptions, CapturedConfigMapFrom, Config, ConfigInput, ConfigMap, ConfigOfClient, EntitiesFromSchema, EntityClientItemByToken, EntityClientRecordByToken, EntityItem, EntityItemByToken, EntityKey, EntityOfToken, EntityRecord, EntityRecordByToken, EntityToken, HasIndexFor, HashKeyFrom, IndexComponentTokens, IndexHashKeyOf, IndexRangeKeyOf, IndexTokensFrom, IndexTokensOf, KeysFrom, PageKey, PageKeyByIndex, ParsedConfig, Projected, ProjectedItemByToken, QueryBuilderQueryOptions, QueryOptions, QueryOptionsByCC, QueryOptionsByCF, QueryResult, RangeKeyFrom, ShardBump, ShardQueryFunction, ShardQueryMap, ShardQueryMapByCC, ShardQueryMapByCF, ShardQueryResult, ShardedKeysFrom, TranscodedPropertiesFrom, UnshardedKeysFrom, ValidateConfigMap };
|
package/package.json
CHANGED