@expo/entity 0.45.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{AuthorizationResultBasedEntityAssociationLoader.d.ts → src/AuthorizationResultBasedEntityAssociationLoader.d.ts} +4 -4
- package/build/{AuthorizationResultBasedEntityAssociationLoader.js → src/AuthorizationResultBasedEntityAssociationLoader.js} +2 -1
- package/build/src/AuthorizationResultBasedEntityAssociationLoader.js.map +1 -0
- package/build/{AuthorizationResultBasedEntityLoader.d.ts → src/AuthorizationResultBasedEntityLoader.d.ts} +8 -8
- package/build/{AuthorizationResultBasedEntityLoader.js → src/AuthorizationResultBasedEntityLoader.js} +6 -5
- package/build/src/AuthorizationResultBasedEntityLoader.js.map +1 -0
- package/build/{AuthorizationResultBasedEntityMutator.d.ts → src/AuthorizationResultBasedEntityMutator.d.ts} +15 -13
- package/build/{AuthorizationResultBasedEntityMutator.js → src/AuthorizationResultBasedEntityMutator.js} +77 -39
- package/build/src/AuthorizationResultBasedEntityMutator.js.map +1 -0
- package/build/{ComposedEntityCacheAdapter.d.ts → src/ComposedEntityCacheAdapter.d.ts} +2 -2
- package/build/{ComposedEntityCacheAdapter.js → src/ComposedEntityCacheAdapter.js} +2 -1
- package/build/src/ComposedEntityCacheAdapter.js.map +1 -0
- package/build/{ComposedSecondaryEntityCache.d.ts → src/ComposedSecondaryEntityCache.d.ts} +1 -1
- package/build/{ComposedSecondaryEntityCache.js → src/ComposedSecondaryEntityCache.js} +2 -1
- package/build/src/ComposedSecondaryEntityCache.js.map +1 -0
- package/build/{EnforcingEntityAssociationLoader.d.ts → src/EnforcingEntityAssociationLoader.d.ts} +5 -5
- package/build/{EnforcingEntityAssociationLoader.js → src/EnforcingEntityAssociationLoader.js} +2 -1
- package/build/src/EnforcingEntityAssociationLoader.js.map +1 -0
- package/build/{EnforcingEntityCreator.d.ts → src/EnforcingEntityCreator.d.ts} +4 -4
- package/build/{EnforcingEntityCreator.js → src/EnforcingEntityCreator.js} +2 -1
- package/build/src/EnforcingEntityCreator.js.map +1 -0
- package/build/{EnforcingEntityDeleter.d.ts → src/EnforcingEntityDeleter.d.ts} +4 -4
- package/build/{EnforcingEntityDeleter.js → src/EnforcingEntityDeleter.js} +2 -1
- package/build/src/EnforcingEntityDeleter.js.map +1 -0
- package/build/{EnforcingEntityLoader.d.ts → src/EnforcingEntityLoader.d.ts} +5 -5
- package/build/{EnforcingEntityLoader.js → src/EnforcingEntityLoader.js} +2 -1
- package/build/src/EnforcingEntityLoader.js.map +1 -0
- package/build/{EnforcingEntityUpdater.d.ts → src/EnforcingEntityUpdater.d.ts} +4 -4
- package/build/{EnforcingEntityUpdater.js → src/EnforcingEntityUpdater.js} +2 -1
- package/build/src/EnforcingEntityUpdater.js.map +1 -0
- package/build/{Entity.d.ts → src/Entity.d.ts} +7 -7
- package/build/{Entity.js → src/Entity.js} +13 -15
- package/build/src/Entity.js.map +1 -0
- package/build/{EntityAssociationLoader.d.ts → src/EntityAssociationLoader.d.ts} +5 -5
- package/build/{EntityAssociationLoader.js → src/EntityAssociationLoader.js} +6 -8
- package/build/src/EntityAssociationLoader.js.map +1 -0
- package/build/{EntityCompanion.d.ts → src/EntityCompanion.d.ts} +10 -10
- package/build/{EntityCompanion.js → src/EntityCompanion.js} +6 -8
- package/build/src/EntityCompanion.js.map +1 -0
- package/build/{EntityCompanionProvider.d.ts → src/EntityCompanionProvider.d.ts} +12 -12
- package/build/{EntityCompanionProvider.js → src/EntityCompanionProvider.js} +6 -5
- package/build/src/EntityCompanionProvider.js.map +1 -0
- package/build/{EntityConfiguration.d.ts → src/EntityConfiguration.d.ts} +2 -2
- package/build/{EntityConfiguration.js → src/EntityConfiguration.js} +2 -2
- package/build/src/EntityConfiguration.js.map +1 -0
- package/build/{EntityCreator.d.ts → src/EntityCreator.d.ts} +5 -5
- package/build/{EntityCreator.js → src/EntityCreator.js} +4 -6
- package/build/{EntityCreator.js.map → src/EntityCreator.js.map} +1 -1
- package/build/{EntityDatabaseAdapter.d.ts → src/EntityDatabaseAdapter.d.ts} +2 -2
- package/build/{EntityDatabaseAdapter.js → src/EntityDatabaseAdapter.js} +2 -2
- package/build/src/EntityDatabaseAdapter.js.map +1 -0
- package/build/{EntityDeleter.d.ts → src/EntityDeleter.d.ts} +5 -5
- package/build/{EntityDeleter.js → src/EntityDeleter.js} +5 -7
- package/build/{EntityDeleter.js.map → src/EntityDeleter.js.map} +1 -1
- package/build/{EntityFieldDefinition.d.ts → src/EntityFieldDefinition.d.ts} +3 -3
- package/build/src/EntityFieldDefinition.js.map +1 -0
- package/build/{EntityFields.d.ts → src/EntityFields.d.ts} +7 -0
- package/build/{EntityFields.js → src/EntityFields.js} +11 -1
- package/build/src/EntityFields.js.map +1 -0
- package/build/{EntityLoader.d.ts → src/EntityLoader.d.ts} +7 -7
- package/build/{EntityLoader.js → src/EntityLoader.js} +4 -6
- package/build/{EntityLoader.js.map → src/EntityLoader.js.map} +1 -1
- package/build/{EntityLoaderFactory.d.ts → src/EntityLoaderFactory.d.ts} +8 -8
- package/build/src/EntityLoaderFactory.js +29 -0
- package/build/src/EntityLoaderFactory.js.map +1 -0
- package/build/{EntityLoaderUtils.d.ts → src/EntityLoaderUtils.d.ts} +7 -7
- package/build/{EntityLoaderUtils.js → src/EntityLoaderUtils.js} +2 -1
- package/build/src/EntityLoaderUtils.js.map +1 -0
- package/build/{EntityMutationInfo.d.ts → src/EntityMutationInfo.d.ts} +2 -2
- package/build/src/EntityMutationInfo.js.map +1 -0
- package/build/{EntityMutationTriggerConfiguration.d.ts → src/EntityMutationTriggerConfiguration.d.ts} +3 -3
- package/build/src/EntityMutationTriggerConfiguration.js.map +1 -0
- package/build/{EntityMutationValidator.d.ts → src/EntityMutationValidator.d.ts} +3 -3
- package/build/{EntityMutationValidator.js → src/EntityMutationValidator.js} +2 -1
- package/build/src/EntityMutationValidator.js.map +1 -0
- package/build/{EntityMutatorFactory.d.ts → src/EntityMutatorFactory.d.ts} +15 -14
- package/build/{EntityMutatorFactory.js → src/EntityMutatorFactory.js} +6 -5
- package/build/src/EntityMutatorFactory.js.map +1 -0
- package/build/{EntityPrivacyPolicy.d.ts → src/EntityPrivacyPolicy.d.ts} +6 -6
- package/build/{EntityPrivacyPolicy.js → src/EntityPrivacyPolicy.js} +8 -11
- package/build/{EntityPrivacyPolicy.js.map → src/EntityPrivacyPolicy.js.map} +1 -1
- package/build/{EntityQueryContext.d.ts → src/EntityQueryContext.d.ts} +1 -1
- package/build/src/EntityQueryContext.js.map +1 -0
- package/build/{EntityQueryContextProvider.d.ts → src/EntityQueryContextProvider.d.ts} +2 -2
- package/build/{EntityQueryContextProvider.js → src/EntityQueryContextProvider.js} +2 -1
- package/build/src/EntityQueryContextProvider.js.map +1 -0
- package/build/{EntitySecondaryCacheLoader.d.ts → src/EntitySecondaryCacheLoader.d.ts} +5 -5
- package/build/{EntitySecondaryCacheLoader.js → src/EntitySecondaryCacheLoader.js} +2 -1
- package/build/src/EntitySecondaryCacheLoader.js.map +1 -0
- package/build/{EntityUpdater.d.ts → src/EntityUpdater.d.ts} +5 -5
- package/build/{EntityUpdater.js → src/EntityUpdater.js} +5 -7
- package/build/{EntityUpdater.js.map → src/EntityUpdater.js.map} +1 -1
- package/build/{GenericEntityCacheAdapter.d.ts → src/GenericEntityCacheAdapter.d.ts} +3 -3
- package/build/{GenericEntityCacheAdapter.js → src/GenericEntityCacheAdapter.js} +2 -1
- package/build/src/GenericEntityCacheAdapter.js.map +1 -0
- package/build/{GenericSecondaryEntityCache.d.ts → src/GenericSecondaryEntityCache.d.ts} +2 -2
- package/build/{GenericSecondaryEntityCache.js → src/GenericSecondaryEntityCache.js} +2 -1
- package/build/src/GenericSecondaryEntityCache.js.map +1 -0
- package/build/{IEntityCacheAdapter.d.ts → src/IEntityCacheAdapter.d.ts} +1 -1
- package/build/src/IEntityCacheAdapter.js.map +1 -0
- package/build/{IEntityCacheAdapterProvider.d.ts → src/IEntityCacheAdapterProvider.d.ts} +3 -3
- package/build/src/IEntityCacheAdapterProvider.js.map +1 -0
- package/build/{IEntityDatabaseAdapterProvider.d.ts → src/IEntityDatabaseAdapterProvider.d.ts} +3 -3
- package/build/src/IEntityDatabaseAdapterProvider.js.map +1 -0
- package/build/{IEntityGenericCacher.d.ts → src/IEntityGenericCacher.d.ts} +1 -1
- package/build/src/IEntityGenericCacher.js.map +1 -0
- package/build/{ReadonlyEntity.d.ts → src/ReadonlyEntity.d.ts} +8 -8
- package/build/{ReadonlyEntity.js → src/ReadonlyEntity.js} +9 -8
- package/build/src/ReadonlyEntity.js.map +1 -0
- package/build/{ViewerContext.d.ts → src/ViewerContext.d.ts} +5 -5
- package/build/{ViewerContext.js → src/ViewerContext.js} +4 -6
- package/build/{ViewerContext.js.map → src/ViewerContext.js.map} +1 -1
- package/build/{ViewerScopedEntityCompanion.d.ts → src/ViewerScopedEntityCompanion.d.ts} +9 -9
- package/build/{ViewerScopedEntityCompanion.js → src/ViewerScopedEntityCompanion.js} +6 -8
- package/build/{ViewerScopedEntityCompanion.js.map → src/ViewerScopedEntityCompanion.js.map} +1 -1
- package/build/{ViewerScopedEntityCompanionProvider.d.ts → src/ViewerScopedEntityCompanionProvider.d.ts} +6 -6
- package/build/{ViewerScopedEntityCompanionProvider.js → src/ViewerScopedEntityCompanionProvider.js} +4 -6
- package/build/src/ViewerScopedEntityCompanionProvider.js.map +1 -0
- package/build/{ViewerScopedEntityLoaderFactory.d.ts → src/ViewerScopedEntityLoaderFactory.d.ts} +6 -6
- package/build/{ViewerScopedEntityLoaderFactory.js → src/ViewerScopedEntityLoaderFactory.js} +2 -1
- package/build/src/ViewerScopedEntityLoaderFactory.js.map +1 -0
- package/build/{ViewerScopedEntityMutatorFactory.d.ts → src/ViewerScopedEntityMutatorFactory.d.ts} +9 -8
- package/build/{ViewerScopedEntityMutatorFactory.js → src/ViewerScopedEntityMutatorFactory.js} +6 -5
- package/build/src/ViewerScopedEntityMutatorFactory.js.map +1 -0
- package/build/src/entityUtils.js.map +1 -0
- package/build/{errors → src/errors}/EntityCacheAdapterError.d.ts +2 -2
- package/build/src/errors/EntityCacheAdapterError.js +13 -0
- package/build/src/errors/EntityCacheAdapterError.js.map +1 -0
- package/build/{errors → src/errors}/EntityDatabaseAdapterError.d.ts +2 -2
- package/build/{errors → src/errors}/EntityDatabaseAdapterError.js +4 -37
- package/build/src/errors/EntityDatabaseAdapterError.js.map +1 -0
- package/build/{errors → src/errors}/EntityError.d.ts +1 -1
- package/build/{errors → src/errors}/EntityError.js +2 -2
- package/build/src/errors/EntityError.js.map +1 -0
- package/build/{errors → src/errors}/EntityInvalidFieldValueError.d.ts +5 -5
- package/build/src/errors/EntityInvalidFieldValueError.js +13 -0
- package/build/src/errors/EntityInvalidFieldValueError.js.map +1 -0
- package/build/{errors → src/errors}/EntityNotAuthorizedError.d.ts +4 -4
- package/build/src/errors/EntityNotAuthorizedError.js +16 -0
- package/build/src/errors/EntityNotAuthorizedError.js.map +1 -0
- package/build/{errors → src/errors}/EntityNotFoundError.d.ts +5 -5
- package/build/src/errors/EntityNotFoundError.js +18 -0
- package/build/src/errors/EntityNotFoundError.js.map +1 -0
- package/build/src/index.d.ts +76 -0
- package/build/src/index.js +94 -0
- package/build/src/index.js.map +1 -0
- package/build/{internal → src/internal}/CompositeFieldHolder.d.ts +1 -1
- package/build/src/internal/CompositeFieldHolder.js.map +1 -0
- package/build/src/internal/CompositeFieldValueMap.js.map +1 -0
- package/build/{internal → src/internal}/EntityDataManager.d.ts +5 -5
- package/build/{internal → src/internal}/EntityDataManager.js +2 -1
- package/build/src/internal/EntityDataManager.js.map +1 -0
- package/build/{internal → src/internal}/EntityFieldTransformationUtils.d.ts +1 -1
- package/build/src/internal/EntityFieldTransformationUtils.js.map +1 -0
- package/build/{internal → src/internal}/EntityLoadInterfaces.d.ts +1 -1
- package/build/src/internal/EntityLoadInterfaces.js.map +1 -0
- package/build/{internal → src/internal}/EntityTableDataCoordinator.d.ts +9 -9
- package/build/{internal → src/internal}/EntityTableDataCoordinator.js +5 -7
- package/build/{internal → src/internal}/EntityTableDataCoordinator.js.map +1 -1
- package/build/{internal → src/internal}/ReadThroughEntityCache.d.ts +3 -3
- package/build/{internal → src/internal}/ReadThroughEntityCache.js +2 -2
- package/build/src/internal/ReadThroughEntityCache.js.map +1 -0
- package/build/{internal → src/internal}/SingleFieldHolder.d.ts +1 -1
- package/build/src/internal/SingleFieldHolder.js.map +1 -0
- package/build/{metrics → src/metrics}/EntityMetricsUtils.d.ts +1 -1
- package/build/src/metrics/EntityMetricsUtils.js.map +1 -0
- package/build/{metrics → src/metrics}/IEntityMetricsAdapter.d.ts +1 -1
- package/build/src/metrics/IEntityMetricsAdapter.js.map +1 -0
- package/build/{metrics → src/metrics}/NoOpEntityMetricsAdapter.d.ts +2 -2
- package/build/{metrics → src/metrics}/NoOpEntityMetricsAdapter.js +2 -1
- package/build/src/metrics/NoOpEntityMetricsAdapter.js.map +1 -0
- package/build/{rules → src/rules}/AlwaysAllowPrivacyPolicyRule.d.ts +4 -4
- package/build/src/rules/AlwaysAllowPrivacyPolicyRule.js +14 -0
- package/build/src/rules/AlwaysAllowPrivacyPolicyRule.js.map +1 -0
- package/build/{rules → src/rules}/AlwaysDenyPrivacyPolicyRule.d.ts +4 -4
- package/build/src/rules/AlwaysDenyPrivacyPolicyRule.js +14 -0
- package/build/src/rules/AlwaysDenyPrivacyPolicyRule.js.map +1 -0
- package/build/{rules → src/rules}/AlwaysSkipPrivacyPolicyRule.d.ts +4 -4
- package/build/src/rules/AlwaysSkipPrivacyPolicyRule.js +14 -0
- package/build/src/rules/AlwaysSkipPrivacyPolicyRule.js.map +1 -0
- package/build/{rules → src/rules}/PrivacyPolicyRule.d.ts +3 -3
- package/build/{rules → src/rules}/PrivacyPolicyRule.js +2 -2
- package/build/src/rules/PrivacyPolicyRule.js.map +1 -0
- package/build/{utils → src/utils}/EntityCreationUtils.d.ts +3 -3
- package/build/{utils → src/utils}/EntityCreationUtils.js +2 -5
- package/build/{utils → src/utils}/EntityCreationUtils.js.map +1 -1
- package/build/{utils → src/utils}/EntityPrivacyUtils.d.ts +4 -4
- package/build/{utils → src/utils}/EntityPrivacyUtils.js +4 -7
- package/build/{utils → src/utils}/EntityPrivacyUtils.js.map +1 -1
- package/build/src/utils/collections/SerializableKeyMap.js.map +1 -0
- package/build/src/utils/collections/maps.js.map +1 -0
- package/build/src/utils/collections/sets.js.map +1 -0
- package/build/{utils → src/utils}/mergeEntityMutationTriggerConfigurations.d.ts +3 -3
- package/build/src/utils/mergeEntityMutationTriggerConfigurations.js.map +1 -0
- package/package.json +14 -24
- package/src/AuthorizationResultBasedEntityAssociationLoader.ts +4 -4
- package/src/AuthorizationResultBasedEntityLoader.ts +13 -12
- package/src/AuthorizationResultBasedEntityMutator.ts +78 -63
- package/src/ComposedEntityCacheAdapter.ts +3 -3
- package/src/ComposedSecondaryEntityCache.ts +1 -1
- package/src/EnforcingEntityAssociationLoader.ts +6 -5
- package/src/EnforcingEntityCreator.ts +4 -4
- package/src/EnforcingEntityDeleter.ts +4 -4
- package/src/EnforcingEntityLoader.ts +5 -5
- package/src/EnforcingEntityUpdater.ts +4 -4
- package/src/Entity.ts +10 -10
- package/src/EntityAssociationLoader.ts +5 -5
- package/src/EntityCompanion.ts +10 -10
- package/src/EntityCompanionProvider.ts +13 -13
- package/src/EntityConfiguration.ts +3 -3
- package/src/EntityCreator.ts +5 -5
- package/src/EntityDatabaseAdapter.ts +3 -3
- package/src/EntityDeleter.ts +6 -6
- package/src/EntityFieldDefinition.ts +3 -3
- package/src/EntityFields.ts +13 -0
- package/src/EntityLoader.ts +7 -7
- package/src/EntityLoaderFactory.ts +9 -9
- package/src/EntityLoaderUtils.ts +7 -7
- package/src/EntityMutationInfo.ts +2 -2
- package/src/EntityMutationTriggerConfiguration.ts +3 -3
- package/src/EntityMutationValidator.ts +3 -3
- package/src/EntityMutatorFactory.ts +17 -12
- package/src/EntityPrivacyPolicy.ts +7 -6
- package/src/EntityQueryContext.ts +1 -1
- package/src/EntityQueryContextProvider.ts +3 -3
- package/src/EntitySecondaryCacheLoader.ts +5 -5
- package/src/EntityUpdater.ts +6 -6
- package/src/GenericEntityCacheAdapter.ts +3 -3
- package/src/GenericSecondaryEntityCache.ts +2 -2
- package/src/IEntityCacheAdapter.ts +1 -1
- package/src/IEntityCacheAdapterProvider.ts +3 -3
- package/src/IEntityDatabaseAdapterProvider.ts +3 -3
- package/src/IEntityGenericCacher.ts +1 -1
- package/src/ReadonlyEntity.ts +10 -10
- package/src/ViewerContext.ts +6 -6
- package/src/ViewerScopedEntityCompanion.ts +9 -9
- package/src/ViewerScopedEntityCompanionProvider.ts +6 -6
- package/src/ViewerScopedEntityLoaderFactory.ts +6 -6
- package/src/ViewerScopedEntityMutatorFactory.ts +11 -8
- package/src/__tests__/AuthorizationResultBasedEntityAssociationLoader-test.ts +5 -4
- package/src/__tests__/AuthorizationResultBasedEntityLoader-constructor-test.ts +14 -18
- package/src/__tests__/AuthorizationResultBasedEntityLoader-test.ts +18 -16
- package/src/__tests__/ComposedCacheAdapter-test.ts +5 -3
- package/src/__tests__/ComposedSecondaryEntityCache-test.ts +2 -1
- package/src/__tests__/EnforcingEntityAssociationLoader-test.ts +4 -3
- package/src/__tests__/EnforcingEntityLoader-test.ts +4 -3
- package/src/__tests__/Entity-test.ts +8 -6
- package/src/__tests__/EntityAssociationLoader-test.ts +7 -5
- package/src/__tests__/EntityCommonUseCases-test.ts +10 -9
- package/src/__tests__/EntityCompanion-test.ts +13 -11
- package/src/__tests__/EntityCompanionProvider-test.ts +7 -5
- package/src/__tests__/EntityConfiguration-test.ts +3 -1
- package/src/__tests__/EntityDatabaseAdapter-test.ts +9 -7
- package/src/__tests__/EntityEdges-test.ts +10 -8
- package/src/__tests__/EntityFields-test.ts +15 -7
- package/src/__tests__/EntityLoader-test.ts +8 -6
- package/src/__tests__/EntityMutator-MutationCacheConsistency-test.ts +8 -6
- package/src/__tests__/EntityMutator-SingleCompositeFieldCacheConsistency-test.ts +5 -3
- package/src/__tests__/EntityMutator-test.ts +250 -45
- package/src/__tests__/EntityPrivacyPolicy-test.ts +19 -16
- package/src/__tests__/EntityQueryContext-test.ts +7 -6
- package/src/__tests__/EntitySecondaryCacheLoader-test.ts +5 -3
- package/src/__tests__/EntitySelfReferentialEdges-test.ts +7 -5
- package/src/__tests__/GenericEntityCacheAdapter-test.ts +4 -3
- package/src/__tests__/ReadonlyEntity-test.ts +10 -9
- package/src/__tests__/ViewerContext-test.ts +3 -1
- package/src/__tests__/ViewerScopedEntityCompanion-test.ts +10 -8
- package/src/__tests__/ViewerScopedEntityCompanionProvider-test.ts +7 -6
- package/src/__tests__/ViewerScopedEntityLoaderFactory-test.ts +5 -4
- package/src/__tests__/ViewerScopedEntityMutatorFactory-test.ts +8 -6
- package/src/__tests__/cases/TwoEntitySameTableDisjointRows-test.ts +15 -13
- package/src/__tests__/cases/TwoEntitySameTableOverlappingRows-test.ts +7 -5
- package/src/__tests__/entityUtils-test.ts +3 -2
- package/src/errors/EntityCacheAdapterError.ts +2 -2
- package/src/errors/EntityDatabaseAdapterError.ts +2 -2
- package/src/errors/EntityError.ts +1 -1
- package/src/errors/EntityInvalidFieldValueError.ts +5 -5
- package/src/errors/EntityNotAuthorizedError.ts +4 -4
- package/src/errors/EntityNotFoundError.ts +5 -5
- package/src/errors/__tests__/EntityDatabaseAdapterError-test.ts +6 -3
- package/src/index.ts +39 -54
- package/src/internal/CompositeFieldHolder.ts +2 -1
- package/src/internal/EntityDataManager.ts +7 -5
- package/src/internal/EntityFieldTransformationUtils.ts +1 -1
- package/src/internal/EntityLoadInterfaces.ts +1 -1
- package/src/internal/EntityTableDataCoordinator.ts +10 -10
- package/src/internal/ReadThroughEntityCache.ts +3 -3
- package/src/internal/SingleFieldHolder.ts +1 -1
- package/src/internal/__tests__/CompositeFieldHolder-test.ts +2 -0
- package/src/internal/__tests__/CompositeFieldValueMap-test.ts +2 -0
- package/src/internal/__tests__/EntityDataManager-test.ts +34 -31
- package/src/internal/__tests__/EntityFieldTransformationUtils-test.ts +5 -3
- package/src/internal/__tests__/ReadThroughEntityCache-test.ts +5 -4
- package/src/metrics/EntityMetricsUtils.ts +3 -2
- package/src/metrics/IEntityMetricsAdapter.ts +1 -1
- package/src/metrics/NoOpEntityMetricsAdapter.ts +3 -2
- package/src/rules/AlwaysAllowPrivacyPolicyRule.ts +4 -4
- package/src/rules/AlwaysDenyPrivacyPolicyRule.ts +4 -4
- package/src/rules/AlwaysSkipPrivacyPolicyRule.ts +4 -4
- package/src/rules/PrivacyPolicyRule.ts +3 -3
- package/src/rules/__tests__/AlwaysAllowPrivacyPolicyRule-test.ts +3 -3
- package/src/rules/__tests__/AlwaysDenyPrivacyPolicyRule-test.ts +3 -3
- package/src/rules/__tests__/AlwaysSkipPrivacyPolicyRule-test.ts +3 -3
- package/src/utils/EntityCreationUtils.ts +4 -4
- package/src/utils/EntityPrivacyUtils.ts +5 -5
- package/src/utils/__testfixtures__/PrivacyPolicyRuleTestUtils.ts +5 -3
- package/src/utils/__testfixtures__/SimpleTestEntity.ts +6 -6
- package/src/utils/__testfixtures__/StubCacheAdapter.ts +4 -4
- package/src/utils/__testfixtures__/StubDatabaseAdapter.ts +8 -7
- package/src/utils/__testfixtures__/StubDatabaseAdapterProvider.ts +5 -5
- package/src/utils/__testfixtures__/StubQueryContextProvider.ts +2 -2
- package/src/utils/__testfixtures__/TestEntity.ts +7 -7
- package/src/utils/__testfixtures__/TestEntity2.ts +6 -6
- package/src/utils/__testfixtures__/TestEntityWithMutationTriggers.ts +6 -10
- package/src/utils/__testfixtures__/TestViewerContext.ts +2 -2
- package/src/utils/__testfixtures__/createUnitTestEntityCompanionProvider.ts +5 -5
- package/src/utils/__testfixtures__/describeFieldTestCase.ts +3 -1
- package/src/utils/__tests__/EntityCreationUtils-test.ts +5 -3
- package/src/utils/__tests__/EntityPrivacyUtils-test.ts +15 -13
- package/src/utils/__tests__/canViewerDeleteAsync-edgeDeletionPermissionInferenceBehavior-test.ts +10 -8
- package/src/utils/__tests__/mergeEntityMutationTriggerConfigurations-test.ts +2 -0
- package/src/utils/collections/__tests__/SerializableKeyMap-test.ts +2 -0
- package/src/utils/collections/__tests__/maps-test.ts +3 -1
- package/src/utils/collections/__tests__/sets-test.ts +2 -0
- package/src/utils/mergeEntityMutationTriggerConfigurations.ts +3 -3
- package/LICENSE +0 -21
- package/build/AuthorizationResultBasedEntityAssociationLoader.js.map +0 -1
- package/build/AuthorizationResultBasedEntityLoader.js.map +0 -1
- package/build/AuthorizationResultBasedEntityMutator.js.map +0 -1
- package/build/ComposedEntityCacheAdapter.js.map +0 -1
- package/build/ComposedSecondaryEntityCache.js.map +0 -1
- package/build/EnforcingEntityAssociationLoader.js.map +0 -1
- package/build/EnforcingEntityCreator.js.map +0 -1
- package/build/EnforcingEntityDeleter.js.map +0 -1
- package/build/EnforcingEntityLoader.js.map +0 -1
- package/build/EnforcingEntityUpdater.js.map +0 -1
- package/build/Entity.js.map +0 -1
- package/build/EntityAssociationLoader.js.map +0 -1
- package/build/EntityCompanion.js.map +0 -1
- package/build/EntityCompanionProvider.js.map +0 -1
- package/build/EntityConfiguration.js.map +0 -1
- package/build/EntityDatabaseAdapter.js.map +0 -1
- package/build/EntityFieldDefinition.js.map +0 -1
- package/build/EntityFields.js.map +0 -1
- package/build/EntityLoaderFactory.js +0 -31
- package/build/EntityLoaderFactory.js.map +0 -1
- package/build/EntityLoaderUtils.js.map +0 -1
- package/build/EntityMutationInfo.js.map +0 -1
- package/build/EntityMutationTriggerConfiguration.js.map +0 -1
- package/build/EntityMutationValidator.js.map +0 -1
- package/build/EntityMutatorFactory.js.map +0 -1
- package/build/EntityQueryContext.js.map +0 -1
- package/build/EntityQueryContextProvider.js.map +0 -1
- package/build/EntitySecondaryCacheLoader.js.map +0 -1
- package/build/GenericEntityCacheAdapter.js.map +0 -1
- package/build/GenericSecondaryEntityCache.js.map +0 -1
- package/build/IEntityCacheAdapter.js.map +0 -1
- package/build/IEntityCacheAdapterProvider.js.map +0 -1
- package/build/IEntityDatabaseAdapterProvider.js.map +0 -1
- package/build/IEntityGenericCacher.js.map +0 -1
- package/build/ReadonlyEntity.js.map +0 -1
- package/build/ViewerScopedEntityCompanionProvider.js.map +0 -1
- package/build/ViewerScopedEntityLoaderFactory.js.map +0 -1
- package/build/ViewerScopedEntityMutatorFactory.js.map +0 -1
- package/build/entityUtils.js.map +0 -1
- package/build/errors/EntityCacheAdapterError.js +0 -46
- package/build/errors/EntityCacheAdapterError.js.map +0 -1
- package/build/errors/EntityDatabaseAdapterError.js.map +0 -1
- package/build/errors/EntityError.js.map +0 -1
- package/build/errors/EntityInvalidFieldValueError.js +0 -45
- package/build/errors/EntityInvalidFieldValueError.js.map +0 -1
- package/build/errors/EntityNotAuthorizedError.js +0 -48
- package/build/errors/EntityNotAuthorizedError.js.map +0 -1
- package/build/errors/EntityNotFoundError.js +0 -50
- package/build/errors/EntityNotFoundError.js.map +0 -1
- package/build/index.d.ts +0 -91
- package/build/index.js +0 -155
- package/build/index.js.map +0 -1
- package/build/internal/CompositeFieldHolder.js.map +0 -1
- package/build/internal/CompositeFieldValueMap.js.map +0 -1
- package/build/internal/EntityDataManager.js.map +0 -1
- package/build/internal/EntityFieldTransformationUtils.js.map +0 -1
- package/build/internal/EntityLoadInterfaces.js.map +0 -1
- package/build/internal/ReadThroughEntityCache.js.map +0 -1
- package/build/internal/SingleFieldHolder.js.map +0 -1
- package/build/metrics/EntityMetricsUtils.js.map +0 -1
- package/build/metrics/IEntityMetricsAdapter.js.map +0 -1
- package/build/metrics/NoOpEntityMetricsAdapter.js.map +0 -1
- package/build/rules/AlwaysAllowPrivacyPolicyRule.js +0 -46
- package/build/rules/AlwaysAllowPrivacyPolicyRule.js.map +0 -1
- package/build/rules/AlwaysDenyPrivacyPolicyRule.js +0 -46
- package/build/rules/AlwaysDenyPrivacyPolicyRule.js.map +0 -1
- package/build/rules/AlwaysSkipPrivacyPolicyRule.js +0 -46
- package/build/rules/AlwaysSkipPrivacyPolicyRule.js.map +0 -1
- package/build/rules/PrivacyPolicyRule.js.map +0 -1
- package/build/tsconfig.build.tsbuildinfo +0 -1
- package/build/utils/collections/SerializableKeyMap.js.map +0 -1
- package/build/utils/collections/maps.js.map +0 -1
- package/build/utils/collections/sets.js.map +0 -1
- package/build/utils/mergeEntityMutationTriggerConfigurations.js.map +0 -1
- /package/build/{EntityFieldDefinition.js → src/EntityFieldDefinition.js} +0 -0
- /package/build/{EntityMutationInfo.js → src/EntityMutationInfo.js} +0 -0
- /package/build/{EntityMutationTriggerConfiguration.js → src/EntityMutationTriggerConfiguration.js} +0 -0
- /package/build/{EntityQueryContext.js → src/EntityQueryContext.js} +0 -0
- /package/build/{IEntityCacheAdapter.js → src/IEntityCacheAdapter.js} +0 -0
- /package/build/{IEntityCacheAdapterProvider.js → src/IEntityCacheAdapterProvider.js} +0 -0
- /package/build/{IEntityDatabaseAdapterProvider.js → src/IEntityDatabaseAdapterProvider.js} +0 -0
- /package/build/{IEntityGenericCacher.js → src/IEntityGenericCacher.js} +0 -0
- /package/build/{entityUtils.d.ts → src/entityUtils.d.ts} +0 -0
- /package/build/{entityUtils.js → src/entityUtils.js} +0 -0
- /package/build/{internal → src/internal}/CompositeFieldHolder.js +0 -0
- /package/build/{internal → src/internal}/CompositeFieldValueMap.d.ts +0 -0
- /package/build/{internal → src/internal}/CompositeFieldValueMap.js +0 -0
- /package/build/{internal → src/internal}/EntityFieldTransformationUtils.js +0 -0
- /package/build/{internal → src/internal}/EntityLoadInterfaces.js +0 -0
- /package/build/{internal → src/internal}/SingleFieldHolder.js +0 -0
- /package/build/{metrics → src/metrics}/EntityMetricsUtils.js +0 -0
- /package/build/{metrics → src/metrics}/IEntityMetricsAdapter.js +0 -0
- /package/build/{utils → src/utils}/collections/SerializableKeyMap.d.ts +0 -0
- /package/build/{utils → src/utils}/collections/SerializableKeyMap.js +0 -0
- /package/build/{utils → src/utils}/collections/maps.d.ts +0 -0
- /package/build/{utils → src/utils}/collections/maps.js +0 -0
- /package/build/{utils → src/utils}/collections/sets.d.ts +0 -0
- /package/build/{utils → src/utils}/collections/sets.js +0 -0
- /package/build/{utils → src/utils}/mergeEntityMutationTriggerConfigurations.js +0 -0
|
@@ -1,19 +1,21 @@
|
|
|
1
|
+
import { describe, expect, it, test } from '@jest/globals';
|
|
1
2
|
import { v1 as uuidv1, v3 as uuidv3, v4 as uuidv4, v5 as uuidv5 } from 'uuid';
|
|
2
3
|
|
|
3
4
|
import { EntityFieldDefinition } from '../EntityFieldDefinition';
|
|
4
5
|
import {
|
|
5
|
-
StringField,
|
|
6
|
-
UUIDField,
|
|
7
|
-
DateField,
|
|
8
6
|
BooleanField,
|
|
9
|
-
|
|
7
|
+
BufferField,
|
|
8
|
+
DateField,
|
|
9
|
+
EnumField,
|
|
10
10
|
FloatField,
|
|
11
|
-
|
|
11
|
+
IntField,
|
|
12
12
|
JSONObjectField,
|
|
13
|
-
EnumField,
|
|
14
13
|
StrictEnumField,
|
|
14
|
+
StringArrayField,
|
|
15
|
+
StringField,
|
|
16
|
+
UUIDField,
|
|
15
17
|
} from '../EntityFields';
|
|
16
|
-
import describeFieldTestCase from '../utils/__testfixtures__/describeFieldTestCase';
|
|
18
|
+
import { describeFieldTestCase } from '../utils/__testfixtures__/describeFieldTestCase';
|
|
17
19
|
|
|
18
20
|
class TestFieldDefinition extends EntityFieldDefinition<string, false> {
|
|
19
21
|
protected validateInputValueInternal(value: string): boolean {
|
|
@@ -87,3 +89,9 @@ describeFieldTestCase(
|
|
|
87
89
|
[TestEnum.HELLO, TestEnum.WHO, 'world'],
|
|
88
90
|
['what', 1, true],
|
|
89
91
|
);
|
|
92
|
+
|
|
93
|
+
describeFieldTestCase(
|
|
94
|
+
new BufferField({ columnName: 'wat' }),
|
|
95
|
+
[Buffer.from('hello')],
|
|
96
|
+
['hello', 1, true],
|
|
97
|
+
);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { describe, expect, it } from '@jest/globals';
|
|
2
|
+
|
|
3
|
+
import { AuthorizationResultBasedEntityLoader } from '../AuthorizationResultBasedEntityLoader';
|
|
4
|
+
import { EnforcingEntityLoader } from '../EnforcingEntityLoader';
|
|
5
|
+
import { EntityLoader } from '../EntityLoader';
|
|
6
|
+
import { EntityLoaderUtils } from '../EntityLoaderUtils';
|
|
7
|
+
import { ViewerContext } from '../ViewerContext';
|
|
8
|
+
import { SimpleTestEntity } from '../utils/__testfixtures__/SimpleTestEntity';
|
|
7
9
|
import { createUnitTestEntityCompanionProvider } from '../utils/__testfixtures__/createUnitTestEntityCompanionProvider';
|
|
8
10
|
|
|
9
11
|
describe(EntityLoader, () => {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { describe, test } from '@jest/globals';
|
|
2
|
+
|
|
3
|
+
import { Entity } from '../Entity';
|
|
2
4
|
import { EntityCompanionDefinition } from '../EntityCompanionProvider';
|
|
3
|
-
import EntityConfiguration from '../EntityConfiguration';
|
|
5
|
+
import { EntityConfiguration } from '../EntityConfiguration';
|
|
4
6
|
import { UUIDField } from '../EntityFields';
|
|
5
7
|
import { EntityMutationType, EntityTriggerMutationInfo } from '../EntityMutationInfo';
|
|
6
8
|
import { EntityNonTransactionalMutationTrigger } from '../EntityMutationTriggerConfiguration';
|
|
7
|
-
import EntityMutatorFactory from '../EntityMutatorFactory';
|
|
8
|
-
import EntityPrivacyPolicy from '../EntityPrivacyPolicy';
|
|
9
|
-
import ViewerContext from '../ViewerContext';
|
|
10
|
-
import AlwaysAllowPrivacyPolicyRule from '../rules/AlwaysAllowPrivacyPolicyRule';
|
|
9
|
+
import { EntityMutatorFactory } from '../EntityMutatorFactory';
|
|
10
|
+
import { EntityPrivacyPolicy } from '../EntityPrivacyPolicy';
|
|
11
|
+
import { ViewerContext } from '../ViewerContext';
|
|
12
|
+
import { AlwaysAllowPrivacyPolicyRule } from '../rules/AlwaysAllowPrivacyPolicyRule';
|
|
11
13
|
import { createUnitTestEntityCompanionProvider } from '../utils/__testfixtures__/createUnitTestEntityCompanionProvider';
|
|
12
14
|
|
|
13
15
|
type BlahFields = {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
1
|
+
import { describe, expect, test } from '@jest/globals';
|
|
2
|
+
|
|
3
|
+
import { EntityMutatorFactory } from '../EntityMutatorFactory';
|
|
4
|
+
import { ViewerContext } from '../ViewerContext';
|
|
5
|
+
import { TestEntity } from '../utils/__testfixtures__/TestEntity';
|
|
4
6
|
import { createUnitTestEntityCompanionProvider } from '../utils/__testfixtures__/createUnitTestEntityCompanionProvider';
|
|
5
7
|
|
|
6
8
|
describe(EntityMutatorFactory, () => {
|
|
@@ -1,55 +1,60 @@
|
|
|
1
1
|
import { enforceAsyncResult } from '@expo/results';
|
|
2
|
+
import { describe, expect, it } from '@jest/globals';
|
|
2
3
|
import {
|
|
4
|
+
anyOfClass,
|
|
5
|
+
anything,
|
|
6
|
+
deepEqual,
|
|
7
|
+
instance,
|
|
3
8
|
mock,
|
|
9
|
+
objectContaining,
|
|
4
10
|
spy,
|
|
5
11
|
verify,
|
|
6
|
-
anyOfClass,
|
|
7
|
-
instance,
|
|
8
12
|
when,
|
|
9
|
-
anything,
|
|
10
|
-
objectContaining,
|
|
11
|
-
deepEqual,
|
|
12
13
|
} from 'ts-mockito';
|
|
13
14
|
import { v4 as uuidv4 } from 'uuid';
|
|
14
15
|
|
|
15
|
-
import AuthorizationResultBasedEntityLoader from '../AuthorizationResultBasedEntityLoader';
|
|
16
|
-
import EntityCompanionProvider from '../EntityCompanionProvider';
|
|
17
|
-
import EntityConfiguration from '../EntityConfiguration';
|
|
18
|
-
import EntityDatabaseAdapter from '../EntityDatabaseAdapter';
|
|
19
|
-
import EntityLoaderFactory from '../EntityLoaderFactory';
|
|
20
|
-
import EntityLoaderUtils from '../EntityLoaderUtils';
|
|
16
|
+
import { AuthorizationResultBasedEntityLoader } from '../AuthorizationResultBasedEntityLoader';
|
|
17
|
+
import { EntityCompanionProvider } from '../EntityCompanionProvider';
|
|
18
|
+
import { EntityConfiguration } from '../EntityConfiguration';
|
|
19
|
+
import { EntityDatabaseAdapter } from '../EntityDatabaseAdapter';
|
|
20
|
+
import { EntityLoaderFactory } from '../EntityLoaderFactory';
|
|
21
|
+
import { EntityLoaderUtils } from '../EntityLoaderUtils';
|
|
21
22
|
import {
|
|
23
|
+
EntityCascadingDeletionInfo,
|
|
22
24
|
EntityMutationType,
|
|
23
25
|
EntityTriggerMutationInfo,
|
|
24
26
|
EntityValidatorMutationInfo,
|
|
25
27
|
} from '../EntityMutationInfo';
|
|
26
|
-
import
|
|
28
|
+
import {
|
|
27
29
|
EntityMutationTrigger,
|
|
30
|
+
EntityMutationTriggerConfiguration,
|
|
28
31
|
EntityNonTransactionalMutationTrigger,
|
|
29
32
|
} from '../EntityMutationTriggerConfiguration';
|
|
30
|
-
import EntityMutationValidator from '../EntityMutationValidator';
|
|
31
|
-
import EntityMutatorFactory from '../EntityMutatorFactory';
|
|
33
|
+
import { EntityMutationValidator } from '../EntityMutationValidator';
|
|
34
|
+
import { EntityMutatorFactory } from '../EntityMutatorFactory';
|
|
32
35
|
import { EntityPrivacyPolicyEvaluationContext } from '../EntityPrivacyPolicy';
|
|
33
|
-
import {
|
|
34
|
-
import IEntityDatabaseAdapterProvider from '../IEntityDatabaseAdapterProvider';
|
|
35
|
-
import ViewerContext from '../ViewerContext';
|
|
36
|
+
import { EntityQueryContext, EntityTransactionalQueryContext } from '../EntityQueryContext';
|
|
37
|
+
import { IEntityDatabaseAdapterProvider } from '../IEntityDatabaseAdapterProvider';
|
|
38
|
+
import { ViewerContext } from '../ViewerContext';
|
|
36
39
|
import { enforceResultsAsync } from '../entityUtils';
|
|
37
|
-
import EntityDataManager from '../internal/EntityDataManager';
|
|
38
|
-
import ReadThroughEntityCache from '../internal/ReadThroughEntityCache';
|
|
39
|
-
import
|
|
40
|
-
import NoOpEntityMetricsAdapter from '../metrics/NoOpEntityMetricsAdapter';
|
|
41
|
-
import
|
|
40
|
+
import { EntityDataManager } from '../internal/EntityDataManager';
|
|
41
|
+
import { ReadThroughEntityCache } from '../internal/ReadThroughEntityCache';
|
|
42
|
+
import { EntityMetricsMutationType, IEntityMetricsAdapter } from '../metrics/IEntityMetricsAdapter';
|
|
43
|
+
import { NoOpEntityMetricsAdapter } from '../metrics/NoOpEntityMetricsAdapter';
|
|
44
|
+
import {
|
|
45
|
+
SimpleTestEntity,
|
|
42
46
|
simpleTestEntityConfiguration,
|
|
43
47
|
SimpleTestEntityPrivacyPolicy,
|
|
44
48
|
SimpleTestFields,
|
|
45
49
|
} from '../utils/__testfixtures__/SimpleTestEntity';
|
|
46
50
|
import { NoCacheStubCacheAdapterProvider } from '../utils/__testfixtures__/StubCacheAdapter';
|
|
47
|
-
import StubDatabaseAdapter from '../utils/__testfixtures__/StubDatabaseAdapter';
|
|
48
|
-
import StubQueryContextProvider from '../utils/__testfixtures__/StubQueryContextProvider';
|
|
49
|
-
import
|
|
50
|
-
|
|
51
|
-
TestEntityPrivacyPolicy,
|
|
51
|
+
import { StubDatabaseAdapter } from '../utils/__testfixtures__/StubDatabaseAdapter';
|
|
52
|
+
import { StubQueryContextProvider } from '../utils/__testfixtures__/StubQueryContextProvider';
|
|
53
|
+
import {
|
|
54
|
+
TestEntity,
|
|
52
55
|
testEntityConfiguration,
|
|
56
|
+
TestEntityPrivacyPolicy,
|
|
57
|
+
TestFields,
|
|
53
58
|
} from '../utils/__testfixtures__/TestEntity';
|
|
54
59
|
|
|
55
60
|
class TestMutationTrigger extends EntityMutationTrigger<
|
|
@@ -592,7 +597,7 @@ describe(EntityMutatorFactory, () => {
|
|
|
592
597
|
|
|
593
598
|
const updatedEntity = await enforceAsyncResult(
|
|
594
599
|
entityMutatorFactory
|
|
595
|
-
.forUpdate(existingEntity, queryContext)
|
|
600
|
+
.forUpdate(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
596
601
|
.setField('stringField', 'huh2')
|
|
597
602
|
.updateAsync(),
|
|
598
603
|
);
|
|
@@ -645,7 +650,7 @@ describe(EntityMutatorFactory, () => {
|
|
|
645
650
|
|
|
646
651
|
await enforceAsyncResult(
|
|
647
652
|
entityMutatorFactory
|
|
648
|
-
.forUpdate(existingEntity, queryContext)
|
|
653
|
+
.forUpdate(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
649
654
|
.setField('stringField', 'huh2')
|
|
650
655
|
.updateAsync(),
|
|
651
656
|
);
|
|
@@ -719,7 +724,7 @@ describe(EntityMutatorFactory, () => {
|
|
|
719
724
|
|
|
720
725
|
await enforceAsyncResult(
|
|
721
726
|
entityMutatorFactory
|
|
722
|
-
.forUpdate(existingEntity, queryContext)
|
|
727
|
+
.forUpdate(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
723
728
|
.setField('stringField', 'huh2')
|
|
724
729
|
.updateAsync(),
|
|
725
730
|
);
|
|
@@ -791,7 +796,7 @@ describe(EntityMutatorFactory, () => {
|
|
|
791
796
|
|
|
792
797
|
await enforceAsyncResult(
|
|
793
798
|
entityMutatorFactory
|
|
794
|
-
.forUpdate(existingEntity, queryContext)
|
|
799
|
+
.forUpdate(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
795
800
|
.setField('stringField', 'huh2')
|
|
796
801
|
.updateAsync(),
|
|
797
802
|
);
|
|
@@ -803,6 +808,116 @@ describe(EntityMutatorFactory, () => {
|
|
|
803
808
|
});
|
|
804
809
|
});
|
|
805
810
|
|
|
811
|
+
it('passes manaully-specified cascading delete cause to privacy policy and validators and triggers', async () => {
|
|
812
|
+
const viewerContext = mock<ViewerContext>();
|
|
813
|
+
const privacyPolicyEvaluationContext =
|
|
814
|
+
instance(
|
|
815
|
+
mock<
|
|
816
|
+
EntityPrivacyPolicyEvaluationContext<
|
|
817
|
+
TestFields,
|
|
818
|
+
'customIdField',
|
|
819
|
+
ViewerContext,
|
|
820
|
+
TestEntity,
|
|
821
|
+
keyof TestFields
|
|
822
|
+
>
|
|
823
|
+
>(),
|
|
824
|
+
);
|
|
825
|
+
const queryContext = new StubQueryContextProvider().getQueryContext();
|
|
826
|
+
|
|
827
|
+
const id1 = uuidv4();
|
|
828
|
+
const id2 = uuidv4();
|
|
829
|
+
const {
|
|
830
|
+
privacyPolicy,
|
|
831
|
+
mutationTriggers,
|
|
832
|
+
mutationValidators,
|
|
833
|
+
entityMutatorFactory,
|
|
834
|
+
entityLoaderFactory,
|
|
835
|
+
} = createEntityMutatorFactory([
|
|
836
|
+
{
|
|
837
|
+
customIdField: id1,
|
|
838
|
+
stringField: 'huh',
|
|
839
|
+
testIndexedField: '3',
|
|
840
|
+
intField: 3,
|
|
841
|
+
dateField: new Date(),
|
|
842
|
+
nullableField: null,
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
customIdField: id2,
|
|
846
|
+
stringField: 'huh',
|
|
847
|
+
testIndexedField: '4',
|
|
848
|
+
intField: 3,
|
|
849
|
+
dateField: new Date(),
|
|
850
|
+
nullableField: null,
|
|
851
|
+
},
|
|
852
|
+
]);
|
|
853
|
+
|
|
854
|
+
const spiedPrivacyPolicy = spy(privacyPolicy);
|
|
855
|
+
const triggerSpies = setUpMutationTriggerSpies(mutationTriggers);
|
|
856
|
+
const validatorSpies = setUpMutationValidatorSpies(mutationValidators);
|
|
857
|
+
|
|
858
|
+
const existingEntity = await enforceAsyncResult(
|
|
859
|
+
entityLoaderFactory
|
|
860
|
+
.forLoad(viewerContext, queryContext, privacyPolicyEvaluationContext)
|
|
861
|
+
.loadByIDAsync(id2),
|
|
862
|
+
);
|
|
863
|
+
|
|
864
|
+
const cascadingDeleteCause: EntityCascadingDeletionInfo = {
|
|
865
|
+
entity: 'blah' as any,
|
|
866
|
+
cascadingDeleteCause: null,
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
await enforceAsyncResult(
|
|
870
|
+
entityMutatorFactory
|
|
871
|
+
.forUpdate(existingEntity, queryContext, cascadingDeleteCause)
|
|
872
|
+
.setField('stringField', 'huh2')
|
|
873
|
+
.updateAsync(),
|
|
874
|
+
);
|
|
875
|
+
|
|
876
|
+
verify(
|
|
877
|
+
spiedPrivacyPolicy.authorizeUpdateAsync(
|
|
878
|
+
viewerContext,
|
|
879
|
+
anyOfClass(EntityTransactionalQueryContext),
|
|
880
|
+
deepEqual({ previousValue: existingEntity, cascadingDeleteCause }),
|
|
881
|
+
anyOfClass(TestEntity),
|
|
882
|
+
anything(),
|
|
883
|
+
),
|
|
884
|
+
).once();
|
|
885
|
+
|
|
886
|
+
verify(
|
|
887
|
+
spiedPrivacyPolicy.authorizeReadAsync(
|
|
888
|
+
viewerContext,
|
|
889
|
+
anyOfClass(EntityTransactionalQueryContext),
|
|
890
|
+
deepEqual({ previousValue: existingEntity, cascadingDeleteCause }),
|
|
891
|
+
anyOfClass(TestEntity),
|
|
892
|
+
anything(),
|
|
893
|
+
),
|
|
894
|
+
).once();
|
|
895
|
+
|
|
896
|
+
verifyValidatorCounts(viewerContext, validatorSpies, 1, {
|
|
897
|
+
type: EntityMutationType.UPDATE,
|
|
898
|
+
previousValue: existingEntity,
|
|
899
|
+
cascadingDeleteCause,
|
|
900
|
+
});
|
|
901
|
+
|
|
902
|
+
verifyTriggerCounts(
|
|
903
|
+
viewerContext,
|
|
904
|
+
triggerSpies,
|
|
905
|
+
{
|
|
906
|
+
beforeCreate: false,
|
|
907
|
+
afterCreate: false,
|
|
908
|
+
beforeUpdate: true,
|
|
909
|
+
afterUpdate: true,
|
|
910
|
+
beforeDelete: false,
|
|
911
|
+
afterDelete: false,
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
type: EntityMutationType.UPDATE,
|
|
915
|
+
previousValue: existingEntity,
|
|
916
|
+
cascadingDeleteCause,
|
|
917
|
+
},
|
|
918
|
+
);
|
|
919
|
+
});
|
|
920
|
+
|
|
806
921
|
it('throws when id field is updated', async () => {
|
|
807
922
|
const viewerContext = mock<ViewerContext>();
|
|
808
923
|
const privacyPolicyEvaluationContext =
|
|
@@ -840,7 +955,7 @@ describe(EntityMutatorFactory, () => {
|
|
|
840
955
|
await expect(
|
|
841
956
|
enforceAsyncResult(
|
|
842
957
|
entityMutatorFactory
|
|
843
|
-
.forUpdate(existingEntity, queryContext)
|
|
958
|
+
.forUpdate(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
844
959
|
.setField('customIdField', uuidv4())
|
|
845
960
|
.updateAsync(),
|
|
846
961
|
),
|
|
@@ -892,7 +1007,9 @@ describe(EntityMutatorFactory, () => {
|
|
|
892
1007
|
expect(existingEntity).toBeTruthy();
|
|
893
1008
|
|
|
894
1009
|
await enforceAsyncResult(
|
|
895
|
-
entityMutatorFactory
|
|
1010
|
+
entityMutatorFactory
|
|
1011
|
+
.forDelete(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1012
|
+
.deleteAsync(),
|
|
896
1013
|
);
|
|
897
1014
|
|
|
898
1015
|
await expect(
|
|
@@ -942,7 +1059,9 @@ describe(EntityMutatorFactory, () => {
|
|
|
942
1059
|
);
|
|
943
1060
|
|
|
944
1061
|
await enforceAsyncResult(
|
|
945
|
-
entityMutatorFactory
|
|
1062
|
+
entityMutatorFactory
|
|
1063
|
+
.forDelete(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1064
|
+
.deleteAsync(),
|
|
946
1065
|
);
|
|
947
1066
|
|
|
948
1067
|
verify(
|
|
@@ -994,7 +1113,9 @@ describe(EntityMutatorFactory, () => {
|
|
|
994
1113
|
);
|
|
995
1114
|
|
|
996
1115
|
await enforceAsyncResult(
|
|
997
|
-
entityMutatorFactory
|
|
1116
|
+
entityMutatorFactory
|
|
1117
|
+
.forDelete(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1118
|
+
.deleteAsync(),
|
|
998
1119
|
);
|
|
999
1120
|
|
|
1000
1121
|
verifyTriggerCounts(
|
|
@@ -1050,13 +1171,89 @@ describe(EntityMutatorFactory, () => {
|
|
|
1050
1171
|
);
|
|
1051
1172
|
|
|
1052
1173
|
await enforceAsyncResult(
|
|
1053
|
-
entityMutatorFactory
|
|
1174
|
+
entityMutatorFactory
|
|
1175
|
+
.forDelete(existingEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1176
|
+
.deleteAsync(),
|
|
1054
1177
|
);
|
|
1055
1178
|
|
|
1056
1179
|
verifyValidatorCounts(viewerContext, validatorSpies, 0, {
|
|
1057
1180
|
type: EntityMutationType.DELETE as any,
|
|
1058
1181
|
});
|
|
1059
1182
|
});
|
|
1183
|
+
|
|
1184
|
+
it('passes manaully-specified cascading delete cause to privacy policy and triggers', async () => {
|
|
1185
|
+
const viewerContext = mock<ViewerContext>();
|
|
1186
|
+
const privacyPolicyEvaluationContext =
|
|
1187
|
+
instance(
|
|
1188
|
+
mock<
|
|
1189
|
+
EntityPrivacyPolicyEvaluationContext<
|
|
1190
|
+
TestFields,
|
|
1191
|
+
'customIdField',
|
|
1192
|
+
ViewerContext,
|
|
1193
|
+
TestEntity,
|
|
1194
|
+
keyof TestFields
|
|
1195
|
+
>
|
|
1196
|
+
>(),
|
|
1197
|
+
);
|
|
1198
|
+
const queryContext = new StubQueryContextProvider().getQueryContext();
|
|
1199
|
+
|
|
1200
|
+
const id1 = uuidv4();
|
|
1201
|
+
const { mutationTriggers, privacyPolicy, entityMutatorFactory, entityLoaderFactory } =
|
|
1202
|
+
createEntityMutatorFactory([
|
|
1203
|
+
{
|
|
1204
|
+
customIdField: id1,
|
|
1205
|
+
stringField: 'huh',
|
|
1206
|
+
testIndexedField: '3',
|
|
1207
|
+
intField: 3,
|
|
1208
|
+
dateField: new Date(),
|
|
1209
|
+
nullableField: null,
|
|
1210
|
+
},
|
|
1211
|
+
]);
|
|
1212
|
+
|
|
1213
|
+
const spiedPrivacyPolicy = spy(privacyPolicy);
|
|
1214
|
+
const triggerSpies = setUpMutationTriggerSpies(mutationTriggers);
|
|
1215
|
+
|
|
1216
|
+
const existingEntity = await enforceAsyncResult(
|
|
1217
|
+
entityLoaderFactory
|
|
1218
|
+
.forLoad(viewerContext, queryContext, privacyPolicyEvaluationContext)
|
|
1219
|
+
.loadByIDAsync(id1),
|
|
1220
|
+
);
|
|
1221
|
+
|
|
1222
|
+
const cascadingDeleteCause: EntityCascadingDeletionInfo = {
|
|
1223
|
+
entity: 'blah' as any,
|
|
1224
|
+
cascadingDeleteCause: null,
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
await enforceAsyncResult(
|
|
1228
|
+
entityMutatorFactory
|
|
1229
|
+
.forDelete(existingEntity, queryContext, cascadingDeleteCause)
|
|
1230
|
+
.deleteAsync(),
|
|
1231
|
+
);
|
|
1232
|
+
|
|
1233
|
+
verify(
|
|
1234
|
+
spiedPrivacyPolicy.authorizeDeleteAsync(
|
|
1235
|
+
viewerContext,
|
|
1236
|
+
anyOfClass(EntityTransactionalQueryContext),
|
|
1237
|
+
deepEqual({ previousValue: null, cascadingDeleteCause }),
|
|
1238
|
+
anyOfClass(TestEntity),
|
|
1239
|
+
anything(),
|
|
1240
|
+
),
|
|
1241
|
+
).once();
|
|
1242
|
+
|
|
1243
|
+
verifyTriggerCounts(
|
|
1244
|
+
viewerContext,
|
|
1245
|
+
triggerSpies,
|
|
1246
|
+
{
|
|
1247
|
+
beforeCreate: false,
|
|
1248
|
+
afterCreate: false,
|
|
1249
|
+
beforeUpdate: false,
|
|
1250
|
+
afterUpdate: false,
|
|
1251
|
+
beforeDelete: true,
|
|
1252
|
+
afterDelete: true,
|
|
1253
|
+
},
|
|
1254
|
+
{ type: EntityMutationType.DELETE, cascadingDeleteCause },
|
|
1255
|
+
);
|
|
1256
|
+
});
|
|
1060
1257
|
});
|
|
1061
1258
|
|
|
1062
1259
|
it('invalidates cache for fields upon create', async () => {
|
|
@@ -1148,7 +1345,7 @@ describe(EntityMutatorFactory, () => {
|
|
|
1148
1345
|
.forCreate(viewerContext, queryContext)
|
|
1149
1346
|
.setField('stringField', 10 as any)
|
|
1150
1347
|
.createAsync(),
|
|
1151
|
-
).rejects.
|
|
1348
|
+
).rejects.toThrow('Entity field not valid: TestEntity (stringField = 10)');
|
|
1152
1349
|
|
|
1153
1350
|
const createdEntity = await enforceAsyncResult(
|
|
1154
1351
|
entityMutatorFactory
|
|
@@ -1159,10 +1356,10 @@ describe(EntityMutatorFactory, () => {
|
|
|
1159
1356
|
|
|
1160
1357
|
await expect(
|
|
1161
1358
|
entityMutatorFactory
|
|
1162
|
-
.forUpdate(createdEntity, queryContext)
|
|
1359
|
+
.forUpdate(createdEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1163
1360
|
.setField('stringField', 10 as any)
|
|
1164
1361
|
.updateAsync(),
|
|
1165
|
-
).rejects.
|
|
1362
|
+
).rejects.toThrow('Entity field not valid: TestEntity (stringField = 10)');
|
|
1166
1363
|
});
|
|
1167
1364
|
|
|
1168
1365
|
it('returns error result when not authorized to create', async () => {
|
|
@@ -1280,14 +1477,14 @@ describe(EntityMutatorFactory, () => {
|
|
|
1280
1477
|
expect(entityCreateResult.value).toBe(undefined);
|
|
1281
1478
|
|
|
1282
1479
|
const entityUpdateResult = await entityMutatorFactory
|
|
1283
|
-
.forUpdate(fakeEntity, queryContext)
|
|
1480
|
+
.forUpdate(fakeEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1284
1481
|
.updateAsync();
|
|
1285
1482
|
expect(entityUpdateResult.ok).toBe(false);
|
|
1286
1483
|
expect(entityUpdateResult.reason).toEqual(rejectionError);
|
|
1287
1484
|
expect(entityUpdateResult.value).toBe(undefined);
|
|
1288
1485
|
|
|
1289
1486
|
const entityDeleteResult = await entityMutatorFactory
|
|
1290
|
-
.forDelete(fakeEntity, queryContext)
|
|
1487
|
+
.forDelete(fakeEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1291
1488
|
.deleteAsync();
|
|
1292
1489
|
expect(entityDeleteResult.ok).toBe(false);
|
|
1293
1490
|
expect(entityDeleteResult.reason).toEqual(rejectionError);
|
|
@@ -1402,10 +1599,14 @@ describe(EntityMutatorFactory, () => {
|
|
|
1402
1599
|
entityMutatorFactory.forCreate(viewerContext, queryContext).createAsync(),
|
|
1403
1600
|
).rejects.toEqual(rejectionError);
|
|
1404
1601
|
await expect(
|
|
1405
|
-
entityMutatorFactory
|
|
1602
|
+
entityMutatorFactory
|
|
1603
|
+
.forUpdate(fakeEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1604
|
+
.updateAsync(),
|
|
1406
1605
|
).rejects.toEqual(rejectionError);
|
|
1407
1606
|
await expect(
|
|
1408
|
-
entityMutatorFactory
|
|
1607
|
+
entityMutatorFactory
|
|
1608
|
+
.forDelete(fakeEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1609
|
+
.deleteAsync(),
|
|
1409
1610
|
).rejects.toEqual(rejectionError);
|
|
1410
1611
|
});
|
|
1411
1612
|
|
|
@@ -1424,12 +1625,16 @@ describe(EntityMutatorFactory, () => {
|
|
|
1424
1625
|
|
|
1425
1626
|
await enforceAsyncResult(
|
|
1426
1627
|
entityMutatorFactory
|
|
1427
|
-
.forUpdate(newEntity, queryContext)
|
|
1628
|
+
.forUpdate(newEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1428
1629
|
.setField('stringField', 'wat')
|
|
1429
1630
|
.updateAsync(),
|
|
1430
1631
|
);
|
|
1431
1632
|
|
|
1432
|
-
await enforceAsyncResult(
|
|
1633
|
+
await enforceAsyncResult(
|
|
1634
|
+
entityMutatorFactory
|
|
1635
|
+
.forDelete(newEntity, queryContext, /* cascadingDeleteCause */ null)
|
|
1636
|
+
.deleteAsync(),
|
|
1637
|
+
);
|
|
1433
1638
|
|
|
1434
1639
|
verify(
|
|
1435
1640
|
spiedMetricsAdapter.logMutatorMutationEvent(
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { describe, expect, it } from '@jest/globals';
|
|
2
|
+
import { anyOfClass, anything, instance, mock, objectContaining, spy, verify } from 'ts-mockito';
|
|
2
3
|
|
|
3
|
-
import Entity from '../Entity';
|
|
4
|
+
import { Entity } from '../Entity';
|
|
4
5
|
import { EntityCompanionDefinition } from '../EntityCompanionProvider';
|
|
5
|
-
import EntityConfiguration from '../EntityConfiguration';
|
|
6
|
+
import { EntityConfiguration } from '../EntityConfiguration';
|
|
6
7
|
import { UUIDField } from '../EntityFields';
|
|
7
|
-
import
|
|
8
|
-
EntityPrivacyPolicyEvaluator,
|
|
8
|
+
import {
|
|
9
9
|
EntityAuthorizationAction,
|
|
10
|
-
|
|
10
|
+
EntityPrivacyPolicy,
|
|
11
11
|
EntityPrivacyPolicyEvaluationContext,
|
|
12
|
+
EntityPrivacyPolicyEvaluationMode,
|
|
13
|
+
EntityPrivacyPolicyEvaluator,
|
|
12
14
|
} from '../EntityPrivacyPolicy';
|
|
13
15
|
import { EntityQueryContext } from '../EntityQueryContext';
|
|
14
|
-
import ViewerContext from '../ViewerContext';
|
|
15
|
-
import EntityNotAuthorizedError from '../errors/EntityNotAuthorizedError';
|
|
16
|
-
import
|
|
16
|
+
import { ViewerContext } from '../ViewerContext';
|
|
17
|
+
import { EntityNotAuthorizedError } from '../errors/EntityNotAuthorizedError';
|
|
18
|
+
import {
|
|
17
19
|
EntityMetricsAuthorizationResult,
|
|
20
|
+
IEntityMetricsAdapter,
|
|
18
21
|
} from '../metrics/IEntityMetricsAdapter';
|
|
19
|
-
import AlwaysAllowPrivacyPolicyRule from '../rules/AlwaysAllowPrivacyPolicyRule';
|
|
20
|
-
import AlwaysDenyPrivacyPolicyRule from '../rules/AlwaysDenyPrivacyPolicyRule';
|
|
21
|
-
import AlwaysSkipPrivacyPolicyRule from '../rules/AlwaysSkipPrivacyPolicyRule';
|
|
22
|
-
import PrivacyPolicyRule,
|
|
22
|
+
import { AlwaysAllowPrivacyPolicyRule } from '../rules/AlwaysAllowPrivacyPolicyRule';
|
|
23
|
+
import { AlwaysDenyPrivacyPolicyRule } from '../rules/AlwaysDenyPrivacyPolicyRule';
|
|
24
|
+
import { AlwaysSkipPrivacyPolicyRule } from '../rules/AlwaysSkipPrivacyPolicyRule';
|
|
25
|
+
import { PrivacyPolicyRule, RuleEvaluationResult } from '../rules/PrivacyPolicyRule';
|
|
23
26
|
|
|
24
27
|
type BlahFields = {
|
|
25
28
|
id: string;
|
|
@@ -470,7 +473,7 @@ describe(EntityPrivacyPolicy, () => {
|
|
|
470
473
|
entity,
|
|
471
474
|
metricsAdapter,
|
|
472
475
|
),
|
|
473
|
-
).rejects.
|
|
476
|
+
).rejects.toThrow('WooHoo!');
|
|
474
477
|
verify(metricsAdapterMock.logAuthorizationEvent(anything())).never();
|
|
475
478
|
});
|
|
476
479
|
});
|
|
@@ -587,7 +590,7 @@ describe(EntityPrivacyPolicy, () => {
|
|
|
587
590
|
entity,
|
|
588
591
|
metricsAdapter,
|
|
589
592
|
),
|
|
590
|
-
).rejects.
|
|
593
|
+
).rejects.toThrow('WooHoo!');
|
|
591
594
|
|
|
592
595
|
verify(policySpy.denyHandler(anyOfClass(EntityNotAuthorizedError))).never();
|
|
593
596
|
|
|
@@ -708,7 +711,7 @@ describe(EntityPrivacyPolicy, () => {
|
|
|
708
711
|
entity,
|
|
709
712
|
metricsAdapter,
|
|
710
713
|
),
|
|
711
|
-
).rejects.
|
|
714
|
+
).rejects.toThrow('WooHoo!');
|
|
712
715
|
|
|
713
716
|
verify(policySpy.denyHandler(anyOfClass(EntityNotAuthorizedError))).never();
|
|
714
717
|
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { describe, expect, it, jest } from '@jest/globals';
|
|
1
2
|
import assert from 'assert';
|
|
2
3
|
import invariant from 'invariant';
|
|
3
4
|
|
|
4
|
-
import EntityCompanionProvider from '../EntityCompanionProvider';
|
|
5
|
+
import { EntityCompanionProvider } from '../EntityCompanionProvider';
|
|
5
6
|
import {
|
|
6
7
|
EntityQueryContext,
|
|
7
8
|
TransactionalDataLoaderMode,
|
|
8
9
|
TransactionConfig,
|
|
9
10
|
TransactionIsolationLevel,
|
|
10
11
|
} from '../EntityQueryContext';
|
|
11
|
-
import EntityQueryContextProvider from '../EntityQueryContextProvider';
|
|
12
|
-
import ViewerContext from '../ViewerContext';
|
|
13
|
-
import NoOpEntityMetricsAdapter from '../metrics/NoOpEntityMetricsAdapter';
|
|
12
|
+
import { EntityQueryContextProvider } from '../EntityQueryContextProvider';
|
|
13
|
+
import { ViewerContext } from '../ViewerContext';
|
|
14
|
+
import { NoOpEntityMetricsAdapter } from '../metrics/NoOpEntityMetricsAdapter';
|
|
14
15
|
import { InMemoryFullCacheStubCacheAdapterProvider } from '../utils/__testfixtures__/StubCacheAdapter';
|
|
15
|
-
import StubDatabaseAdapterProvider from '../utils/__testfixtures__/StubDatabaseAdapterProvider';
|
|
16
|
+
import { StubDatabaseAdapterProvider } from '../utils/__testfixtures__/StubDatabaseAdapterProvider';
|
|
16
17
|
import { createUnitTestEntityCompanionProvider } from '../utils/__testfixtures__/createUnitTestEntityCompanionProvider';
|
|
17
18
|
|
|
18
19
|
describe(EntityQueryContext, () => {
|
|
@@ -83,7 +84,7 @@ describe(EntityQueryContext, () => {
|
|
|
83
84
|
queryContext.appendPreCommitCallback(preCommitCallback, 0);
|
|
84
85
|
},
|
|
85
86
|
),
|
|
86
|
-
).rejects.
|
|
87
|
+
).rejects.toThrow('wat');
|
|
87
88
|
|
|
88
89
|
expect(preCommitCallback).toHaveBeenCalledTimes(1);
|
|
89
90
|
expect(postCommitCallback).toHaveBeenCalledTimes(0);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { describe, expect, it } from '@jest/globals';
|
|
1
2
|
import { anyOfClass, anything, deepEqual, instance, mock, spy, verify, when } from 'ts-mockito';
|
|
2
3
|
|
|
3
4
|
import { EntityNonTransactionalQueryContext } from '../EntityQueryContext';
|
|
4
|
-
import EntitySecondaryCacheLoader,
|
|
5
|
-
import ViewerContext from '../ViewerContext';
|
|
6
|
-
import
|
|
5
|
+
import { EntitySecondaryCacheLoader, ISecondaryEntityCache } from '../EntitySecondaryCacheLoader';
|
|
6
|
+
import { ViewerContext } from '../ViewerContext';
|
|
7
|
+
import {
|
|
8
|
+
SimpleTestEntity,
|
|
7
9
|
SimpleTestEntityPrivacyPolicy,
|
|
8
10
|
SimpleTestFields,
|
|
9
11
|
} from '../utils/__testfixtures__/SimpleTestEntity';
|