joist-core 2.4.0-next.37 → 2.4.0-next.39
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/build/BaseEntity.d.cts +3 -4
- package/build/BaseEntity.d.cts.map +1 -1
- package/build/BaseEntity.d.mts +3 -4
- package/build/BaseEntity.d.mts.map +1 -1
- package/build/Entity.d.cts +3 -4
- package/build/Entity.d.cts.map +1 -1
- package/build/Entity.d.mts +3 -4
- package/build/Entity.d.mts.map +1 -1
- package/build/EntityFields.d.cts +3 -4
- package/build/EntityFields.d.cts.map +1 -1
- package/build/EntityFields.d.mts +3 -4
- package/build/EntityFields.d.mts.map +1 -1
- package/build/EntityManager.cjs +11 -3
- package/build/EntityManager.cjs.map +1 -1
- package/build/EntityManager.d.cts +47 -41
- package/build/EntityManager.d.cts.map +1 -1
- package/build/EntityManager.d.mts +47 -41
- package/build/EntityManager.d.mts.map +1 -1
- package/build/EntityManager.js +11 -3
- package/build/EntityManager.js.map +1 -1
- package/build/EntityMetadata.d.cts +31 -32
- package/build/EntityMetadata.d.cts.map +1 -1
- package/build/EntityMetadata.d.mts +31 -32
- package/build/EntityMetadata.d.mts.map +1 -1
- package/build/EnumMetadata.d.cts +1 -2
- package/build/EnumMetadata.d.cts.map +1 -1
- package/build/EnumMetadata.d.mts +1 -2
- package/build/EnumMetadata.d.mts.map +1 -1
- package/build/IndexManager.cjs.map +1 -1
- package/build/IndexManager.d.cts +2 -3
- package/build/IndexManager.d.cts.map +1 -1
- package/build/IndexManager.d.mts +2 -3
- package/build/IndexManager.d.mts.map +1 -1
- package/build/IndexManager.js.map +1 -1
- package/build/InstanceData.cjs.map +1 -1
- package/build/InstanceData.d.cts +1 -2
- package/build/InstanceData.d.cts.map +1 -1
- package/build/InstanceData.d.mts +1 -2
- package/build/InstanceData.d.mts.map +1 -1
- package/build/InstanceData.js.map +1 -1
- package/build/PluginManager.cjs.map +1 -1
- package/build/PluginManager.d.cts +4 -4
- package/build/PluginManager.d.cts.map +1 -1
- package/build/PluginManager.d.mts +4 -4
- package/build/PluginManager.d.mts.map +1 -1
- package/build/PluginManager.js.map +1 -1
- package/build/RowData.d.cts +3 -4
- package/build/RowData.d.cts.map +1 -1
- package/build/RowData.d.mts +3 -4
- package/build/RowData.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.cjs.map +1 -1
- package/build/batchloaders/BatchLoader.d.cts +1 -2
- package/build/batchloaders/BatchLoader.d.cts.map +1 -1
- package/build/batchloaders/BatchLoader.d.mts +1 -2
- package/build/batchloaders/BatchLoader.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.js.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.cts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.mts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.cts +2 -3
- package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.mts +2 -3
- package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.cts +2 -3
- package/build/batchloaders/populateBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.mts +2 -3
- package/build/batchloaders/populateBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -1
- package/build/changes.cjs.map +1 -1
- package/build/changes.d.cts +9 -10
- package/build/changes.d.cts.map +1 -1
- package/build/changes.d.mts +9 -10
- package/build/changes.d.mts.map +1 -1
- package/build/changes.js.map +1 -1
- package/build/config.d.cts +17 -17
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +17 -17
- package/build/config.d.mts.map +1 -1
- package/build/configure.d.cts +8 -9
- package/build/configure.d.cts.map +1 -1
- package/build/configure.d.mts +8 -9
- package/build/configure.d.mts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.cts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.mts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.cts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.mts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.cts +4 -5
- package/build/dataloaders/findCountDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.mts +4 -5
- package/build/dataloaders/findCountDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findDataLoader.d.cts +11 -12
- package/build/dataloaders/findDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findDataLoader.d.mts +11 -12
- package/build/dataloaders/findDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.cts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.mts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.cts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.mts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.cts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.mts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.cts +2 -3
- package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.mts +2 -3
- package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
- package/build/defaults.cjs.map +1 -1
- package/build/defaults.d.cts +7 -7
- package/build/defaults.d.cts.map +1 -1
- package/build/defaults.d.mts +7 -7
- package/build/defaults.d.mts.map +1 -1
- package/build/defaults.js.map +1 -1
- package/build/drivers/Driver.d.cts +2 -3
- package/build/drivers/Driver.d.cts.map +1 -1
- package/build/drivers/Driver.d.mts +2 -3
- package/build/drivers/Driver.d.mts.map +1 -1
- package/build/drivers/EntityWriter.d.cts +7 -7
- package/build/drivers/EntityWriter.d.cts.map +1 -1
- package/build/drivers/EntityWriter.d.mts +7 -7
- package/build/drivers/EntityWriter.d.mts.map +1 -1
- package/build/drivers/IdAssigner.cjs.map +1 -1
- package/build/drivers/IdAssigner.d.cts +5 -5
- package/build/drivers/IdAssigner.d.cts.map +1 -1
- package/build/drivers/IdAssigner.d.mts +5 -5
- package/build/drivers/IdAssigner.d.mts.map +1 -1
- package/build/drivers/IdAssigner.js.map +1 -1
- package/build/drivers/driverApi.d.cts +2 -3
- package/build/drivers/driverApi.d.cts.map +1 -1
- package/build/drivers/driverApi.d.mts +2 -3
- package/build/drivers/driverApi.d.mts.map +1 -1
- package/build/fields.d.cts +6 -7
- package/build/fields.d.cts.map +1 -1
- package/build/fields.d.mts +6 -7
- package/build/fields.d.mts.map +1 -1
- package/build/flush/FlushLock.cjs.map +1 -1
- package/build/flush/FlushLock.d.cts +1 -2
- package/build/flush/FlushLock.d.cts.map +1 -1
- package/build/flush/FlushLock.d.mts +1 -2
- package/build/flush/FlushLock.d.mts.map +1 -1
- package/build/flush/FlushLock.js.map +1 -1
- package/build/flush/JoinRows.cjs.map +1 -1
- package/build/flush/JoinRows.d.cts +5 -6
- package/build/flush/JoinRows.d.cts.map +1 -1
- package/build/flush/JoinRows.d.mts +5 -6
- package/build/flush/JoinRows.d.mts.map +1 -1
- package/build/flush/JoinRows.js.map +1 -1
- package/build/flush/PendingChanges.d.cts +5 -6
- package/build/flush/PendingChanges.d.cts.map +1 -1
- package/build/flush/PendingChanges.d.mts +5 -6
- package/build/flush/PendingChanges.d.mts.map +1 -1
- package/build/flush/Todo.d.cts +5 -6
- package/build/flush/Todo.d.cts.map +1 -1
- package/build/flush/Todo.d.mts +5 -6
- package/build/flush/Todo.d.mts.map +1 -1
- package/build/getProperties.d.cts +3 -4
- package/build/getProperties.d.cts.map +1 -1
- package/build/getProperties.d.mts +3 -4
- package/build/getProperties.d.mts.map +1 -1
- package/build/index.d.cts +17 -17
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +17 -17
- package/build/index.d.mts.map +1 -1
- package/build/json.d.cts +11 -11
- package/build/json.d.cts.map +1 -1
- package/build/json.d.mts +11 -11
- package/build/json.d.mts.map +1 -1
- package/build/keys.d.cts +27 -27
- package/build/keys.d.cts.map +1 -1
- package/build/keys.d.mts +27 -27
- package/build/keys.d.mts.map +1 -1
- package/build/loading/HintTree.d.cts +3 -4
- package/build/loading/HintTree.d.cts.map +1 -1
- package/build/loading/HintTree.d.mts +3 -4
- package/build/loading/HintTree.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.cjs.map +1 -1
- package/build/loading/IsLoadedCache.d.cts +2 -3
- package/build/loading/IsLoadedCache.d.cts.map +1 -1
- package/build/loading/IsLoadedCache.d.mts +2 -3
- package/build/loading/IsLoadedCache.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.js.map +1 -1
- package/build/loading/loadHints.d.cts +17 -17
- package/build/loading/loadHints.d.cts.map +1 -1
- package/build/loading/loadHints.d.mts +17 -17
- package/build/loading/loadHints.d.mts.map +1 -1
- package/build/loading/loadLens.d.cts +13 -13
- package/build/loading/loadLens.d.cts.map +1 -1
- package/build/loading/loadLens.d.mts +13 -13
- package/build/loading/loadLens.d.mts.map +1 -1
- package/build/loading/withLoaded.d.cts +5 -6
- package/build/loading/withLoaded.d.cts.map +1 -1
- package/build/loading/withLoaded.d.mts +5 -6
- package/build/loading/withLoaded.d.mts.map +1 -1
- package/build/logging/FactoryLogger.d.cts +3 -4
- package/build/logging/FactoryLogger.d.cts.map +1 -1
- package/build/logging/FactoryLogger.d.mts +3 -4
- package/build/logging/FactoryLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.cjs.map +1 -1
- package/build/logging/FieldLogger.d.cts +4 -5
- package/build/logging/FieldLogger.d.cts.map +1 -1
- package/build/logging/FieldLogger.d.mts +4 -5
- package/build/logging/FieldLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.js.map +1 -1
- package/build/logging/ReactionLogger.d.cts +7 -7
- package/build/logging/ReactionLogger.d.cts.map +1 -1
- package/build/logging/ReactionLogger.d.mts +7 -7
- package/build/logging/ReactionLogger.d.mts.map +1 -1
- package/build/newEntity.cjs.map +1 -1
- package/build/newEntity.d.cts +4 -5
- package/build/newEntity.d.cts.map +1 -1
- package/build/newEntity.d.mts +4 -5
- package/build/newEntity.d.mts.map +1 -1
- package/build/newEntity.js.map +1 -1
- package/build/newTestInstance.d.cts +21 -21
- package/build/newTestInstance.d.cts.map +1 -1
- package/build/newTestInstance.d.mts +21 -21
- package/build/newTestInstance.d.mts.map +1 -1
- package/build/normalizeHints.d.cts +7 -8
- package/build/normalizeHints.d.cts.map +1 -1
- package/build/normalizeHints.d.mts +7 -8
- package/build/normalizeHints.d.mts.map +1 -1
- package/build/nowUTC.d.cts +4 -5
- package/build/nowUTC.d.cts.map +1 -1
- package/build/nowUTC.d.mts +4 -5
- package/build/nowUTC.d.mts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.cts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.mts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -1
- package/build/plugins/PreloadPlugin.d.cts +3 -4
- package/build/plugins/PreloadPlugin.d.cts.map +1 -1
- package/build/plugins/PreloadPlugin.d.mts +3 -4
- package/build/plugins/PreloadPlugin.d.mts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.cts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.mts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
- package/build/preloading/canPreload.d.cts +1 -2
- package/build/preloading/canPreload.d.cts.map +1 -1
- package/build/preloading/canPreload.d.mts +1 -2
- package/build/preloading/canPreload.d.mts.map +1 -1
- package/build/preloading/partitionHint.d.cts +1 -2
- package/build/preloading/partitionHint.d.cts.map +1 -1
- package/build/preloading/partitionHint.d.mts +1 -2
- package/build/preloading/partitionHint.d.mts.map +1 -1
- package/build/queries/ConditionBuilder.d.cts +2 -2
- package/build/queries/ConditionBuilder.d.cts.map +1 -1
- package/build/queries/ConditionBuilder.d.mts +2 -2
- package/build/queries/ConditionBuilder.d.mts.map +1 -1
- package/build/queries/conditions.d.cts +11 -12
- package/build/queries/conditions.d.cts.map +1 -1
- package/build/queries/conditions.d.mts +11 -12
- package/build/queries/conditions.d.mts.map +1 -1
- package/build/queries/entityQueryUtils.d.cts +4 -5
- package/build/queries/entityQueryUtils.d.cts.map +1 -1
- package/build/queries/entityQueryUtils.d.mts +4 -5
- package/build/queries/entityQueryUtils.d.mts.map +1 -1
- package/build/queries/find/Aliases.d.cts +16 -16
- package/build/queries/find/Aliases.d.cts.map +1 -1
- package/build/queries/find/Aliases.d.mts +16 -16
- package/build/queries/find/Aliases.d.mts.map +1 -1
- package/build/queries/find/DeferredAlias.d.cts +5 -6
- package/build/queries/find/DeferredAlias.d.cts.map +1 -1
- package/build/queries/find/DeferredAlias.d.mts +5 -6
- package/build/queries/find/DeferredAlias.d.mts.map +1 -1
- package/build/queries/find/EntityFilter.d.cts +12 -13
- package/build/queries/find/EntityFilter.d.cts.map +1 -1
- package/build/queries/find/EntityFilter.d.mts +12 -13
- package/build/queries/find/EntityFilter.d.mts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.cts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.mts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.cts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.mts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -1
- package/build/queries/find/QueryParser.d.cts +18 -18
- package/build/queries/find/QueryParser.d.cts.map +1 -1
- package/build/queries/find/QueryParser.d.mts +18 -18
- package/build/queries/find/QueryParser.d.mts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.cts +2 -3
- package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.mts +2 -3
- package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
- package/build/queries/find/QueryVisitor.d.cts +4 -4
- package/build/queries/find/QueryVisitor.d.cts.map +1 -1
- package/build/queries/find/QueryVisitor.d.mts +4 -4
- package/build/queries/find/QueryVisitor.d.mts.map +1 -1
- package/build/queries/find/buildFindQuery.d.cts +3 -3
- package/build/queries/find/buildFindQuery.d.cts.map +1 -1
- package/build/queries/find/buildFindQuery.d.mts +3 -3
- package/build/queries/find/buildFindQuery.d.mts.map +1 -1
- package/build/queries/find/scopes.cjs.map +1 -1
- package/build/queries/find/scopes.d.cts +12 -13
- package/build/queries/find/scopes.d.cts.map +1 -1
- package/build/queries/find/scopes.d.mts +12 -13
- package/build/queries/find/scopes.d.mts.map +1 -1
- package/build/queries/find/scopes.js.map +1 -1
- package/build/queries/parsedConditions.d.cts +7 -8
- package/build/queries/parsedConditions.d.cts.map +1 -1
- package/build/queries/parsedConditions.d.mts +7 -8
- package/build/queries/parsedConditions.d.mts.map +1 -1
- package/build/queries/renderConditions.d.cts +3 -4
- package/build/queries/renderConditions.d.cts.map +1 -1
- package/build/queries/renderConditions.d.mts +3 -4
- package/build/queries/renderConditions.d.mts.map +1 -1
- package/build/queries/skipCondition.d.cts +1 -2
- package/build/queries/skipCondition.d.cts.map +1 -1
- package/build/queries/skipCondition.d.mts +1 -2
- package/build/queries/skipCondition.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.cjs.map +1 -1
- package/build/queries/sql/AliasAssigner.d.cts +1 -2
- package/build/queries/sql/AliasAssigner.d.cts.map +1 -1
- package/build/queries/sql/AliasAssigner.d.mts +1 -2
- package/build/queries/sql/AliasAssigner.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.js.map +1 -1
- package/build/queries/sql/Expr.d.cts +26 -27
- package/build/queries/sql/Expr.d.cts.map +1 -1
- package/build/queries/sql/Expr.d.mts +26 -27
- package/build/queries/sql/Expr.d.mts.map +1 -1
- package/build/queries/sql/JoinTree.d.cts +5 -5
- package/build/queries/sql/JoinTree.d.cts.map +1 -1
- package/build/queries/sql/JoinTree.d.mts +5 -5
- package/build/queries/sql/JoinTree.d.mts.map +1 -1
- package/build/queries/sql/Tables.d.cts +39 -39
- package/build/queries/sql/Tables.d.cts.map +1 -1
- package/build/queries/sql/Tables.d.mts +39 -39
- package/build/queries/sql/Tables.d.mts.map +1 -1
- package/build/queries/sql/custom.d.cts +14 -14
- package/build/queries/sql/custom.d.cts.map +1 -1
- package/build/queries/sql/custom.d.mts +14 -14
- package/build/queries/sql/custom.d.mts.map +1 -1
- package/build/queries/sql/execute.d.cts +15 -15
- package/build/queries/sql/execute.d.cts.map +1 -1
- package/build/queries/sql/execute.d.mts +15 -15
- package/build/queries/sql/execute.d.mts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.cts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.mts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -1
- package/build/queries/sql/expressions/case.d.cts +10 -10
- package/build/queries/sql/expressions/case.d.cts.map +1 -1
- package/build/queries/sql/expressions/case.d.mts +10 -10
- package/build/queries/sql/expressions/case.d.mts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.cts +5 -6
- package/build/queries/sql/expressions/coalesce.d.cts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.mts +5 -6
- package/build/queries/sql/expressions/coalesce.d.mts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.cts +1 -2
- package/build/queries/sql/expressions/codecs.d.cts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.mts +1 -2
- package/build/queries/sql/expressions/codecs.d.mts.map +1 -1
- package/build/queries/sql/expressions/expression.d.cts +6 -6
- package/build/queries/sql/expressions/expression.d.cts.map +1 -1
- package/build/queries/sql/expressions/expression.d.mts +6 -6
- package/build/queries/sql/expressions/expression.d.mts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.cts +5 -6
- package/build/queries/sql/expressions/greatest.d.cts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.mts +5 -6
- package/build/queries/sql/expressions/greatest.d.mts.map +1 -1
- package/build/queries/sql/expressions/least.d.cts +5 -6
- package/build/queries/sql/expressions/least.d.cts.map +1 -1
- package/build/queries/sql/expressions/least.d.mts +5 -6
- package/build/queries/sql/expressions/least.d.mts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.cts +5 -6
- package/build/queries/sql/expressions/nullIf.d.cts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.mts +5 -6
- package/build/queries/sql/expressions/nullIf.d.mts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.cts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.mts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -1
- package/build/queries/sql/expressions/types.d.cts +11 -11
- package/build/queries/sql/expressions/types.d.cts.map +1 -1
- package/build/queries/sql/expressions/types.d.mts +11 -11
- package/build/queries/sql/expressions/types.d.mts.map +1 -1
- package/build/queries/sql/keywords.d.cts +4 -5
- package/build/queries/sql/keywords.d.cts.map +1 -1
- package/build/queries/sql/keywords.d.mts +4 -5
- package/build/queries/sql/keywords.d.mts.map +1 -1
- package/build/queries/sql/query.cjs.map +1 -1
- package/build/queries/sql/query.d.cts +67 -67
- package/build/queries/sql/query.d.cts.map +1 -1
- package/build/queries/sql/query.d.mts +67 -67
- package/build/queries/sql/query.d.mts.map +1 -1
- package/build/queries/sql/query.js.map +1 -1
- package/build/queries/unnest.d.cts +2 -3
- package/build/queries/unnest.d.cts.map +1 -1
- package/build/queries/unnest.d.mts +2 -3
- package/build/queries/unnest.d.mts.map +1 -1
- package/build/queries/valueFilters.d.cts +5 -6
- package/build/queries/valueFilters.d.cts.map +1 -1
- package/build/queries/valueFilters.d.mts +5 -6
- package/build/queries/valueFilters.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.cjs.map +1 -1
- package/build/reactivity/ReactionsManager.d.cts +2 -3
- package/build/reactivity/ReactionsManager.d.cts.map +1 -1
- package/build/reactivity/ReactionsManager.d.mts +2 -3
- package/build/reactivity/ReactionsManager.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.js.map +1 -1
- package/build/reactivity/reactiveHints.d.cts +18 -18
- package/build/reactivity/reactiveHints.d.cts.map +1 -1
- package/build/reactivity/reactiveHints.d.mts +18 -18
- package/build/reactivity/reactiveHints.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.cjs.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.cts +1 -2
- package/build/relations/AbstractPropertyImpl.d.cts.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.mts +1 -2
- package/build/relations/AbstractPropertyImpl.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.js.map +1 -1
- package/build/relations/AbstractRelationImpl.d.cts +1 -2
- package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
- package/build/relations/AbstractRelationImpl.d.mts +1 -2
- package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
- package/build/relations/AsyncProperty.cjs.map +1 -1
- package/build/relations/AsyncProperty.d.cts +5 -6
- package/build/relations/AsyncProperty.d.cts.map +1 -1
- package/build/relations/AsyncProperty.d.mts +5 -6
- package/build/relations/AsyncProperty.d.mts.map +1 -1
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs.map +1 -1
- package/build/relations/AsyncReactiveField.d.cts +4 -5
- package/build/relations/AsyncReactiveField.d.cts.map +1 -1
- package/build/relations/AsyncReactiveField.d.mts +4 -5
- package/build/relations/AsyncReactiveField.d.mts.map +1 -1
- package/build/relations/AsyncReactiveField.js.map +1 -1
- package/build/relations/Collection.d.cts +4 -5
- package/build/relations/Collection.d.cts.map +1 -1
- package/build/relations/Collection.d.mts +4 -5
- package/build/relations/Collection.d.mts.map +1 -1
- package/build/relations/CustomCollection.cjs.map +1 -1
- package/build/relations/CustomCollection.d.cts +3 -4
- package/build/relations/CustomCollection.d.cts.map +1 -1
- package/build/relations/CustomCollection.d.mts +3 -4
- package/build/relations/CustomCollection.d.mts.map +1 -1
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs.map +1 -1
- package/build/relations/CustomReference.d.cts +3 -4
- package/build/relations/CustomReference.d.cts.map +1 -1
- package/build/relations/CustomReference.d.mts +3 -4
- package/build/relations/CustomReference.d.mts.map +1 -1
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs.map +1 -1
- package/build/relations/EnumCollection.d.cts +5 -5
- package/build/relations/EnumCollection.d.cts.map +1 -1
- package/build/relations/EnumCollection.d.mts +5 -5
- package/build/relations/EnumCollection.d.mts.map +1 -1
- package/build/relations/EnumCollection.js.map +1 -1
- package/build/relations/LargeCollection.d.cts +1 -2
- package/build/relations/LargeCollection.d.cts.map +1 -1
- package/build/relations/LargeCollection.d.mts +1 -2
- package/build/relations/LargeCollection.d.mts.map +1 -1
- package/build/relations/LazyField.cjs.map +1 -1
- package/build/relations/LazyField.d.cts +7 -8
- package/build/relations/LazyField.d.cts.map +1 -1
- package/build/relations/LazyField.d.mts +7 -8
- package/build/relations/LazyField.d.mts.map +1 -1
- package/build/relations/LazyField.js.map +1 -1
- package/build/relations/ManyToManyCollection.cjs.map +1 -1
- package/build/relations/ManyToManyCollection.d.cts +2 -3
- package/build/relations/ManyToManyCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyCollection.d.mts +2 -3
- package/build/relations/ManyToManyCollection.d.mts.map +1 -1
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.cts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.mts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.cjs.map +1 -1
- package/build/relations/ManyToOneReference.d.cts +6 -7
- package/build/relations/ManyToOneReference.d.cts.map +1 -1
- package/build/relations/ManyToOneReference.d.mts +6 -7
- package/build/relations/ManyToOneReference.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs.map +1 -1
- package/build/relations/OneToManyCollection.d.cts +2 -3
- package/build/relations/OneToManyCollection.d.cts.map +1 -1
- package/build/relations/OneToManyCollection.d.mts +2 -3
- package/build/relations/OneToManyCollection.d.mts.map +1 -1
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.cts +2 -3
- package/build/relations/OneToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.mts +2 -3
- package/build/relations/OneToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs.map +1 -1
- package/build/relations/OneToOneReference.d.cts +7 -7
- package/build/relations/OneToOneReference.d.cts.map +1 -1
- package/build/relations/OneToOneReference.d.mts +7 -7
- package/build/relations/OneToOneReference.d.mts.map +1 -1
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs.map +1 -1
- package/build/relations/PolymorphicReference.d.cts +4 -5
- package/build/relations/PolymorphicReference.d.cts.map +1 -1
- package/build/relations/PolymorphicReference.d.mts +4 -5
- package/build/relations/PolymorphicReference.d.mts.map +1 -1
- package/build/relations/PolymorphicReference.js.map +1 -1
- package/build/relations/PropertySymbols.d.cts +1 -2
- package/build/relations/PropertySymbols.d.cts.map +1 -1
- package/build/relations/PropertySymbols.d.mts +1 -2
- package/build/relations/PropertySymbols.d.mts.map +1 -1
- package/build/relations/ReactiveField.cjs.map +1 -1
- package/build/relations/ReactiveField.d.cts +4 -5
- package/build/relations/ReactiveField.d.cts.map +1 -1
- package/build/relations/ReactiveField.d.mts +4 -5
- package/build/relations/ReactiveField.d.mts.map +1 -1
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs.map +1 -1
- package/build/relations/ReactiveGetter.d.cts +4 -5
- package/build/relations/ReactiveGetter.d.cts.map +1 -1
- package/build/relations/ReactiveGetter.d.mts +4 -5
- package/build/relations/ReactiveGetter.d.mts.map +1 -1
- package/build/relations/ReactiveGetter.js.map +1 -1
- package/build/relations/ReactiveManyToMany.cjs.map +1 -1
- package/build/relations/ReactiveManyToMany.d.cts +4 -5
- package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
- package/build/relations/ReactiveManyToMany.d.mts +4 -5
- package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
- package/build/relations/ReactiveManyToMany.js.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.cts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.mts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs.map +1 -1
- package/build/relations/ReactiveReference.d.cts +5 -6
- package/build/relations/ReactiveReference.d.cts.map +1 -1
- package/build/relations/ReactiveReference.d.mts +5 -6
- package/build/relations/ReactiveReference.d.mts.map +1 -1
- package/build/relations/ReactiveReference.js.map +1 -1
- package/build/relations/ReadOnlyCollection.d.cts +4 -5
- package/build/relations/ReadOnlyCollection.d.cts.map +1 -1
- package/build/relations/ReadOnlyCollection.d.mts +4 -5
- package/build/relations/ReadOnlyCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.cjs.map +1 -1
- package/build/relations/RecursiveCollection.d.cts +10 -10
- package/build/relations/RecursiveCollection.d.cts.map +1 -1
- package/build/relations/RecursiveCollection.d.mts +10 -10
- package/build/relations/RecursiveCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.js.map +1 -1
- package/build/relations/RecursiveCycleError.d.cts +2 -2
- package/build/relations/RecursiveCycleError.d.cts.map +1 -1
- package/build/relations/RecursiveCycleError.d.mts +2 -2
- package/build/relations/RecursiveCycleError.d.mts.map +1 -1
- package/build/relations/Reference.d.cts +5 -5
- package/build/relations/Reference.d.cts.map +1 -1
- package/build/relations/Reference.d.mts +5 -5
- package/build/relations/Reference.d.mts.map +1 -1
- package/build/relations/ReferenceSymbols.d.cts +1 -2
- package/build/relations/ReferenceSymbols.d.cts.map +1 -1
- package/build/relations/ReferenceSymbols.d.mts +1 -2
- package/build/relations/ReferenceSymbols.d.mts.map +1 -1
- package/build/relations/Relation.d.cts +3 -3
- package/build/relations/Relation.d.cts.map +1 -1
- package/build/relations/Relation.d.mts +3 -3
- package/build/relations/Relation.d.mts.map +1 -1
- package/build/relations/RelationSymbols.d.cts +2 -3
- package/build/relations/RelationSymbols.d.cts.map +1 -1
- package/build/relations/RelationSymbols.d.mts +2 -3
- package/build/relations/RelationSymbols.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.cjs.map +1 -1
- package/build/relations/hasAsyncMethod.d.cts +6 -6
- package/build/relations/hasAsyncMethod.d.cts.map +1 -1
- package/build/relations/hasAsyncMethod.d.mts +6 -6
- package/build/relations/hasAsyncMethod.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.d.cts +2 -2
- package/build/relations/hasManyDerived.d.cts.map +1 -1
- package/build/relations/hasManyDerived.d.mts +2 -2
- package/build/relations/hasManyDerived.d.mts.map +1 -1
- package/build/relations/hasManyThrough.d.cts +1 -2
- package/build/relations/hasManyThrough.d.cts.map +1 -1
- package/build/relations/hasManyThrough.d.mts +1 -2
- package/build/relations/hasManyThrough.d.mts.map +1 -1
- package/build/relations/hasOneDerived.d.cts +1 -2
- package/build/relations/hasOneDerived.d.cts.map +1 -1
- package/build/relations/hasOneDerived.d.mts +1 -2
- package/build/relations/hasOneDerived.d.mts.map +1 -1
- package/build/relations/hasOneThrough.d.cts +1 -2
- package/build/relations/hasOneThrough.d.cts.map +1 -1
- package/build/relations/hasOneThrough.d.mts +1 -2
- package/build/relations/hasOneThrough.d.mts.map +1 -1
- package/build/relations/hasProperty.cjs.map +1 -1
- package/build/relations/hasProperty.d.cts +8 -8
- package/build/relations/hasProperty.d.cts.map +1 -1
- package/build/relations/hasProperty.d.mts +8 -8
- package/build/relations/hasProperty.d.mts.map +1 -1
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/isCascadeDelete.d.cts +1 -2
- package/build/relations/isCascadeDelete.d.cts.map +1 -1
- package/build/relations/isCascadeDelete.d.mts +1 -2
- package/build/relations/isCascadeDelete.d.mts.map +1 -1
- package/build/resurrection.d.cts +3 -4
- package/build/resurrection.d.cts.map +1 -1
- package/build/resurrection.d.mts +3 -4
- package/build/resurrection.d.mts.map +1 -1
- package/build/rules.d.cts +20 -20
- package/build/rules.d.cts.map +1 -1
- package/build/rules.d.mts +20 -20
- package/build/rules.d.mts.map +1 -1
- package/build/runtimeConfig.d.cts +4 -5
- package/build/runtimeConfig.d.cts.map +1 -1
- package/build/runtimeConfig.d.mts +4 -5
- package/build/runtimeConfig.d.mts.map +1 -1
- package/build/serde/TypeInfo.d.cts +3 -4
- package/build/serde/TypeInfo.d.cts.map +1 -1
- package/build/serde/TypeInfo.d.mts +3 -4
- package/build/serde/TypeInfo.d.mts.map +1 -1
- package/build/serde/columns.d.cts +2 -3
- package/build/serde/columns.d.cts.map +1 -1
- package/build/serde/columns.d.mts +2 -3
- package/build/serde/columns.d.mts.map +1 -1
- package/build/serde/fieldSerde.d.cts +9 -9
- package/build/serde/fieldSerde.d.cts.map +1 -1
- package/build/serde/fieldSerde.d.mts +9 -9
- package/build/serde/fieldSerde.d.mts.map +1 -1
- package/build/serde/serde.d.cts +18 -19
- package/build/serde/serde.d.cts.map +1 -1
- package/build/serde/serde.d.mts +18 -19
- package/build/serde/serde.d.mts.map +1 -1
- package/build/serde/temporal.d.cts +5 -5
- package/build/serde/temporal.d.cts.map +1 -1
- package/build/serde/temporal.d.mts +5 -5
- package/build/serde/temporal.d.mts.map +1 -1
- package/build/serde/temporalMappers.d.cts +4 -5
- package/build/serde/temporalMappers.d.cts.map +1 -1
- package/build/serde/temporalMappers.d.mts +4 -5
- package/build/serde/temporalMappers.d.mts.map +1 -1
- package/build/transitions.d.cts +17 -18
- package/build/transitions.d.cts.map +1 -1
- package/build/transitions.d.mts +17 -18
- package/build/transitions.d.mts.map +1 -1
- package/build/trusted.d.cts +2 -3
- package/build/trusted.d.cts.map +1 -1
- package/build/trusted.d.mts +2 -3
- package/build/trusted.d.mts.map +1 -1
- package/build/typeMap.d.cts +17 -17
- package/build/typeMap.d.cts.map +1 -1
- package/build/typeMap.d.mts +17 -17
- package/build/typeMap.d.mts.map +1 -1
- package/build/upsert.d.cts +4 -4
- package/build/upsert.d.cts.map +1 -1
- package/build/upsert.d.mts +4 -4
- package/build/upsert.d.mts.map +1 -1
- package/build/utils.d.cts +27 -28
- package/build/utils.d.cts.map +1 -1
- package/build/utils.d.mts +27 -28
- package/build/utils.d.mts.map +1 -1
- package/package.json +4 -4
package/build/index.d.cts
CHANGED
|
@@ -108,23 +108,23 @@ import { isInTrustedContext, runInTrustedContext } from "./trusted.cjs";
|
|
|
108
108
|
import { buildUnnestCte, ensureRectangularArraySizes } from "./queries/unnest.cjs";
|
|
109
109
|
import { DeepPartialOrNull, updatePartial, upsert } from "./upsert.cjs";
|
|
110
110
|
import { StubbedRelation, WithLoaded, ensureWithLoaded, withLoaded } from "./loading/withLoaded.cjs";
|
|
111
|
-
import { EntityConstructor, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FailedFlushError, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, invokeRule, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.cjs";
|
|
111
|
+
import { CloneOverrides, EntityConstructor, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FailedFlushError, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, invokeRule, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.cjs";
|
|
112
112
|
import { Entity, IdType, isEntity } from "./Entity.cjs";
|
|
113
113
|
import { BaseEntity, getInstanceData } from "./BaseEntity.cjs";
|
|
114
114
|
import { newPgConnectionConfig } from "joist-utils";
|
|
115
115
|
//#region src/index.d.ts
|
|
116
|
-
declare const testing: {
|
|
116
|
+
export declare const testing: {
|
|
117
117
|
isAllSqlPaths: typeof isAllSqlPaths;
|
|
118
118
|
getDefaultDependencies: typeof getDefaultDependencies;
|
|
119
119
|
partitionHint: typeof partitionHint;
|
|
120
120
|
};
|
|
121
|
-
declare const internals: {
|
|
121
|
+
export declare const internals: {
|
|
122
122
|
buildWhereClause: typeof buildWhereClause;
|
|
123
123
|
};
|
|
124
124
|
interface Flavoring<FlavorT> {
|
|
125
125
|
_type?: FlavorT;
|
|
126
126
|
}
|
|
127
|
-
type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
127
|
+
export type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
128
128
|
/**
|
|
129
129
|
* Sets each value in `values` on the current entity.
|
|
130
130
|
*
|
|
@@ -139,7 +139,7 @@ type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
|
139
139
|
* use `values` being a primary key to short-circuit and let hydration callers assign the values
|
|
140
140
|
* returned by the serde `fromRow` methods.
|
|
141
141
|
*/
|
|
142
|
-
declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
|
|
142
|
+
export declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
|
|
143
143
|
partial?: boolean;
|
|
144
144
|
calledFromConstructor?: boolean;
|
|
145
145
|
}): void;
|
|
@@ -150,16 +150,16 @@ declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>>
|
|
|
150
150
|
* - We catch missing/invalid field names
|
|
151
151
|
* - We handle FactoryInitialValues
|
|
152
152
|
*/
|
|
153
|
-
declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
|
|
154
|
-
declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
|
|
153
|
+
export declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
|
|
154
|
+
export declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
|
|
155
155
|
/** Adds `null` to every key in `T` to accept partial-update-style input. */
|
|
156
|
-
type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
|
|
157
|
-
declare function getRequiredKeys<T extends Entity>(entity: T): string[];
|
|
158
|
-
declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
|
|
159
|
-
declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
|
|
160
|
-
declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
|
|
156
|
+
export type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
|
|
157
|
+
export declare function getRequiredKeys<T extends Entity>(entity: T): string[];
|
|
158
|
+
export declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
|
|
159
|
+
export declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
|
|
160
|
+
export declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
|
|
161
161
|
/** Casts a "maybe abstract" cstr to a concrete cstr when the calling code knows it's safe. */
|
|
162
|
-
declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
|
|
162
|
+
export declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
|
|
163
163
|
/**
|
|
164
164
|
* Thrown when `.id` is accessed on an entity that does not have an id yet.
|
|
165
165
|
*
|
|
@@ -167,15 +167,15 @@ declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConst
|
|
|
167
167
|
* `em.assignNewIds()`. Other databases typically require INSERTs to trigger the auto
|
|
168
168
|
* id assignment.
|
|
169
169
|
*/
|
|
170
|
-
declare class NoIdError extends Error {}
|
|
170
|
+
export declare class NoIdError extends Error {}
|
|
171
171
|
/** Throws a `NoIdError` for `entity`, i.e. because `id` was called before being saved. */
|
|
172
|
-
declare function failNoIdYet(entity: string): never;
|
|
172
|
+
export declare function failNoIdYet(entity: string): never;
|
|
173
173
|
/**
|
|
174
174
|
* Add a static function since getters can't have type guards.
|
|
175
175
|
*
|
|
176
176
|
* See https://github.com/microsoft/TypeScript/issues/43368
|
|
177
177
|
*/
|
|
178
|
-
declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
|
|
178
|
+
export declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
|
|
179
179
|
//#endregion
|
|
180
|
-
export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, FailedFlushError, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, Flavor, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type GuardTransitionMatch, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NoIdError, NotFoundError, type NotWidened, type OnTransitionMatch, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, PartialOrNull, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryTable, type QueryTableBrand, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TransitionTable, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asConcreteCstr, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureNotDeleted, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, failNoIdYet, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRelationEntries, getRelations, getRequiredKeys, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, internals, invokeRule, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isNewEntity, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setOpt, setOpts, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, testing, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
|
|
180
|
+
export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, CloneOverrides, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, FailedFlushError, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type GuardTransitionMatch, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NotFoundError, type NotWidened, type OnTransitionMatch, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryTable, type QueryTableBrand, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TransitionTable, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, invokeRule, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
|
|
181
181
|
//# sourceMappingURL=index.d.cts.map
|
package/build/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA0Ba;;;;;qBACA;2BAAA;;UA4RH,UAAU;EAClB,QAAQ;;YAGE,OAAO,GAAG,WAAW,IAAI,UAAU;;;;;;;;;;;;;;;wBAgB/B,QAAQ,UAAU,QAChC,QAAQ,GACR,QAAQ,QAAQ,OAAO,iBACvB;EAAS;EAAmB;;;;;;;;;wBAoBd,OAAO,UAAU,QAC/B,MAAM,eAAe,IACrB,QAAQ,GACR,aACA,aACA,mBACA;wBA4Dc,iBAAiB,QAAQ,QAAQ;;YAOrC,cAAc,QACvB,WAAW,KAAK,EAAE;wBAGL,gBAAgB,UAAU,QAAQ,QAAQ;wBAC1C,gBAAgB,UAAU,QAAQ,MAAM,kBAAkB;wBAO1D,aAAa,QAAQ,SAAS;wBAM9B,mBAAmB,QAAQ,kBAAkB;;wBAO7C,eAAe,UAAU,QAAQ,MAAM,+BAA+B,KAAK,kBAAkB;;;;;;;;qBAWhG,kBAAkB;;wBAGf,YAAY;;;;;;wBASZ,YAAY,UAAU,QAAQ,QAAQ,IAAI,UAAU,IAAI"}
|
package/build/index.d.mts
CHANGED
|
@@ -108,23 +108,23 @@ import { isInTrustedContext, runInTrustedContext } from "./trusted.mjs";
|
|
|
108
108
|
import { buildUnnestCte, ensureRectangularArraySizes } from "./queries/unnest.mjs";
|
|
109
109
|
import { DeepPartialOrNull, updatePartial, upsert } from "./upsert.mjs";
|
|
110
110
|
import { StubbedRelation, WithLoaded, ensureWithLoaded, withLoaded } from "./loading/withLoaded.mjs";
|
|
111
|
-
import { EntityConstructor, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FailedFlushError, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, invokeRule, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.mjs";
|
|
111
|
+
import { CloneOverrides, EntityConstructor, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FailedFlushError, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, invokeRule, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.mjs";
|
|
112
112
|
import { Entity, IdType, isEntity } from "./Entity.mjs";
|
|
113
113
|
import { BaseEntity, getInstanceData } from "./BaseEntity.mjs";
|
|
114
114
|
import { newPgConnectionConfig } from "joist-utils";
|
|
115
115
|
//#region src/index.d.ts
|
|
116
|
-
declare const testing: {
|
|
116
|
+
export declare const testing: {
|
|
117
117
|
isAllSqlPaths: typeof isAllSqlPaths;
|
|
118
118
|
getDefaultDependencies: typeof getDefaultDependencies;
|
|
119
119
|
partitionHint: typeof partitionHint;
|
|
120
120
|
};
|
|
121
|
-
declare const internals: {
|
|
121
|
+
export declare const internals: {
|
|
122
122
|
buildWhereClause: typeof buildWhereClause;
|
|
123
123
|
};
|
|
124
124
|
interface Flavoring<FlavorT> {
|
|
125
125
|
_type?: FlavorT;
|
|
126
126
|
}
|
|
127
|
-
type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
127
|
+
export type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
128
128
|
/**
|
|
129
129
|
* Sets each value in `values` on the current entity.
|
|
130
130
|
*
|
|
@@ -139,7 +139,7 @@ type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
|
139
139
|
* use `values` being a primary key to short-circuit and let hydration callers assign the values
|
|
140
140
|
* returned by the serde `fromRow` methods.
|
|
141
141
|
*/
|
|
142
|
-
declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
|
|
142
|
+
export declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
|
|
143
143
|
partial?: boolean;
|
|
144
144
|
calledFromConstructor?: boolean;
|
|
145
145
|
}): void;
|
|
@@ -150,16 +150,16 @@ declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>>
|
|
|
150
150
|
* - We catch missing/invalid field names
|
|
151
151
|
* - We handle FactoryInitialValues
|
|
152
152
|
*/
|
|
153
|
-
declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
|
|
154
|
-
declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
|
|
153
|
+
export declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
|
|
154
|
+
export declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
|
|
155
155
|
/** Adds `null` to every key in `T` to accept partial-update-style input. */
|
|
156
|
-
type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
|
|
157
|
-
declare function getRequiredKeys<T extends Entity>(entity: T): string[];
|
|
158
|
-
declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
|
|
159
|
-
declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
|
|
160
|
-
declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
|
|
156
|
+
export type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
|
|
157
|
+
export declare function getRequiredKeys<T extends Entity>(entity: T): string[];
|
|
158
|
+
export declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
|
|
159
|
+
export declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
|
|
160
|
+
export declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
|
|
161
161
|
/** Casts a "maybe abstract" cstr to a concrete cstr when the calling code knows it's safe. */
|
|
162
|
-
declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
|
|
162
|
+
export declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
|
|
163
163
|
/**
|
|
164
164
|
* Thrown when `.id` is accessed on an entity that does not have an id yet.
|
|
165
165
|
*
|
|
@@ -167,15 +167,15 @@ declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConst
|
|
|
167
167
|
* `em.assignNewIds()`. Other databases typically require INSERTs to trigger the auto
|
|
168
168
|
* id assignment.
|
|
169
169
|
*/
|
|
170
|
-
declare class NoIdError extends Error {}
|
|
170
|
+
export declare class NoIdError extends Error {}
|
|
171
171
|
/** Throws a `NoIdError` for `entity`, i.e. because `id` was called before being saved. */
|
|
172
|
-
declare function failNoIdYet(entity: string): never;
|
|
172
|
+
export declare function failNoIdYet(entity: string): never;
|
|
173
173
|
/**
|
|
174
174
|
* Add a static function since getters can't have type guards.
|
|
175
175
|
*
|
|
176
176
|
* See https://github.com/microsoft/TypeScript/issues/43368
|
|
177
177
|
*/
|
|
178
|
-
declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
|
|
178
|
+
export declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
|
|
179
179
|
//#endregion
|
|
180
|
-
export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, FailedFlushError, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, Flavor, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type GuardTransitionMatch, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NoIdError, NotFoundError, type NotWidened, type OnTransitionMatch, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, PartialOrNull, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryTable, type QueryTableBrand, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TransitionTable, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asConcreteCstr, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureNotDeleted, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, failNoIdYet, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRelationEntries, getRelations, getRequiredKeys, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, internals, invokeRule, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isNewEntity, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setOpt, setOpts, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, testing, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
|
|
180
|
+
export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, CloneOverrides, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, FailedFlushError, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type GuardTransitionMatch, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NotFoundError, type NotWidened, type OnTransitionMatch, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryTable, type QueryTableBrand, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TransitionTable, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, invokeRule, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
|
|
181
181
|
//# sourceMappingURL=index.d.mts.map
|
package/build/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA0Ba;;;;;qBACA;2BAAA;;UA4RH,UAAU;EAClB,QAAQ;;YAGE,OAAO,GAAG,WAAW,IAAI,UAAU;;;;;;;;;;;;;;;wBAgB/B,QAAQ,UAAU,QAChC,QAAQ,GACR,QAAQ,QAAQ,OAAO,iBACvB;EAAS;EAAmB;;;;;;;;;wBAoBd,OAAO,UAAU,QAC/B,MAAM,eAAe,IACrB,QAAQ,GACR,aACA,aACA,mBACA;wBA4Dc,iBAAiB,QAAQ,QAAQ;;YAOrC,cAAc,QACvB,WAAW,KAAK,EAAE;wBAGL,gBAAgB,UAAU,QAAQ,QAAQ;wBAC1C,gBAAgB,UAAU,QAAQ,MAAM,kBAAkB;wBAO1D,aAAa,QAAQ,SAAS;wBAM9B,mBAAmB,QAAQ,kBAAkB;;wBAO7C,eAAe,UAAU,QAAQ,MAAM,+BAA+B,KAAK,kBAAkB;;;;;;;;qBAWhG,kBAAkB;;wBAGf,YAAY;;;;;;wBASZ,YAAY,UAAU,QAAQ,QAAQ,IAAI,UAAU,IAAI"}
|
package/build/json.d.cts
CHANGED
|
@@ -16,12 +16,12 @@ import { Entity } from "./Entity.cjs";
|
|
|
16
16
|
* - Similar to reactive hints, they include specific fields to output
|
|
17
17
|
* - Unlike either, they can include completely custom keys that are lambdas to generate custom values
|
|
18
18
|
*/
|
|
19
|
-
type JsonHint<T extends Entity> = (keyof Jsonable<T> & string) | ReadonlyArray<keyof Jsonable<T> & string> | NestedJsonHint<T>;
|
|
19
|
+
export type JsonHint<T extends Entity> = (keyof Jsonable<T> & string) | ReadonlyArray<keyof Jsonable<T> & string> | NestedJsonHint<T>;
|
|
20
20
|
/** For object literal/nested hints, we allow mapping both entity keys 1:1 & custom keys via a lambdas. */
|
|
21
|
-
type NestedJsonHint<T extends Entity> = EntityKeyJsonHint<T> | CustomJsonKeyHint<T>;
|
|
21
|
+
export type NestedJsonHint<T extends Entity> = EntityKeyJsonHint<T> | CustomJsonKeyHint<T>;
|
|
22
22
|
/** Foreach `Jsonable` key, we can provide a sub-hint, or just a boolean to include/exclude. */
|
|
23
|
-
type EntityKeyJsonHint<T extends Entity> = { [K in keyof Jsonable<T> as `${K}`]?: (Jsonable<T>[K] extends (infer U extends Entity) ? JsonHint<U> : {}) | boolean; };
|
|
24
|
-
type CustomJsonKeyHint<T> = {
|
|
23
|
+
export type EntityKeyJsonHint<T extends Entity> = { [K in keyof Jsonable<T> as `${K}`]?: (Jsonable<T>[K] extends (infer U extends Entity) ? JsonHint<U> : {}) | boolean; };
|
|
24
|
+
export type CustomJsonKeyHint<T> = {
|
|
25
25
|
[key: string]: (entity: T) => any;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
@@ -32,10 +32,10 @@ type CustomJsonKeyHint<T> = {
|
|
|
32
32
|
*
|
|
33
33
|
* We only accept object literals & arrays to `toJSON` to avoid a `JSON.stringify` oddity.
|
|
34
34
|
*/
|
|
35
|
-
type ToJsonHint<T extends Entity> = NestedJsonHint<T> | ReadonlyArray<keyof Jsonable<T> & string>;
|
|
35
|
+
export type ToJsonHint<T extends Entity> = NestedJsonHint<T> | ReadonlyArray<keyof Jsonable<T> & string>;
|
|
36
36
|
/** The keys in `T` that we can put into a JSON payload. */
|
|
37
|
-
type Jsonable<T extends Entity> = { -readonly [K in keyof T as JsonableValue<T[K]> extends never ? never : K]: JsonableValue<T[K]>; };
|
|
38
|
-
type JsonableValue<V> = V extends Reference<any, infer U, any> ? U : V extends Collection<any, infer U> ? U : V extends AsyncMethod<any, any, any> ? never : V extends Property<any, infer P> ? DropUndefined<P> : V extends ReactiveGetter<any, infer P> ? P : V;
|
|
37
|
+
export type Jsonable<T extends Entity> = { -readonly [K in keyof T as JsonableValue<T[K]> extends never ? never : K]: JsonableValue<T[K]>; };
|
|
38
|
+
export type JsonableValue<V> = V extends Reference<any, infer U, any> ? U : V extends Collection<any, infer U> ? U : V extends AsyncMethod<any, any, any> ? never : V extends Property<any, infer P> ? DropUndefined<P> : V extends ReactiveGetter<any, infer P> ? P : V;
|
|
39
39
|
/**
|
|
40
40
|
* Provides an API to put an entity, or list of entities, into a JSON payload.
|
|
41
41
|
*
|
|
@@ -46,7 +46,7 @@ type JsonableValue<V> = V extends Reference<any, infer U, any> ? U : V extends C
|
|
|
46
46
|
* - relations are allowed to provide nested hints, just like nested load hints
|
|
47
47
|
* - custom fields like `fullName: (entity) => entity.firstName + ' ' + entity.lastName`
|
|
48
48
|
*/
|
|
49
|
-
declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entity: T, hint: H): Promise<JsonPayload<T, H>>;
|
|
49
|
+
export declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entity: T, hint: H): Promise<JsonPayload<T, H>>;
|
|
50
50
|
/**
|
|
51
51
|
* Provides an API to put an entity, or list of entities, into a JSON payload.
|
|
52
52
|
*
|
|
@@ -57,11 +57,11 @@ declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entity: T
|
|
|
57
57
|
* - relations are allowed to provide nested hints, just like nested load hints
|
|
58
58
|
* - custom fields like `fullName: (entity) => entity.firstName + ' ' + entity.lastName`
|
|
59
59
|
*/
|
|
60
|
-
declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entities: readonly T[], hint: H): Promise<JsonPayload<T, H>[]>;
|
|
60
|
+
export declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entities: readonly T[], hint: H): Promise<JsonPayload<T, H>[]>;
|
|
61
61
|
/**
|
|
62
62
|
* Statically types the return value of `toJSON` based on the given `hint`.
|
|
63
63
|
*/
|
|
64
|
-
type JsonPayload<T, H> = { [HK in keyof NormalizeHint<H> & string]: HK extends keyof T ? JsonPayloadKey<T, H, HK, HK> : HK extends `${infer TK extends string & keyof T}Id` ? JsonPayloadKey<T, H, TK, HK> : HK extends `${infer SK extends string}Ids` ? `${SK}s` extends keyof T ? JsonPayloadKey<T, H, `${SK}s`, HK> : JsonPayloadCustom<NormalizeHint<H>[HK]> : JsonPayloadCustom<NormalizeHint<H>[HK]>; };
|
|
64
|
+
export type JsonPayload<T, H> = { [HK in keyof NormalizeHint<H> & string]: HK extends keyof T ? JsonPayloadKey<T, H, HK, HK> : HK extends `${infer TK extends string & keyof T}Id` ? JsonPayloadKey<T, H, TK, HK> : HK extends `${infer SK extends string}Ids` ? `${SK}s` extends keyof T ? JsonPayloadKey<T, H, `${SK}s`, HK> : JsonPayloadCustom<NormalizeHint<H>[HK]> : JsonPayloadCustom<NormalizeHint<H>[HK]>; };
|
|
65
65
|
type JsonPayloadKey<T, H, TK extends keyof T, HK extends keyof NormalizeHint<H>> = T[TK] extends Reference<any, infer U, any> ? JsonPayloadReference<U, NormalizeHint<H>[HK]> : T[TK] extends Collection<any, infer U> ? JsonPayloadCollection<U, NormalizeHint<H>[HK]> : T[TK] extends Property<any, infer U> ? JsonPayloadProperty<U, NormalizeHint<H>[HK]> : T[TK] extends ReactiveGetter<any, infer V> ? V : T[TK];
|
|
66
66
|
type JsonPayloadReference<U, H> = IsEmpty<H> extends true ? string : JsonPayload<U, H>;
|
|
67
67
|
type JsonPayloadCollection<U extends Entity, H> = H extends true ? IdOf<U>[] : IsEmpty<H> extends true ? IdOf<U>[] : JsonPayload<U, H>[];
|
|
@@ -72,5 +72,5 @@ type DropUndefined<T> = T extends (infer U extends Entity | undefined) ? U : T;
|
|
|
72
72
|
type NormalizeHint<H> = H extends string ? Record<H, {}> : H extends ReadonlyArray<any> ? Record<H[number], {}> : { [K in keyof H]: H[K]; };
|
|
73
73
|
type IsEmpty<T> = keyof T extends never ? true : false;
|
|
74
74
|
//#endregion
|
|
75
|
-
export {
|
|
75
|
+
export {};
|
|
76
76
|
//# sourceMappingURL=json.d.cts.map
|
package/build/json.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.cts","names":[],"sources":["../src/json.ts"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"json.d.cts","names":[],"sources":["../src/json.ts"],"mappings":";;;;;;;;;;;;;;;;;;YA2BY,SAAS,UAAU,iBACpB,SAAS,eAChB,oBAAoB,SAAS,eAC7B,eAAe;;YAGP,eAAe,UAAU,UAAU,kBAAkB,KAAK,kBAAkB;;YAG5E,kBAAkB,UAAU,aAErC,WAAW,SAAS,SAAS,QAAQ,SAAS,GAAG,kBAAiB,UAAU,UAAS,SAAS;YAGrF,kBAAkB;GAC3B,eAAe,QAAQ;;;;;;;;;;YAWd,WAAW,UAAU,UAAU,eAAe,KAAK,oBAAoB,SAAS;;YAGhF,SAAS,UAAU,uBAClB,WAAW,KAAK,cAAc,EAAE,4BAA4B,IAAI,cAAc,EAAE;YAKjF,cAAc,KACxB,UAAU,qBAAqB,UAC3B,IACA,UAAU,sBAAsB,KAC9B,IACA,UAAU,qCAER,UAAU,oBAAoB,KAC5B,cAAc,KACd,UAAU,0BAA0B,KAClC,IACA;;;;;;;;;;;wBAYQ,OAAO,UAAU,cAAc,UAAU,SAAS,IACtE,QAAQ,GACR,MAAM,IACL,QAAQ,YAAY,GAAG;;;;;;;;;;;wBAYJ,OAAO,UAAU,cAAc,UAAU,SAAS,IACtE,mBAAmB,KACnB,MAAM,IACL,QAAQ,YAAY,GAAG;;;;YAkCd,YAAY,GAAG,QACxB,YAAY,cAAc,cAAc,iBAAiB,IACtD,eAAe,GAAG,GAAG,IAAI,MACzB,oBAAoB,0BAA0B,QAC5C,eAAe,GAAG,GAAG,IAAI,MACzB,oBAAoB,4BAEf,oBAAoB,IACrB,eAAe,GAAG,MAAM,OAAO,MAC/B,kBAAkB,cAAc,GAAG,OACrC,kBAAkB,cAAc,GAAG;KAGxC,eAAe,GAAG,GAAG,iBAAiB,GAAG,iBAAiB,cAAc,MAC3E,EAAE,YAAY,qBAAqB,UAC/B,qBAAqB,GAAG,cAAc,GAAG,OACzC,EAAE,YAAY,sBAAsB,KAClC,sBAAsB,GAAG,cAAc,GAAG,OAC1C,EAAE,YAAY,oBAAoB,KAChC,oBAAoB,GAAG,cAAc,GAAG,OACxC,EAAE,YAAY,0BAA0B,KACtC,IACA,EAAE;KAGT,qBAAqB,GAAG,KAAK,QAAQ,2BAA2B,YAAY,GAAG;KAE/E,sBAAsB,UAAU,QAAQ,KAE3C,iBACI,KAAK,OAEL,QAAQ,kBACN,KAAK,OAEL,YAAY,GAAG;KAElB,oBAAoB,GAAG,KAE1B,UAAU,qBACN,qBAAqB,GAAG,KAExB,iBAAiB,UAAU,wBACzB,sBAAsB,GAAG,KAEzB;KAEH,kBAAkB,KAAK,eAAc,oBAAoB,KAAI,cAAc,KAAK;KAEhF,cAAc,KAAK,UAAU,cAAc,KAAK,IAAI;KA8EpD,cAAc,KAAK,iBAAgB,UAAU,sBAAqB,IAAI;KAGtE,cAAc,KAAK,mBACpB,OAAO,SACP,UAAU,qBACR,OAAO,oBACJ,WAAW,IAAI,EAAE;KAErB,QAAQ,WAAW"}
|
package/build/json.d.mts
CHANGED
|
@@ -16,12 +16,12 @@ import { Entity } from "./Entity.mjs";
|
|
|
16
16
|
* - Similar to reactive hints, they include specific fields to output
|
|
17
17
|
* - Unlike either, they can include completely custom keys that are lambdas to generate custom values
|
|
18
18
|
*/
|
|
19
|
-
type JsonHint<T extends Entity> = (keyof Jsonable<T> & string) | ReadonlyArray<keyof Jsonable<T> & string> | NestedJsonHint<T>;
|
|
19
|
+
export type JsonHint<T extends Entity> = (keyof Jsonable<T> & string) | ReadonlyArray<keyof Jsonable<T> & string> | NestedJsonHint<T>;
|
|
20
20
|
/** For object literal/nested hints, we allow mapping both entity keys 1:1 & custom keys via a lambdas. */
|
|
21
|
-
type NestedJsonHint<T extends Entity> = EntityKeyJsonHint<T> | CustomJsonKeyHint<T>;
|
|
21
|
+
export type NestedJsonHint<T extends Entity> = EntityKeyJsonHint<T> | CustomJsonKeyHint<T>;
|
|
22
22
|
/** Foreach `Jsonable` key, we can provide a sub-hint, or just a boolean to include/exclude. */
|
|
23
|
-
type EntityKeyJsonHint<T extends Entity> = { [K in keyof Jsonable<T> as `${K}`]?: (Jsonable<T>[K] extends (infer U extends Entity) ? JsonHint<U> : {}) | boolean; };
|
|
24
|
-
type CustomJsonKeyHint<T> = {
|
|
23
|
+
export type EntityKeyJsonHint<T extends Entity> = { [K in keyof Jsonable<T> as `${K}`]?: (Jsonable<T>[K] extends (infer U extends Entity) ? JsonHint<U> : {}) | boolean; };
|
|
24
|
+
export type CustomJsonKeyHint<T> = {
|
|
25
25
|
[key: string]: (entity: T) => any;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
@@ -32,10 +32,10 @@ type CustomJsonKeyHint<T> = {
|
|
|
32
32
|
*
|
|
33
33
|
* We only accept object literals & arrays to `toJSON` to avoid a `JSON.stringify` oddity.
|
|
34
34
|
*/
|
|
35
|
-
type ToJsonHint<T extends Entity> = NestedJsonHint<T> | ReadonlyArray<keyof Jsonable<T> & string>;
|
|
35
|
+
export type ToJsonHint<T extends Entity> = NestedJsonHint<T> | ReadonlyArray<keyof Jsonable<T> & string>;
|
|
36
36
|
/** The keys in `T` that we can put into a JSON payload. */
|
|
37
|
-
type Jsonable<T extends Entity> = { -readonly [K in keyof T as JsonableValue<T[K]> extends never ? never : K]: JsonableValue<T[K]>; };
|
|
38
|
-
type JsonableValue<V> = V extends Reference<any, infer U, any> ? U : V extends Collection<any, infer U> ? U : V extends AsyncMethod<any, any, any> ? never : V extends Property<any, infer P> ? DropUndefined<P> : V extends ReactiveGetter<any, infer P> ? P : V;
|
|
37
|
+
export type Jsonable<T extends Entity> = { -readonly [K in keyof T as JsonableValue<T[K]> extends never ? never : K]: JsonableValue<T[K]>; };
|
|
38
|
+
export type JsonableValue<V> = V extends Reference<any, infer U, any> ? U : V extends Collection<any, infer U> ? U : V extends AsyncMethod<any, any, any> ? never : V extends Property<any, infer P> ? DropUndefined<P> : V extends ReactiveGetter<any, infer P> ? P : V;
|
|
39
39
|
/**
|
|
40
40
|
* Provides an API to put an entity, or list of entities, into a JSON payload.
|
|
41
41
|
*
|
|
@@ -46,7 +46,7 @@ type JsonableValue<V> = V extends Reference<any, infer U, any> ? U : V extends C
|
|
|
46
46
|
* - relations are allowed to provide nested hints, just like nested load hints
|
|
47
47
|
* - custom fields like `fullName: (entity) => entity.firstName + ' ' + entity.lastName`
|
|
48
48
|
*/
|
|
49
|
-
declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entity: T, hint: H): Promise<JsonPayload<T, H>>;
|
|
49
|
+
export declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entity: T, hint: H): Promise<JsonPayload<T, H>>;
|
|
50
50
|
/**
|
|
51
51
|
* Provides an API to put an entity, or list of entities, into a JSON payload.
|
|
52
52
|
*
|
|
@@ -57,11 +57,11 @@ declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entity: T
|
|
|
57
57
|
* - relations are allowed to provide nested hints, just like nested load hints
|
|
58
58
|
* - custom fields like `fullName: (entity) => entity.firstName + ' ' + entity.lastName`
|
|
59
59
|
*/
|
|
60
|
-
declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entities: readonly T[], hint: H): Promise<JsonPayload<T, H>[]>;
|
|
60
|
+
export declare function toJSON<T extends Entity, const H extends JsonHint<T>>(entities: readonly T[], hint: H): Promise<JsonPayload<T, H>[]>;
|
|
61
61
|
/**
|
|
62
62
|
* Statically types the return value of `toJSON` based on the given `hint`.
|
|
63
63
|
*/
|
|
64
|
-
type JsonPayload<T, H> = { [HK in keyof NormalizeHint<H> & string]: HK extends keyof T ? JsonPayloadKey<T, H, HK, HK> : HK extends `${infer TK extends string & keyof T}Id` ? JsonPayloadKey<T, H, TK, HK> : HK extends `${infer SK extends string}Ids` ? `${SK}s` extends keyof T ? JsonPayloadKey<T, H, `${SK}s`, HK> : JsonPayloadCustom<NormalizeHint<H>[HK]> : JsonPayloadCustom<NormalizeHint<H>[HK]>; };
|
|
64
|
+
export type JsonPayload<T, H> = { [HK in keyof NormalizeHint<H> & string]: HK extends keyof T ? JsonPayloadKey<T, H, HK, HK> : HK extends `${infer TK extends string & keyof T}Id` ? JsonPayloadKey<T, H, TK, HK> : HK extends `${infer SK extends string}Ids` ? `${SK}s` extends keyof T ? JsonPayloadKey<T, H, `${SK}s`, HK> : JsonPayloadCustom<NormalizeHint<H>[HK]> : JsonPayloadCustom<NormalizeHint<H>[HK]>; };
|
|
65
65
|
type JsonPayloadKey<T, H, TK extends keyof T, HK extends keyof NormalizeHint<H>> = T[TK] extends Reference<any, infer U, any> ? JsonPayloadReference<U, NormalizeHint<H>[HK]> : T[TK] extends Collection<any, infer U> ? JsonPayloadCollection<U, NormalizeHint<H>[HK]> : T[TK] extends Property<any, infer U> ? JsonPayloadProperty<U, NormalizeHint<H>[HK]> : T[TK] extends ReactiveGetter<any, infer V> ? V : T[TK];
|
|
66
66
|
type JsonPayloadReference<U, H> = IsEmpty<H> extends true ? string : JsonPayload<U, H>;
|
|
67
67
|
type JsonPayloadCollection<U extends Entity, H> = H extends true ? IdOf<U>[] : IsEmpty<H> extends true ? IdOf<U>[] : JsonPayload<U, H>[];
|
|
@@ -72,5 +72,5 @@ type DropUndefined<T> = T extends (infer U extends Entity | undefined) ? U : T;
|
|
|
72
72
|
type NormalizeHint<H> = H extends string ? Record<H, {}> : H extends ReadonlyArray<any> ? Record<H[number], {}> : { [K in keyof H]: H[K]; };
|
|
73
73
|
type IsEmpty<T> = keyof T extends never ? true : false;
|
|
74
74
|
//#endregion
|
|
75
|
-
export {
|
|
75
|
+
export {};
|
|
76
76
|
//# sourceMappingURL=json.d.mts.map
|
package/build/json.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.mts","names":[],"sources":["../src/json.ts"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"json.d.mts","names":[],"sources":["../src/json.ts"],"mappings":";;;;;;;;;;;;;;;;;;YA2BY,SAAS,UAAU,iBACpB,SAAS,eAChB,oBAAoB,SAAS,eAC7B,eAAe;;YAGP,eAAe,UAAU,UAAU,kBAAkB,KAAK,kBAAkB;;YAG5E,kBAAkB,UAAU,aAErC,WAAW,SAAS,SAAS,QAAQ,SAAS,GAAG,kBAAiB,UAAU,UAAS,SAAS;YAGrF,kBAAkB;GAC3B,eAAe,QAAQ;;;;;;;;;;YAWd,WAAW,UAAU,UAAU,eAAe,KAAK,oBAAoB,SAAS;;YAGhF,SAAS,UAAU,uBAClB,WAAW,KAAK,cAAc,EAAE,4BAA4B,IAAI,cAAc,EAAE;YAKjF,cAAc,KACxB,UAAU,qBAAqB,UAC3B,IACA,UAAU,sBAAsB,KAC9B,IACA,UAAU,qCAER,UAAU,oBAAoB,KAC5B,cAAc,KACd,UAAU,0BAA0B,KAClC,IACA;;;;;;;;;;;wBAYQ,OAAO,UAAU,cAAc,UAAU,SAAS,IACtE,QAAQ,GACR,MAAM,IACL,QAAQ,YAAY,GAAG;;;;;;;;;;;wBAYJ,OAAO,UAAU,cAAc,UAAU,SAAS,IACtE,mBAAmB,KACnB,MAAM,IACL,QAAQ,YAAY,GAAG;;;;YAkCd,YAAY,GAAG,QACxB,YAAY,cAAc,cAAc,iBAAiB,IACtD,eAAe,GAAG,GAAG,IAAI,MACzB,oBAAoB,0BAA0B,QAC5C,eAAe,GAAG,GAAG,IAAI,MACzB,oBAAoB,4BAEf,oBAAoB,IACrB,eAAe,GAAG,MAAM,OAAO,MAC/B,kBAAkB,cAAc,GAAG,OACrC,kBAAkB,cAAc,GAAG;KAGxC,eAAe,GAAG,GAAG,iBAAiB,GAAG,iBAAiB,cAAc,MAC3E,EAAE,YAAY,qBAAqB,UAC/B,qBAAqB,GAAG,cAAc,GAAG,OACzC,EAAE,YAAY,sBAAsB,KAClC,sBAAsB,GAAG,cAAc,GAAG,OAC1C,EAAE,YAAY,oBAAoB,KAChC,oBAAoB,GAAG,cAAc,GAAG,OACxC,EAAE,YAAY,0BAA0B,KACtC,IACA,EAAE;KAGT,qBAAqB,GAAG,KAAK,QAAQ,2BAA2B,YAAY,GAAG;KAE/E,sBAAsB,UAAU,QAAQ,KAE3C,iBACI,KAAK,OAEL,QAAQ,kBACN,KAAK,OAEL,YAAY,GAAG;KAElB,oBAAoB,GAAG,KAE1B,UAAU,qBACN,qBAAqB,GAAG,KAExB,iBAAiB,UAAU,wBACzB,sBAAsB,GAAG,KAEzB;KAEH,kBAAkB,KAAK,eAAc,oBAAoB,KAAI,cAAc,KAAK;KAEhF,cAAc,KAAK,UAAU,cAAc,KAAK,IAAI;KA8EpD,cAAc,KAAK,iBAAgB,UAAU,sBAAqB,IAAI;KAGtE,cAAc,KAAK,mBACpB,OAAO,SACP,UAAU,qBACR,OAAO,oBACJ,WAAW,IAAI,EAAE;KAErB,QAAQ,WAAW"}
|
package/build/keys.d.cts
CHANGED
|
@@ -5,51 +5,51 @@ import { EntityConstructor, IdOf, TaggedId } from "./EntityManager.cjs";
|
|
|
5
5
|
import { Entity, IdType } from "./Entity.cjs";
|
|
6
6
|
//#region src/keys.d.ts
|
|
7
7
|
/** Sets the process-wide tagged-id format during metadata boot. */
|
|
8
|
-
declare function setTaggedIdDelimiter(delimiter: string | undefined): void;
|
|
8
|
+
export declare function setTaggedIdDelimiter(delimiter: string | undefined): void;
|
|
9
9
|
type HasTagName = {
|
|
10
10
|
tagName: string;
|
|
11
11
|
/** The database column type, i.e. used to do `::type` casts in Postgres. */
|
|
12
12
|
idDbType: "bigint" | "int" | "uuid" | "text";
|
|
13
13
|
};
|
|
14
14
|
/** Converts our internal/always-tagged `id` to the domain entity's `id` type (could be a number or uuid). */
|
|
15
|
-
declare function toIdOf<T extends Entity>(meta: EntityMetadata<T>, id: TaggedId | undefined): IdOf<T> | undefined;
|
|
16
|
-
declare function maybeResolveReferenceToId(value: Entity | Reference<any, any, any> | string | undefined): TaggedId | undefined;
|
|
15
|
+
export declare function toIdOf<T extends Entity>(meta: EntityMetadata<T>, id: TaggedId | undefined): IdOf<T> | undefined;
|
|
16
|
+
export declare function maybeResolveReferenceToId(value: Entity | Reference<any, any, any> | string | undefined): TaggedId | undefined;
|
|
17
17
|
/** Converts `value` to a number, i.e. for string ids, unless its undefined. */
|
|
18
|
-
declare function keyToNumber(meta: HasTagName, value: string | number): number;
|
|
19
|
-
declare function keyToNumber(meta: HasTagName, value: string | number | undefined): number | undefined;
|
|
18
|
+
export declare function keyToNumber(meta: HasTagName, value: string | number): number;
|
|
19
|
+
export declare function keyToNumber(meta: HasTagName, value: string | number | undefined): number | undefined;
|
|
20
20
|
/** Converts `dbValue` (big int, int, uuid) to a tagged string, unless its undefined. */
|
|
21
|
-
declare function keyToTaggedId(meta: HasTagName, dbValue: string | number): TaggedId | undefined;
|
|
21
|
+
export declare function keyToTaggedId(meta: HasTagName, dbValue: string | number): TaggedId | undefined;
|
|
22
22
|
/** Returns the entity tag followed by the configured ID delimiter. */
|
|
23
|
-
declare function taggedIdPrefix(meta: Pick<HasTagName, "tagName">): string;
|
|
23
|
+
export declare function taggedIdPrefix(meta: Pick<HasTagName, "tagName">): string;
|
|
24
24
|
/** Fails if any keys are untagged; internal batch-loader keys must always be tagged. */
|
|
25
|
-
declare function assertIdsAreTagged(keys: readonly string[]): void;
|
|
25
|
+
export declare function assertIdsAreTagged(keys: readonly string[]): void;
|
|
26
26
|
/** Returns whether `id` is tagged and a probably-correct value. */
|
|
27
|
-
declare function isTaggedId(id: string | number): boolean;
|
|
27
|
+
export declare function isTaggedId(id: string | number): boolean;
|
|
28
28
|
/** Returns whether `id` is tagged and the tag matches `meta`'s tag. */
|
|
29
|
-
declare function isTaggedId(meta: EntityMetadata, id: string): boolean;
|
|
30
|
-
declare function assertIdIsTagged(id: string): void;
|
|
29
|
+
export declare function isTaggedId(meta: EntityMetadata, id: string): boolean;
|
|
30
|
+
export declare function assertIdIsTagged(id: string): void;
|
|
31
31
|
/** We accept an entity in case this is m2o storing a not-yet-saved entity. */
|
|
32
|
-
declare function toTaggedId(meta: HasTagName, id: IdType): TaggedId;
|
|
33
|
-
declare function toTaggedId(meta: HasTagName, id: IdType | undefined): TaggedId | undefined;
|
|
32
|
+
export declare function toTaggedId(meta: HasTagName, id: IdType): TaggedId;
|
|
33
|
+
export declare function toTaggedId(meta: HasTagName, id: IdType | undefined): TaggedId | undefined;
|
|
34
34
|
/** Similar to `toTaggedId`, but we accept an entity for handling relations to not-yet-saved entities. */
|
|
35
|
-
declare function ensureTagged<T extends Entity>(meta: HasTagName, value: T | string | number | undefined): T | TaggedId | undefined;
|
|
35
|
+
export declare function ensureTagged<T extends Entity>(meta: HasTagName, value: T | string | number | undefined): T | TaggedId | undefined;
|
|
36
36
|
/** Tags a potentially untagged id, while our API inputs still accept either tagged or untagged ids. */
|
|
37
|
-
declare function tagId(meta: HasTagName, id: string | number): string;
|
|
38
|
-
declare function tagId(cstr: EntityConstructor<any>, id: string | number): string;
|
|
39
|
-
declare function tagId(meta: HasTagName, id: string | number | null | undefined): string | undefined;
|
|
40
|
-
declare function tagId(cstr: EntityConstructor<any>, id: string | number | null | undefined): string | undefined;
|
|
37
|
+
export declare function tagId(meta: HasTagName, id: string | number): string;
|
|
38
|
+
export declare function tagId(cstr: EntityConstructor<any>, id: string | number): string;
|
|
39
|
+
export declare function tagId(meta: HasTagName, id: string | number | null | undefined): string | undefined;
|
|
40
|
+
export declare function tagId(cstr: EntityConstructor<any>, id: string | number | null | undefined): string | undefined;
|
|
41
41
|
/** Adds the tag prefixes. */
|
|
42
|
-
declare function tagIds(meta: HasTagName, keys: readonly (string | number)[]): readonly string[];
|
|
43
|
-
declare function tagIds(cstr: EntityConstructor<any>, keys: readonly (string | number)[]): readonly string[];
|
|
44
|
-
declare function deTagId(meta: HasTagName, id: string | number): string;
|
|
45
|
-
declare function deTagId(meta: HasTagName, id: string | number | undefined): string | undefined;
|
|
46
|
-
declare function deTagId(entity: Entity): string;
|
|
42
|
+
export declare function tagIds(meta: HasTagName, keys: readonly (string | number)[]): readonly string[];
|
|
43
|
+
export declare function tagIds(cstr: EntityConstructor<any>, keys: readonly (string | number)[]): readonly string[];
|
|
44
|
+
export declare function deTagId(meta: HasTagName, id: string | number): string;
|
|
45
|
+
export declare function deTagId(meta: HasTagName, id: string | number | undefined): string | undefined;
|
|
46
|
+
export declare function deTagId(entity: Entity): string;
|
|
47
47
|
/** Removes the tag prefixes so we can use the keys for SQL operations. */
|
|
48
|
-
declare function deTagIds(meta: HasTagName, keys: readonly string[]): readonly string[];
|
|
48
|
+
export declare function deTagIds(meta: HasTagName, keys: readonly string[]): readonly string[];
|
|
49
49
|
/** Removes the tag prefixes so we can use the keys for SQL operations. */
|
|
50
|
-
declare function unsafeDeTagIds(keys: readonly string[]): readonly string[];
|
|
50
|
+
export declare function unsafeDeTagIds(keys: readonly string[]): readonly string[];
|
|
51
51
|
/** Given a tagged id, returns its tag. */
|
|
52
|
-
declare function tagFromId(id: string): string;
|
|
52
|
+
export declare function tagFromId(id: string): string;
|
|
53
53
|
//#endregion
|
|
54
|
-
export {
|
|
54
|
+
export {};
|
|
55
55
|
//# sourceMappingURL=keys.d.cts.map
|
package/build/keys.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.cts","names":[],"sources":["../src/keys.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"keys.d.cts","names":[],"sources":["../src/keys.ts"],"mappings":";;;;;;;wBAUgB,qBAAqB;KAMhC;EACH;;EAEA;;;wBAIc,OAAO,UAAU,QAAQ,MAAM,eAAe,IAAI,IAAI,uBAAuB,KAAK;wBAgBlF,0BACd,OAAO,SAAS,gDACf;;wBAKa,YAAY,MAAM,YAAY;wBAC9B,YAAY,MAAM,YAAY;;wBAwC9B,cAAc,MAAM,YAAY,2BAA2B;;wBAM3D,eAAe,MAAM,KAAK;;wBAK1B,mBAAmB;;wBAWnB,WAAW;;wBAEX,WAAW,MAAM,gBAAgB;wBAcjC,iBAAiB;;wBAOjB,WAAW,MAAM,YAAY,IAAI,SAAS;wBAC1C,WAAW,MAAM,YAAY,IAAI,qBAAqB;;wBA0BtD,aAAa,UAAU,QACrC,MAAM,YACN,OAAO,kCACN,IAAI;;wBAKS,MAAM,MAAM,YAAY;wBACxB,MAAM,MAAM,wBAAwB;wBACpC,MAAM,MAAM,YAAY;wBACxB,MAAM,MAAM,wBAAwB;;wBAgCpC,OAAO,MAAM,YAAY;wBACzB,OAAO,MAAM,wBAAwB;wBAQrC,QAAQ,MAAM,YAAY;wBAC1B,QAAQ,MAAM,YAAY;wBAC1B,QAAQ,QAAQ;;wBAQhB,SAAS,MAAM,YAAY;;wBAO3B,eAAe;;wBAcf,UAAU"}
|
package/build/keys.d.mts
CHANGED
|
@@ -5,51 +5,51 @@ import { EntityConstructor, IdOf, TaggedId } from "./EntityManager.mjs";
|
|
|
5
5
|
import { Entity, IdType } from "./Entity.mjs";
|
|
6
6
|
//#region src/keys.d.ts
|
|
7
7
|
/** Sets the process-wide tagged-id format during metadata boot. */
|
|
8
|
-
declare function setTaggedIdDelimiter(delimiter: string | undefined): void;
|
|
8
|
+
export declare function setTaggedIdDelimiter(delimiter: string | undefined): void;
|
|
9
9
|
type HasTagName = {
|
|
10
10
|
tagName: string;
|
|
11
11
|
/** The database column type, i.e. used to do `::type` casts in Postgres. */
|
|
12
12
|
idDbType: "bigint" | "int" | "uuid" | "text";
|
|
13
13
|
};
|
|
14
14
|
/** Converts our internal/always-tagged `id` to the domain entity's `id` type (could be a number or uuid). */
|
|
15
|
-
declare function toIdOf<T extends Entity>(meta: EntityMetadata<T>, id: TaggedId | undefined): IdOf<T> | undefined;
|
|
16
|
-
declare function maybeResolveReferenceToId(value: Entity | Reference<any, any, any> | string | undefined): TaggedId | undefined;
|
|
15
|
+
export declare function toIdOf<T extends Entity>(meta: EntityMetadata<T>, id: TaggedId | undefined): IdOf<T> | undefined;
|
|
16
|
+
export declare function maybeResolveReferenceToId(value: Entity | Reference<any, any, any> | string | undefined): TaggedId | undefined;
|
|
17
17
|
/** Converts `value` to a number, i.e. for string ids, unless its undefined. */
|
|
18
|
-
declare function keyToNumber(meta: HasTagName, value: string | number): number;
|
|
19
|
-
declare function keyToNumber(meta: HasTagName, value: string | number | undefined): number | undefined;
|
|
18
|
+
export declare function keyToNumber(meta: HasTagName, value: string | number): number;
|
|
19
|
+
export declare function keyToNumber(meta: HasTagName, value: string | number | undefined): number | undefined;
|
|
20
20
|
/** Converts `dbValue` (big int, int, uuid) to a tagged string, unless its undefined. */
|
|
21
|
-
declare function keyToTaggedId(meta: HasTagName, dbValue: string | number): TaggedId | undefined;
|
|
21
|
+
export declare function keyToTaggedId(meta: HasTagName, dbValue: string | number): TaggedId | undefined;
|
|
22
22
|
/** Returns the entity tag followed by the configured ID delimiter. */
|
|
23
|
-
declare function taggedIdPrefix(meta: Pick<HasTagName, "tagName">): string;
|
|
23
|
+
export declare function taggedIdPrefix(meta: Pick<HasTagName, "tagName">): string;
|
|
24
24
|
/** Fails if any keys are untagged; internal batch-loader keys must always be tagged. */
|
|
25
|
-
declare function assertIdsAreTagged(keys: readonly string[]): void;
|
|
25
|
+
export declare function assertIdsAreTagged(keys: readonly string[]): void;
|
|
26
26
|
/** Returns whether `id` is tagged and a probably-correct value. */
|
|
27
|
-
declare function isTaggedId(id: string | number): boolean;
|
|
27
|
+
export declare function isTaggedId(id: string | number): boolean;
|
|
28
28
|
/** Returns whether `id` is tagged and the tag matches `meta`'s tag. */
|
|
29
|
-
declare function isTaggedId(meta: EntityMetadata, id: string): boolean;
|
|
30
|
-
declare function assertIdIsTagged(id: string): void;
|
|
29
|
+
export declare function isTaggedId(meta: EntityMetadata, id: string): boolean;
|
|
30
|
+
export declare function assertIdIsTagged(id: string): void;
|
|
31
31
|
/** We accept an entity in case this is m2o storing a not-yet-saved entity. */
|
|
32
|
-
declare function toTaggedId(meta: HasTagName, id: IdType): TaggedId;
|
|
33
|
-
declare function toTaggedId(meta: HasTagName, id: IdType | undefined): TaggedId | undefined;
|
|
32
|
+
export declare function toTaggedId(meta: HasTagName, id: IdType): TaggedId;
|
|
33
|
+
export declare function toTaggedId(meta: HasTagName, id: IdType | undefined): TaggedId | undefined;
|
|
34
34
|
/** Similar to `toTaggedId`, but we accept an entity for handling relations to not-yet-saved entities. */
|
|
35
|
-
declare function ensureTagged<T extends Entity>(meta: HasTagName, value: T | string | number | undefined): T | TaggedId | undefined;
|
|
35
|
+
export declare function ensureTagged<T extends Entity>(meta: HasTagName, value: T | string | number | undefined): T | TaggedId | undefined;
|
|
36
36
|
/** Tags a potentially untagged id, while our API inputs still accept either tagged or untagged ids. */
|
|
37
|
-
declare function tagId(meta: HasTagName, id: string | number): string;
|
|
38
|
-
declare function tagId(cstr: EntityConstructor<any>, id: string | number): string;
|
|
39
|
-
declare function tagId(meta: HasTagName, id: string | number | null | undefined): string | undefined;
|
|
40
|
-
declare function tagId(cstr: EntityConstructor<any>, id: string | number | null | undefined): string | undefined;
|
|
37
|
+
export declare function tagId(meta: HasTagName, id: string | number): string;
|
|
38
|
+
export declare function tagId(cstr: EntityConstructor<any>, id: string | number): string;
|
|
39
|
+
export declare function tagId(meta: HasTagName, id: string | number | null | undefined): string | undefined;
|
|
40
|
+
export declare function tagId(cstr: EntityConstructor<any>, id: string | number | null | undefined): string | undefined;
|
|
41
41
|
/** Adds the tag prefixes. */
|
|
42
|
-
declare function tagIds(meta: HasTagName, keys: readonly (string | number)[]): readonly string[];
|
|
43
|
-
declare function tagIds(cstr: EntityConstructor<any>, keys: readonly (string | number)[]): readonly string[];
|
|
44
|
-
declare function deTagId(meta: HasTagName, id: string | number): string;
|
|
45
|
-
declare function deTagId(meta: HasTagName, id: string | number | undefined): string | undefined;
|
|
46
|
-
declare function deTagId(entity: Entity): string;
|
|
42
|
+
export declare function tagIds(meta: HasTagName, keys: readonly (string | number)[]): readonly string[];
|
|
43
|
+
export declare function tagIds(cstr: EntityConstructor<any>, keys: readonly (string | number)[]): readonly string[];
|
|
44
|
+
export declare function deTagId(meta: HasTagName, id: string | number): string;
|
|
45
|
+
export declare function deTagId(meta: HasTagName, id: string | number | undefined): string | undefined;
|
|
46
|
+
export declare function deTagId(entity: Entity): string;
|
|
47
47
|
/** Removes the tag prefixes so we can use the keys for SQL operations. */
|
|
48
|
-
declare function deTagIds(meta: HasTagName, keys: readonly string[]): readonly string[];
|
|
48
|
+
export declare function deTagIds(meta: HasTagName, keys: readonly string[]): readonly string[];
|
|
49
49
|
/** Removes the tag prefixes so we can use the keys for SQL operations. */
|
|
50
|
-
declare function unsafeDeTagIds(keys: readonly string[]): readonly string[];
|
|
50
|
+
export declare function unsafeDeTagIds(keys: readonly string[]): readonly string[];
|
|
51
51
|
/** Given a tagged id, returns its tag. */
|
|
52
|
-
declare function tagFromId(id: string): string;
|
|
52
|
+
export declare function tagFromId(id: string): string;
|
|
53
53
|
//#endregion
|
|
54
|
-
export {
|
|
54
|
+
export {};
|
|
55
55
|
//# sourceMappingURL=keys.d.mts.map
|