@expo/entity 0.60.0 → 0.62.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/src/AuthorizationResultBasedEntityAssociationLoader.d.ts +6 -6
- package/build/src/AuthorizationResultBasedEntityAssociationLoader.js +5 -10
- package/build/src/AuthorizationResultBasedEntityLoader.d.ts +9 -9
- package/build/src/AuthorizationResultBasedEntityLoader.js +27 -35
- package/build/src/AuthorizationResultBasedEntityMutator.d.ts +13 -13
- package/build/src/AuthorizationResultBasedEntityMutator.js +54 -65
- package/build/src/ComposedEntityCacheAdapter.d.ts +3 -3
- package/build/src/ComposedEntityCacheAdapter.js +15 -23
- package/build/src/ComposedSecondaryEntityCache.d.ts +1 -1
- package/build/src/ComposedSecondaryEntityCache.js +4 -12
- package/build/src/EnforcingEntityAssociationLoader.d.ts +5 -5
- package/build/src/EnforcingEntityAssociationLoader.js +6 -11
- package/build/src/EnforcingEntityCreator.d.ts +4 -4
- package/build/src/EnforcingEntityCreator.js +3 -8
- package/build/src/EnforcingEntityDeleter.d.ts +4 -4
- package/build/src/EnforcingEntityDeleter.js +3 -8
- package/build/src/EnforcingEntityLoader.d.ts +5 -5
- package/build/src/EnforcingEntityLoader.js +9 -14
- package/build/src/EnforcingEntityUpdater.d.ts +4 -4
- package/build/src/EnforcingEntityUpdater.js +3 -8
- package/build/src/Entity.d.ts +9 -9
- package/build/src/Entity.js +11 -16
- package/build/src/EntityAssociationLoader.d.ts +5 -5
- package/build/src/EntityAssociationLoader.js +5 -10
- package/build/src/EntityCompanion.d.ts +9 -9
- package/build/src/EntityCompanion.js +6 -11
- package/build/src/EntityCompanionProvider.d.ts +13 -12
- package/build/src/EntityCompanionProvider.js +13 -21
- package/build/src/EntityConfiguration.d.ts +4 -4
- package/build/src/EntityConfiguration.js +14 -23
- package/build/src/EntityConstructionUtils.d.ts +8 -8
- package/build/src/EntityConstructionUtils.js +15 -23
- package/build/src/EntityCreator.d.ts +7 -7
- package/build/src/EntityCreator.js +3 -8
- package/build/src/EntityDatabaseAdapter.d.ts +4 -4
- package/build/src/EntityDatabaseAdapter.js +19 -27
- package/build/src/EntityDeleter.d.ts +7 -7
- package/build/src/EntityDeleter.js +3 -8
- package/build/src/EntityFieldDefinition.d.ts +4 -4
- package/build/src/EntityFieldDefinition.js +5 -10
- package/build/src/EntityFields.d.ts +2 -1
- package/build/src/EntityFields.js +12 -27
- package/build/src/EntityInvalidationUtils.d.ts +8 -10
- package/build/src/EntityInvalidationUtils.js +5 -10
- package/build/src/EntityLoader.d.ts +7 -7
- package/build/src/EntityLoader.js +3 -8
- package/build/src/EntityLoaderFactory.d.ts +11 -11
- package/build/src/EntityLoaderFactory.js +7 -12
- package/build/src/EntityMutationInfo.d.ts +2 -2
- package/build/src/EntityMutationInfo.js +2 -6
- package/build/src/EntityMutationTriggerConfiguration.d.ts +4 -4
- package/build/src/EntityMutationTriggerConfiguration.js +2 -8
- package/build/src/EntityMutationValidatorConfiguration.d.ts +4 -4
- package/build/src/EntityMutationValidatorConfiguration.js +1 -6
- package/build/src/EntityMutatorFactory.d.ts +13 -13
- package/build/src/EntityMutatorFactory.js +5 -10
- package/build/src/EntityPrivacyPolicy.d.ts +7 -7
- package/build/src/EntityPrivacyPolicy.js +22 -27
- package/build/src/EntityQueryContext.d.ts +1 -1
- package/build/src/EntityQueryContext.js +11 -22
- package/build/src/EntityQueryContextProvider.d.ts +2 -1
- package/build/src/EntityQueryContextProvider.js +7 -12
- package/build/src/EntitySecondaryCacheLoader.d.ts +7 -7
- package/build/src/EntitySecondaryCacheLoader.js +4 -9
- package/build/src/EntityUpdater.d.ts +7 -7
- package/build/src/EntityUpdater.js +3 -8
- package/build/src/GenericEntityCacheAdapter.d.ts +4 -4
- package/build/src/GenericEntityCacheAdapter.js +5 -13
- package/build/src/GenericSecondaryEntityCache.d.ts +2 -2
- package/build/src/GenericSecondaryEntityCache.js +10 -18
- package/build/src/IEntityCacheAdapter.d.ts +2 -2
- package/build/src/IEntityCacheAdapter.js +1 -3
- package/build/src/IEntityCacheAdapterProvider.d.ts +2 -2
- package/build/src/IEntityCacheAdapterProvider.js +1 -3
- package/build/src/IEntityDatabaseAdapterProvider.d.ts +2 -2
- package/build/src/IEntityDatabaseAdapterProvider.js +1 -3
- package/build/src/IEntityGenericCacher.d.ts +2 -2
- package/build/src/IEntityGenericCacher.js +1 -3
- package/build/src/ReadonlyEntity.d.ts +10 -10
- package/build/src/ReadonlyEntity.js +9 -17
- package/build/src/ViewerContext.d.ts +6 -6
- package/build/src/ViewerContext.js +3 -8
- package/build/src/ViewerScopedEntityCompanion.d.ts +8 -8
- package/build/src/ViewerScopedEntityCompanion.js +5 -10
- package/build/src/ViewerScopedEntityCompanionProvider.d.ts +6 -6
- package/build/src/ViewerScopedEntityCompanionProvider.js +3 -8
- package/build/src/ViewerScopedEntityLoaderFactory.d.ts +9 -9
- package/build/src/ViewerScopedEntityLoaderFactory.js +1 -6
- package/build/src/ViewerScopedEntityMutatorFactory.d.ts +7 -7
- package/build/src/ViewerScopedEntityMutatorFactory.js +1 -6
- package/build/src/entityUtils.d.ts +1 -1
- package/build/src/entityUtils.js +9 -21
- package/build/src/errors/EntityCacheAdapterError.d.ts +1 -1
- package/build/src/errors/EntityCacheAdapterError.js +5 -11
- package/build/src/errors/EntityDatabaseAdapterError.d.ts +1 -1
- package/build/src/errors/EntityDatabaseAdapterError.js +41 -59
- package/build/src/errors/EntityError.js +5 -10
- package/build/src/errors/EntityInvalidFieldValueError.d.ts +5 -5
- package/build/src/errors/EntityInvalidFieldValueError.js +4 -9
- package/build/src/errors/EntityNotAuthorizedError.d.ts +4 -4
- package/build/src/errors/EntityNotAuthorizedError.js +6 -11
- package/build/src/errors/EntityNotFoundError.d.ts +5 -5
- package/build/src/errors/EntityNotFoundError.js +4 -9
- package/build/src/index.d.ts +77 -77
- package/build/src/index.js +77 -94
- package/build/src/internal/CompositeFieldHolder.d.ts +3 -2
- package/build/src/internal/CompositeFieldHolder.js +11 -21
- package/build/src/internal/CompositeFieldValueMap.d.ts +2 -2
- package/build/src/internal/CompositeFieldValueMap.js +7 -12
- package/build/src/internal/EntityDataManager.d.ts +6 -6
- package/build/src/internal/EntityDataManager.js +25 -33
- package/build/src/internal/EntityFieldTransformationUtils.d.ts +1 -1
- package/build/src/internal/EntityFieldTransformationUtils.js +11 -23
- package/build/src/internal/EntityLoadInterfaces.d.ts +3 -2
- package/build/src/internal/EntityLoadInterfaces.js +4 -9
- package/build/src/internal/EntityTableDataCoordinator.d.ts +8 -8
- package/build/src/internal/EntityTableDataCoordinator.js +4 -9
- package/build/src/internal/ReadThroughEntityCache.d.ts +3 -3
- package/build/src/internal/ReadThroughEntityCache.js +7 -15
- package/build/src/internal/SingleFieldHolder.d.ts +3 -2
- package/build/src/internal/SingleFieldHolder.js +9 -19
- package/build/src/metrics/EntityMetricsUtils.d.ts +3 -3
- package/build/src/metrics/EntityMetricsUtils.js +6 -14
- package/build/src/metrics/IEntityMetricsAdapter.d.ts +2 -2
- package/build/src/metrics/IEntityMetricsAdapter.js +8 -12
- package/build/src/metrics/NoOpEntityMetricsAdapter.d.ts +1 -1
- package/build/src/metrics/NoOpEntityMetricsAdapter.js +1 -6
- package/build/src/rules/AllowIfAllSubRulesAllowPrivacyPolicyRule.d.ts +5 -5
- package/build/src/rules/AllowIfAllSubRulesAllowPrivacyPolicyRule.js +5 -10
- package/build/src/rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule.d.ts +5 -5
- package/build/src/rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule.js +5 -10
- package/build/src/rules/AllowIfInParentCascadeDeletionPrivacyPolicyRule.d.ts +6 -6
- package/build/src/rules/AllowIfInParentCascadeDeletionPrivacyPolicyRule.js +6 -11
- package/build/src/rules/AlwaysAllowPrivacyPolicyRule.d.ts +5 -5
- package/build/src/rules/AlwaysAllowPrivacyPolicyRule.js +3 -8
- package/build/src/rules/AlwaysDenyPrivacyPolicyRule.d.ts +5 -5
- package/build/src/rules/AlwaysDenyPrivacyPolicyRule.js +3 -8
- package/build/src/rules/AlwaysSkipPrivacyPolicyRule.d.ts +5 -5
- package/build/src/rules/AlwaysSkipPrivacyPolicyRule.js +3 -8
- package/build/src/rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule.d.ts +5 -5
- package/build/src/rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule.js +3 -8
- package/build/src/rules/PrivacyPolicyRule.d.ts +4 -4
- package/build/src/rules/PrivacyPolicyRule.js +3 -8
- package/build/src/utils/EntityCreationUtils.d.ts +5 -5
- package/build/src/utils/EntityCreationUtils.js +6 -11
- package/build/src/utils/EntityPrivacyUtils.d.ts +5 -5
- package/build/src/utils/EntityPrivacyUtils.js +20 -27
- package/build/src/utils/collections/SerializableKeyMap.js +1 -6
- package/build/src/utils/collections/maps.js +11 -27
- package/build/src/utils/collections/sets.js +1 -5
- package/build/src/utils/mergeEntityMutationTriggerConfigurations.d.ts +3 -3
- package/build/src/utils/mergeEntityMutationTriggerConfigurations.js +1 -5
- package/package.json +8 -7
- package/src/AuthorizationResultBasedEntityAssociationLoader.ts +7 -6
- package/src/AuthorizationResultBasedEntityLoader.ts +19 -17
- package/src/AuthorizationResultBasedEntityMutator.ts +24 -22
- package/src/ComposedEntityCacheAdapter.ts +5 -4
- package/src/ComposedSecondaryEntityCache.ts +2 -2
- package/src/EnforcingEntityAssociationLoader.ts +7 -7
- package/src/EnforcingEntityCreator.ts +4 -4
- package/src/EnforcingEntityDeleter.ts +4 -4
- package/src/EnforcingEntityLoader.ts +8 -8
- package/src/EnforcingEntityUpdater.ts +4 -4
- package/src/Entity.ts +13 -13
- package/src/EntityAssociationLoader.ts +6 -6
- package/src/EntityCompanion.ts +13 -10
- package/src/EntityCompanionProvider.ts +15 -14
- package/src/EntityConfiguration.ts +6 -8
- package/src/EntityConstructionUtils.ts +16 -12
- package/src/EntityCreator.ts +7 -7
- package/src/EntityDatabaseAdapter.ts +6 -6
- package/src/EntityDeleter.ts +7 -7
- package/src/EntityFieldDefinition.ts +4 -4
- package/src/EntityFields.ts +3 -3
- package/src/EntityInvalidationUtils.ts +8 -25
- package/src/EntityLoader.ts +7 -7
- package/src/EntityLoaderFactory.ts +13 -12
- package/src/EntityMutationInfo.ts +2 -2
- package/src/EntityMutationTriggerConfiguration.ts +4 -4
- package/src/EntityMutationValidatorConfiguration.ts +4 -4
- package/src/EntityMutatorFactory.ts +13 -13
- package/src/EntityPrivacyPolicy.ts +9 -10
- package/src/EntityQueryContext.ts +1 -1
- package/src/EntityQueryContextProvider.ts +2 -2
- package/src/EntitySecondaryCacheLoader.ts +8 -8
- package/src/EntityUpdater.ts +7 -7
- package/src/GenericEntityCacheAdapter.ts +5 -5
- package/src/GenericSecondaryEntityCache.ts +4 -4
- package/src/IEntityCacheAdapter.ts +2 -2
- package/src/IEntityCacheAdapterProvider.ts +2 -2
- package/src/IEntityDatabaseAdapterProvider.ts +2 -2
- package/src/IEntityGenericCacher.ts +2 -2
- package/src/ReadonlyEntity.ts +12 -19
- package/src/ViewerContext.ts +8 -8
- package/src/ViewerScopedEntityCompanion.ts +8 -8
- package/src/ViewerScopedEntityCompanionProvider.ts +6 -6
- package/src/ViewerScopedEntityLoaderFactory.ts +11 -9
- package/src/ViewerScopedEntityMutatorFactory.ts +8 -8
- package/src/__tests__/AuthorizationResultBasedEntityAssociationLoader-test.ts +6 -6
- package/src/__tests__/AuthorizationResultBasedEntityLoader-constructor-test.ts +16 -15
- package/src/__tests__/AuthorizationResultBasedEntityLoader-test.ts +21 -21
- package/src/__tests__/ComposedCacheAdapter-test.ts +8 -7
- package/src/__tests__/ComposedSecondaryEntityCache-test.ts +3 -3
- package/src/__tests__/EnforcingEntityAssociationLoader-test.ts +2 -2
- package/src/__tests__/EnforcingEntityLoader-test.ts +4 -4
- package/src/__tests__/Entity-test.ts +8 -8
- package/src/__tests__/EntityAssociationLoader-test.ts +6 -6
- package/src/__tests__/EntityCommonUseCases-test.ts +17 -13
- package/src/__tests__/EntityCompanion-test.ts +11 -11
- package/src/__tests__/EntityCompanionProvider-test.ts +8 -7
- package/src/__tests__/EntityConfiguration-test.ts +3 -3
- package/src/__tests__/EntityDatabaseAdapter-test.ts +11 -7
- package/src/__tests__/EntityEdges-test.ts +17 -19
- package/src/__tests__/EntityFields-test.ts +3 -3
- package/src/__tests__/EntityLoader-test.ts +7 -7
- package/src/__tests__/EntityMutator-MutationCacheConsistency-test.ts +12 -11
- package/src/__tests__/EntityMutator-SingleCompositeFieldCacheConsistency-test.ts +4 -4
- package/src/__tests__/EntityMutator-test.ts +32 -36
- package/src/__tests__/EntityPrivacyPolicy-test.ts +19 -19
- package/src/__tests__/EntityQueryContext-test.ts +9 -9
- package/src/__tests__/EntitySecondaryCacheLoader-test.ts +8 -7
- package/src/__tests__/EntitySelfReferentialEdges-test.ts +12 -12
- package/src/__tests__/GenericEntityCacheAdapter-test.ts +6 -6
- package/src/__tests__/GenericSecondaryEntityCache-test.ts +16 -18
- package/src/__tests__/ReadonlyEntity-test.ts +10 -10
- package/src/__tests__/ViewerContext-test.ts +3 -3
- package/src/__tests__/ViewerScopedEntityCompanion-test.ts +7 -7
- package/src/__tests__/ViewerScopedEntityCompanionProvider-test.ts +5 -5
- package/src/__tests__/ViewerScopedEntityLoaderFactory-test.ts +5 -5
- package/src/__tests__/ViewerScopedEntityMutatorFactory-test.ts +6 -6
- package/src/__tests__/cases/TwoEntitySameTableDisjointRows-test.ts +9 -9
- package/src/__tests__/cases/TwoEntitySameTableOverlappingRows-test.ts +8 -8
- package/src/__tests__/entityUtils-test.ts +4 -4
- package/src/entityUtils.ts +1 -1
- package/src/errors/EntityCacheAdapterError.ts +1 -1
- package/src/errors/EntityDatabaseAdapterError.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 +2 -2
- package/src/errors/__tests__/EntityError-test.ts +7 -7
- package/src/index.ts +77 -77
- package/src/internal/CompositeFieldHolder.ts +6 -10
- package/src/internal/CompositeFieldValueMap.ts +3 -5
- package/src/internal/EntityDataManager.ts +11 -14
- package/src/internal/EntityFieldTransformationUtils.ts +2 -2
- package/src/internal/EntityLoadInterfaces.ts +3 -2
- package/src/internal/EntityTableDataCoordinator.ts +9 -9
- package/src/internal/ReadThroughEntityCache.ts +4 -4
- package/src/internal/SingleFieldHolder.ts +4 -8
- package/src/internal/__tests__/CompositeFieldHolder-test.ts +1 -1
- package/src/internal/__tests__/CompositeFieldValueMap-test.ts +3 -3
- package/src/internal/__tests__/EntityDataManager-test.ts +15 -18
- package/src/internal/__tests__/EntityFieldTransformationUtils-test.ts +3 -3
- package/src/internal/__tests__/ReadThroughEntityCache-test.ts +6 -6
- package/src/metrics/EntityMetricsUtils.ts +5 -5
- package/src/metrics/IEntityMetricsAdapter.ts +3 -3
- package/src/metrics/NoOpEntityMetricsAdapter.ts +2 -2
- package/src/metrics/__tests__/EntityMetricsUtils-test.ts +4 -7
- package/src/rules/AllowIfAllSubRulesAllowPrivacyPolicyRule.ts +5 -5
- package/src/rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule.ts +5 -5
- package/src/rules/AllowIfInParentCascadeDeletionPrivacyPolicyRule.ts +9 -6
- package/src/rules/AlwaysAllowPrivacyPolicyRule.ts +5 -5
- package/src/rules/AlwaysDenyPrivacyPolicyRule.ts +5 -5
- package/src/rules/AlwaysSkipPrivacyPolicyRule.ts +5 -5
- package/src/rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule.ts +5 -5
- package/src/rules/PrivacyPolicyRule.ts +4 -4
- package/src/rules/__tests__/AllowIfAllSubRulesAllowPrivacyPolicyRule-test.ts +8 -8
- package/src/rules/__tests__/AllowIfAnySubRuleAllowsPrivacyPolicyRule-test.ts +8 -8
- package/src/rules/__tests__/AllowIfInParentCascadeDeletionPrivacyPolicyRule-test.ts +7 -7
- package/src/rules/__tests__/AlwaysAllowPrivacyPolicyRule-test.ts +5 -5
- package/src/rules/__tests__/AlwaysDenyPrivacyPolicyRule-test.ts +5 -5
- package/src/rules/__tests__/AlwaysSkipPrivacyPolicyRule-test.ts +5 -5
- package/src/rules/__tests__/EvaluateIfEntityFieldPredicatePrivacyPolicyRule-test.ts +9 -8
- package/src/utils/EntityCreationUtils.ts +7 -7
- package/src/utils/EntityPrivacyUtils.ts +13 -9
- package/src/utils/__testfixtures__/PrivacyPolicyRuleTestUtils.ts +6 -5
- package/src/utils/__testfixtures__/SimpleTestEntity.ts +7 -7
- package/src/utils/__testfixtures__/StubCacheAdapter.ts +6 -5
- package/src/utils/__testfixtures__/StubDatabaseAdapter.ts +6 -6
- package/src/utils/__testfixtures__/StubDatabaseAdapterProvider.ts +4 -4
- package/src/utils/__testfixtures__/StubQueryContextProvider.ts +2 -2
- package/src/utils/__testfixtures__/TSMockitoExtensions.ts +5 -5
- package/src/utils/__testfixtures__/TestEntity.ts +9 -8
- package/src/utils/__testfixtures__/TestEntity2.ts +7 -7
- package/src/utils/__testfixtures__/TestEntityWithMutationTriggers.ts +10 -10
- package/src/utils/__testfixtures__/TestViewerContext.ts +1 -1
- package/src/utils/__testfixtures__/createUnitTestEntityCompanionProvider.ts +6 -6
- package/src/utils/__testfixtures__/describeFieldTestCase.ts +1 -1
- package/src/utils/__tests__/EntityCreationUtils-test.ts +7 -7
- package/src/utils/__tests__/EntityPrivacyUtils-test.ts +20 -21
- package/src/utils/__tests__/canViewerDeleteAsync-edgeDeletionPermissionInferenceBehavior-test.ts +12 -12
- package/src/utils/__tests__/mergeEntityMutationTriggerConfigurations-test.ts +2 -2
- package/src/utils/collections/__tests__/SerializableKeyMap-test.ts +2 -1
- package/src/utils/collections/__tests__/maps-test.ts +5 -5
- package/src/utils/collections/__tests__/sets-test.ts +1 -1
- package/src/utils/mergeEntityMutationTriggerConfigurations.ts +3 -3
- package/build/src/AuthorizationResultBasedEntityAssociationLoader.js.map +0 -1
- package/build/src/AuthorizationResultBasedEntityLoader.js.map +0 -1
- package/build/src/AuthorizationResultBasedEntityMutator.js.map +0 -1
- package/build/src/ComposedEntityCacheAdapter.js.map +0 -1
- package/build/src/ComposedSecondaryEntityCache.js.map +0 -1
- package/build/src/EnforcingEntityAssociationLoader.js.map +0 -1
- package/build/src/EnforcingEntityCreator.js.map +0 -1
- package/build/src/EnforcingEntityDeleter.js.map +0 -1
- package/build/src/EnforcingEntityLoader.js.map +0 -1
- package/build/src/EnforcingEntityUpdater.js.map +0 -1
- package/build/src/Entity.js.map +0 -1
- package/build/src/EntityAssociationLoader.js.map +0 -1
- package/build/src/EntityCompanion.js.map +0 -1
- package/build/src/EntityCompanionProvider.js.map +0 -1
- package/build/src/EntityConfiguration.js.map +0 -1
- package/build/src/EntityConstructionUtils.js.map +0 -1
- package/build/src/EntityCreator.js.map +0 -1
- package/build/src/EntityDatabaseAdapter.js.map +0 -1
- package/build/src/EntityDeleter.js.map +0 -1
- package/build/src/EntityFieldDefinition.js.map +0 -1
- package/build/src/EntityFields.js.map +0 -1
- package/build/src/EntityInvalidationUtils.js.map +0 -1
- package/build/src/EntityLoader.js.map +0 -1
- package/build/src/EntityLoaderFactory.js.map +0 -1
- package/build/src/EntityMutationInfo.js.map +0 -1
- package/build/src/EntityMutationTriggerConfiguration.js.map +0 -1
- package/build/src/EntityMutationValidatorConfiguration.js.map +0 -1
- package/build/src/EntityMutatorFactory.js.map +0 -1
- package/build/src/EntityPrivacyPolicy.js.map +0 -1
- package/build/src/EntityQueryContext.js.map +0 -1
- package/build/src/EntityQueryContextProvider.js.map +0 -1
- package/build/src/EntitySecondaryCacheLoader.js.map +0 -1
- package/build/src/EntityUpdater.js.map +0 -1
- package/build/src/GenericEntityCacheAdapter.js.map +0 -1
- package/build/src/GenericSecondaryEntityCache.js.map +0 -1
- package/build/src/IEntityCacheAdapter.js.map +0 -1
- package/build/src/IEntityCacheAdapterProvider.js.map +0 -1
- package/build/src/IEntityDatabaseAdapterProvider.js.map +0 -1
- package/build/src/IEntityGenericCacher.js.map +0 -1
- package/build/src/ReadonlyEntity.js.map +0 -1
- package/build/src/ViewerContext.js.map +0 -1
- package/build/src/ViewerScopedEntityCompanion.js.map +0 -1
- package/build/src/ViewerScopedEntityCompanionProvider.js.map +0 -1
- package/build/src/ViewerScopedEntityLoaderFactory.js.map +0 -1
- package/build/src/ViewerScopedEntityMutatorFactory.js.map +0 -1
- package/build/src/entityUtils.js.map +0 -1
- package/build/src/errors/EntityCacheAdapterError.js.map +0 -1
- package/build/src/errors/EntityDatabaseAdapterError.js.map +0 -1
- package/build/src/errors/EntityError.js.map +0 -1
- package/build/src/errors/EntityInvalidFieldValueError.js.map +0 -1
- package/build/src/errors/EntityNotAuthorizedError.js.map +0 -1
- package/build/src/errors/EntityNotFoundError.js.map +0 -1
- package/build/src/index.js.map +0 -1
- package/build/src/internal/CompositeFieldHolder.js.map +0 -1
- package/build/src/internal/CompositeFieldValueMap.js.map +0 -1
- package/build/src/internal/EntityDataManager.js.map +0 -1
- package/build/src/internal/EntityFieldTransformationUtils.js.map +0 -1
- package/build/src/internal/EntityLoadInterfaces.js.map +0 -1
- package/build/src/internal/EntityTableDataCoordinator.js.map +0 -1
- package/build/src/internal/ReadThroughEntityCache.js.map +0 -1
- package/build/src/internal/SingleFieldHolder.js.map +0 -1
- package/build/src/metrics/EntityMetricsUtils.js.map +0 -1
- package/build/src/metrics/IEntityMetricsAdapter.js.map +0 -1
- package/build/src/metrics/NoOpEntityMetricsAdapter.js.map +0 -1
- package/build/src/rules/AllowIfAllSubRulesAllowPrivacyPolicyRule.js.map +0 -1
- package/build/src/rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule.js.map +0 -1
- package/build/src/rules/AllowIfInParentCascadeDeletionPrivacyPolicyRule.js.map +0 -1
- package/build/src/rules/AlwaysAllowPrivacyPolicyRule.js.map +0 -1
- package/build/src/rules/AlwaysDenyPrivacyPolicyRule.js.map +0 -1
- package/build/src/rules/AlwaysSkipPrivacyPolicyRule.js.map +0 -1
- package/build/src/rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule.js.map +0 -1
- package/build/src/rules/PrivacyPolicyRule.js.map +0 -1
- package/build/src/utils/EntityCreationUtils.js.map +0 -1
- package/build/src/utils/EntityPrivacyUtils.js.map +0 -1
- package/build/src/utils/collections/SerializableKeyMap.js.map +0 -1
- package/build/src/utils/collections/maps.js.map +0 -1
- package/build/src/utils/collections/sets.js.map +0 -1
- package/build/src/utils/mergeEntityMutationTriggerConfigurations.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { describe, expect, it } from '@jest/globals';
|
|
2
2
|
import { instance, mock } from 'ts-mockito';
|
|
3
3
|
|
|
4
|
-
import { EntityCompanion } from '../EntityCompanion';
|
|
5
|
-
import { ViewerContext } from '../ViewerContext';
|
|
6
|
-
import { ViewerScopedEntityCompanion } from '../ViewerScopedEntityCompanion';
|
|
7
|
-
import { ViewerScopedEntityLoaderFactory } from '../ViewerScopedEntityLoaderFactory';
|
|
8
|
-
import { ViewerScopedEntityMutatorFactory } from '../ViewerScopedEntityMutatorFactory';
|
|
9
|
-
import {
|
|
4
|
+
import type { EntityCompanion } from '../EntityCompanion.ts';
|
|
5
|
+
import { ViewerContext } from '../ViewerContext.ts';
|
|
6
|
+
import { ViewerScopedEntityCompanion } from '../ViewerScopedEntityCompanion.ts';
|
|
7
|
+
import { ViewerScopedEntityLoaderFactory } from '../ViewerScopedEntityLoaderFactory.ts';
|
|
8
|
+
import { ViewerScopedEntityMutatorFactory } from '../ViewerScopedEntityMutatorFactory.ts';
|
|
9
|
+
import type {
|
|
10
10
|
TestEntity,
|
|
11
11
|
TestEntityPrivacyPolicy,
|
|
12
12
|
TestFields,
|
|
13
|
-
} from '../utils/__testfixtures__/TestEntity';
|
|
13
|
+
} from '../utils/__testfixtures__/TestEntity.ts';
|
|
14
14
|
|
|
15
15
|
describe(ViewerScopedEntityCompanion, () => {
|
|
16
16
|
it('returns viewer scoped loader and mutator factory', () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { describe, expect, it } from '@jest/globals';
|
|
2
2
|
import { instance, mock } from 'ts-mockito';
|
|
3
3
|
|
|
4
|
-
import { EntityCompanionProvider } from '../EntityCompanionProvider';
|
|
5
|
-
import { ViewerContext } from '../ViewerContext';
|
|
6
|
-
import { ViewerScopedEntityCompanion } from '../ViewerScopedEntityCompanion';
|
|
7
|
-
import { ViewerScopedEntityCompanionProvider } from '../ViewerScopedEntityCompanionProvider';
|
|
8
|
-
import { TestEntity } from '../utils/__testfixtures__/TestEntity';
|
|
4
|
+
import { EntityCompanionProvider } from '../EntityCompanionProvider.ts';
|
|
5
|
+
import { ViewerContext } from '../ViewerContext.ts';
|
|
6
|
+
import { ViewerScopedEntityCompanion } from '../ViewerScopedEntityCompanion.ts';
|
|
7
|
+
import { ViewerScopedEntityCompanionProvider } from '../ViewerScopedEntityCompanionProvider.ts';
|
|
8
|
+
import { TestEntity } from '../utils/__testfixtures__/TestEntity.ts';
|
|
9
9
|
|
|
10
10
|
describe(ViewerScopedEntityCompanionProvider, () => {
|
|
11
11
|
it('returns viewer scoped entity companion', () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { describe, it } from '@jest/globals';
|
|
2
2
|
import { instance, mock, verify } from 'ts-mockito';
|
|
3
3
|
|
|
4
|
-
import { EntityLoaderFactory } from '../EntityLoaderFactory';
|
|
5
|
-
import { EntityPrivacyPolicyEvaluationContext } from '../EntityPrivacyPolicy';
|
|
6
|
-
import { EntityQueryContext } from '../EntityQueryContext';
|
|
7
|
-
import { ViewerContext } from '../ViewerContext';
|
|
8
|
-
import { ViewerScopedEntityLoaderFactory } from '../ViewerScopedEntityLoaderFactory';
|
|
4
|
+
import { EntityLoaderFactory } from '../EntityLoaderFactory.ts';
|
|
5
|
+
import type { EntityPrivacyPolicyEvaluationContext } from '../EntityPrivacyPolicy.ts';
|
|
6
|
+
import { EntityQueryContext } from '../EntityQueryContext.ts';
|
|
7
|
+
import { ViewerContext } from '../ViewerContext.ts';
|
|
8
|
+
import { ViewerScopedEntityLoaderFactory } from '../ViewerScopedEntityLoaderFactory.ts';
|
|
9
9
|
|
|
10
10
|
describe(ViewerScopedEntityLoaderFactory, () => {
|
|
11
11
|
it('correctly scopes viewer to entity loads', async () => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { describe, it } from '@jest/globals';
|
|
2
2
|
import { instance, mock, verify } from 'ts-mockito';
|
|
3
3
|
|
|
4
|
-
import { EntityMutatorFactory } from '../EntityMutatorFactory';
|
|
5
|
-
import { EntityQueryContext } from '../EntityQueryContext';
|
|
6
|
-
import { ViewerContext } from '../ViewerContext';
|
|
7
|
-
import { ViewerScopedEntityMutatorFactory } from '../ViewerScopedEntityMutatorFactory';
|
|
8
|
-
import {
|
|
4
|
+
import { EntityMutatorFactory } from '../EntityMutatorFactory.ts';
|
|
5
|
+
import { EntityQueryContext } from '../EntityQueryContext.ts';
|
|
6
|
+
import { ViewerContext } from '../ViewerContext.ts';
|
|
7
|
+
import { ViewerScopedEntityMutatorFactory } from '../ViewerScopedEntityMutatorFactory.ts';
|
|
8
|
+
import type {
|
|
9
9
|
TestEntity,
|
|
10
10
|
TestEntityPrivacyPolicy,
|
|
11
11
|
TestFields,
|
|
12
|
-
} from '../utils/__testfixtures__/TestEntity';
|
|
12
|
+
} from '../utils/__testfixtures__/TestEntity.ts';
|
|
13
13
|
|
|
14
14
|
describe(ViewerScopedEntityMutatorFactory, () => {
|
|
15
15
|
it('correctly scopes viewer to entity mutations', async () => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { describe, expect, test } from '@jest/globals';
|
|
2
2
|
|
|
3
|
-
import { Entity } from '../../Entity';
|
|
4
|
-
import { EntityCompanionDefinition } from '../../EntityCompanionProvider';
|
|
5
|
-
import { EntityConfiguration } from '../../EntityConfiguration';
|
|
6
|
-
import { StrictEnumField, StringField, UUIDField } from '../../EntityFields';
|
|
7
|
-
import { EntityPrivacyPolicy } from '../../EntityPrivacyPolicy';
|
|
8
|
-
import { ViewerContext } from '../../ViewerContext';
|
|
9
|
-
import { failedResults, successfulResults } from '../../entityUtils';
|
|
10
|
-
import { AlwaysAllowPrivacyPolicyRule } from '../../rules/AlwaysAllowPrivacyPolicyRule';
|
|
11
|
-
import { createUnitTestEntityCompanionProvider } from '../../utils/__testfixtures__/createUnitTestEntityCompanionProvider';
|
|
3
|
+
import { Entity } from '../../Entity.ts';
|
|
4
|
+
import type { EntityCompanionDefinition } from '../../EntityCompanionProvider.ts';
|
|
5
|
+
import { EntityConfiguration } from '../../EntityConfiguration.ts';
|
|
6
|
+
import { StrictEnumField, StringField, UUIDField } from '../../EntityFields.ts';
|
|
7
|
+
import { EntityPrivacyPolicy } from '../../EntityPrivacyPolicy.ts';
|
|
8
|
+
import { ViewerContext } from '../../ViewerContext.ts';
|
|
9
|
+
import { failedResults, successfulResults } from '../../entityUtils.ts';
|
|
10
|
+
import { AlwaysAllowPrivacyPolicyRule } from '../../rules/AlwaysAllowPrivacyPolicyRule.ts';
|
|
11
|
+
import { createUnitTestEntityCompanionProvider } from '../../utils/__testfixtures__/createUnitTestEntityCompanionProvider.ts';
|
|
12
12
|
|
|
13
13
|
describe('Two entities backed by the same table', () => {
|
|
14
14
|
test('load by different types', async () => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { describe, expect, test } from '@jest/globals';
|
|
2
2
|
|
|
3
|
-
import { Entity } from '../../Entity';
|
|
4
|
-
import { EntityCompanionDefinition } from '../../EntityCompanionProvider';
|
|
5
|
-
import { EntityConfiguration } from '../../EntityConfiguration';
|
|
6
|
-
import { StringField, UUIDField } from '../../EntityFields';
|
|
7
|
-
import { EntityPrivacyPolicy } from '../../EntityPrivacyPolicy';
|
|
8
|
-
import { ViewerContext } from '../../ViewerContext';
|
|
9
|
-
import { AlwaysAllowPrivacyPolicyRule } from '../../rules/AlwaysAllowPrivacyPolicyRule';
|
|
10
|
-
import { createUnitTestEntityCompanionProvider } from '../../utils/__testfixtures__/createUnitTestEntityCompanionProvider';
|
|
3
|
+
import { Entity } from '../../Entity.ts';
|
|
4
|
+
import type { EntityCompanionDefinition } from '../../EntityCompanionProvider.ts';
|
|
5
|
+
import { EntityConfiguration } from '../../EntityConfiguration.ts';
|
|
6
|
+
import { StringField, UUIDField } from '../../EntityFields.ts';
|
|
7
|
+
import { EntityPrivacyPolicy } from '../../EntityPrivacyPolicy.ts';
|
|
8
|
+
import { ViewerContext } from '../../ViewerContext.ts';
|
|
9
|
+
import { AlwaysAllowPrivacyPolicyRule } from '../../rules/AlwaysAllowPrivacyPolicyRule.ts';
|
|
10
|
+
import { createUnitTestEntityCompanionProvider } from '../../utils/__testfixtures__/createUnitTestEntityCompanionProvider.ts';
|
|
11
11
|
|
|
12
12
|
describe('Two entities backed by the same table', () => {
|
|
13
13
|
test('mutate through different types and keep consistent cache and dataloader', async () => {
|
|
@@ -3,13 +3,13 @@ import { describe, expect, it } from '@jest/globals';
|
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
enforceResultsAsync,
|
|
6
|
-
successfulResults,
|
|
7
6
|
failedResults,
|
|
8
|
-
successfulResultsFilterMap,
|
|
9
7
|
failedResultsFilterMap,
|
|
10
|
-
pick,
|
|
11
8
|
partitionArray,
|
|
12
|
-
|
|
9
|
+
pick,
|
|
10
|
+
successfulResults,
|
|
11
|
+
successfulResultsFilterMap,
|
|
12
|
+
} from '../entityUtils.ts';
|
|
13
13
|
|
|
14
14
|
describe(enforceResultsAsync, () => {
|
|
15
15
|
it('throws when any result is an error', async () => {
|
package/src/entityUtils.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IEntityClass } from '../Entity';
|
|
2
|
-
import { EntityPrivacyPolicy } from '../EntityPrivacyPolicy';
|
|
3
|
-
import { ReadonlyEntity } from '../ReadonlyEntity';
|
|
4
|
-
import { ViewerContext } from '../ViewerContext';
|
|
5
|
-
import { EntityError, EntityErrorCode, EntityErrorState } from './EntityError';
|
|
1
|
+
import type { IEntityClass } from '../Entity.ts';
|
|
2
|
+
import type { EntityPrivacyPolicy } from '../EntityPrivacyPolicy.ts';
|
|
3
|
+
import type { ReadonlyEntity } from '../ReadonlyEntity.ts';
|
|
4
|
+
import type { ViewerContext } from '../ViewerContext.ts';
|
|
5
|
+
import { EntityError, EntityErrorCode, EntityErrorState } from './EntityError.ts';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Error thrown when an entity field has an invalid value, either during load or mutation.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EntityAuthorizationAction } from '../EntityPrivacyPolicy';
|
|
2
|
-
import { ReadonlyEntity } from '../ReadonlyEntity';
|
|
3
|
-
import { ViewerContext } from '../ViewerContext';
|
|
4
|
-
import { EntityError, EntityErrorCode, EntityErrorState } from './EntityError';
|
|
1
|
+
import { EntityAuthorizationAction } from '../EntityPrivacyPolicy.ts';
|
|
2
|
+
import type { ReadonlyEntity } from '../ReadonlyEntity.ts';
|
|
3
|
+
import type { ViewerContext } from '../ViewerContext.ts';
|
|
4
|
+
import { EntityError, EntityErrorCode, EntityErrorState } from './EntityError.ts';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Error thrown when viewer context is not authorized to perform an action on an entity.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IEntityClass } from '../Entity';
|
|
2
|
-
import { EntityPrivacyPolicy } from '../EntityPrivacyPolicy';
|
|
3
|
-
import { ReadonlyEntity } from '../ReadonlyEntity';
|
|
4
|
-
import { ViewerContext } from '../ViewerContext';
|
|
5
|
-
import { EntityError, EntityErrorCode, EntityErrorState } from './EntityError';
|
|
1
|
+
import type { IEntityClass } from '../Entity.ts';
|
|
2
|
+
import type { EntityPrivacyPolicy } from '../EntityPrivacyPolicy.ts';
|
|
3
|
+
import type { ReadonlyEntity } from '../ReadonlyEntity.ts';
|
|
4
|
+
import type { ViewerContext } from '../ViewerContext.ts';
|
|
5
|
+
import { EntityError, EntityErrorCode, EntityErrorState } from './EntityError.ts';
|
|
6
6
|
|
|
7
7
|
type EntityNotFoundOptions<
|
|
8
8
|
TFields extends Record<string, any>,
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
EntityDatabaseAdapterTransientError,
|
|
16
16
|
EntityDatabaseAdapterUniqueConstraintError,
|
|
17
17
|
EntityDatabaseAdapterUnknownError,
|
|
18
|
-
} from '../EntityDatabaseAdapterError';
|
|
19
|
-
import { EntityErrorCode, EntityErrorState } from '../EntityError';
|
|
18
|
+
} from '../EntityDatabaseAdapterError.ts';
|
|
19
|
+
import { EntityErrorCode, EntityErrorState } from '../EntityError.ts';
|
|
20
20
|
|
|
21
21
|
describe(EntityDatabaseAdapterError, () => {
|
|
22
22
|
// necessary for coverage within the entity package since these errors are
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { describe, expect, it } from '@jest/globals';
|
|
2
2
|
import { instance, mock } from 'ts-mockito';
|
|
3
3
|
|
|
4
|
-
import { ViewerContext } from '../../ViewerContext';
|
|
5
|
-
import { SimpleTestEntity } from '../../utils/__testfixtures__/SimpleTestEntity';
|
|
6
|
-
import { EntityCacheAdapterTransientError } from '../EntityCacheAdapterError';
|
|
7
|
-
import { EntityErrorCode, EntityErrorState } from '../EntityError';
|
|
8
|
-
import { EntityInvalidFieldValueError } from '../EntityInvalidFieldValueError';
|
|
9
|
-
import { EntityNotAuthorizedError } from '../EntityNotAuthorizedError';
|
|
10
|
-
import { EntityNotFoundError } from '../EntityNotFoundError';
|
|
4
|
+
import { ViewerContext } from '../../ViewerContext.ts';
|
|
5
|
+
import { SimpleTestEntity } from '../../utils/__testfixtures__/SimpleTestEntity.ts';
|
|
6
|
+
import { EntityCacheAdapterTransientError } from '../EntityCacheAdapterError.ts';
|
|
7
|
+
import { EntityErrorCode, EntityErrorState } from '../EntityError.ts';
|
|
8
|
+
import { EntityInvalidFieldValueError } from '../EntityInvalidFieldValueError.ts';
|
|
9
|
+
import { EntityNotAuthorizedError } from '../EntityNotAuthorizedError.ts';
|
|
10
|
+
import { EntityNotFoundError } from '../EntityNotFoundError.ts';
|
|
11
11
|
|
|
12
12
|
describe('EntityError subclasses', () => {
|
|
13
13
|
it('EntityNotFoundError has correct state and code', () => {
|
package/src/index.ts
CHANGED
|
@@ -4,80 +4,80 @@
|
|
|
4
4
|
* @module @expo/entity
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export * from './AuthorizationResultBasedEntityAssociationLoader';
|
|
8
|
-
export * from './AuthorizationResultBasedEntityLoader';
|
|
9
|
-
export * from './AuthorizationResultBasedEntityMutator';
|
|
10
|
-
export * from './ComposedEntityCacheAdapter';
|
|
11
|
-
export * from './ComposedSecondaryEntityCache';
|
|
12
|
-
export * from './EnforcingEntityAssociationLoader';
|
|
13
|
-
export * from './EnforcingEntityCreator';
|
|
14
|
-
export * from './EnforcingEntityDeleter';
|
|
15
|
-
export * from './EnforcingEntityLoader';
|
|
16
|
-
export * from './EnforcingEntityUpdater';
|
|
17
|
-
export * from './Entity';
|
|
18
|
-
export * from './EntityAssociationLoader';
|
|
19
|
-
export * from './EntityCompanion';
|
|
20
|
-
export * from './EntityCompanionProvider';
|
|
21
|
-
export * from './EntityConfiguration';
|
|
22
|
-
export * from './EntityConstructionUtils';
|
|
23
|
-
export * from './EntityCreator';
|
|
24
|
-
export * from './EntityDatabaseAdapter';
|
|
25
|
-
export * from './EntityDeleter';
|
|
26
|
-
export * from './EntityFieldDefinition';
|
|
27
|
-
export * from './EntityFields';
|
|
28
|
-
export * from './EntityInvalidationUtils';
|
|
29
|
-
export * from './EntityLoader';
|
|
30
|
-
export * from './EntityLoaderFactory';
|
|
31
|
-
export * from './EntityMutationInfo';
|
|
32
|
-
export * from './EntityMutationTriggerConfiguration';
|
|
33
|
-
export * from './EntityMutationValidatorConfiguration';
|
|
34
|
-
export * from './EntityMutatorFactory';
|
|
35
|
-
export * from './EntityPrivacyPolicy';
|
|
36
|
-
export * from './EntityQueryContext';
|
|
37
|
-
export * from './EntityQueryContextProvider';
|
|
38
|
-
export * from './EntitySecondaryCacheLoader';
|
|
39
|
-
export * from './EntityUpdater';
|
|
40
|
-
export * from './entityUtils';
|
|
41
|
-
export * from './GenericEntityCacheAdapter';
|
|
42
|
-
export * from './GenericSecondaryEntityCache';
|
|
43
|
-
export * from './IEntityCacheAdapter';
|
|
44
|
-
export * from './IEntityCacheAdapterProvider';
|
|
45
|
-
export * from './IEntityDatabaseAdapterProvider';
|
|
46
|
-
export * from './IEntityGenericCacher';
|
|
47
|
-
export * from './ReadonlyEntity';
|
|
48
|
-
export * from './ViewerContext';
|
|
49
|
-
export * from './ViewerScopedEntityCompanion';
|
|
50
|
-
export * from './ViewerScopedEntityCompanionProvider';
|
|
51
|
-
export * from './ViewerScopedEntityLoaderFactory';
|
|
52
|
-
export * from './ViewerScopedEntityMutatorFactory';
|
|
53
|
-
export * from './errors/EntityCacheAdapterError';
|
|
54
|
-
export * from './errors/EntityDatabaseAdapterError';
|
|
55
|
-
export * from './errors/EntityError';
|
|
56
|
-
export * from './errors/EntityInvalidFieldValueError';
|
|
57
|
-
export * from './errors/EntityNotAuthorizedError';
|
|
58
|
-
export * from './errors/EntityNotFoundError';
|
|
59
|
-
export * from './internal/CompositeFieldHolder';
|
|
60
|
-
export * from './internal/CompositeFieldValueMap';
|
|
61
|
-
export * from './internal/EntityDataManager';
|
|
62
|
-
export * from './internal/EntityFieldTransformationUtils';
|
|
63
|
-
export * from './internal/EntityLoadInterfaces';
|
|
64
|
-
export * from './internal/EntityTableDataCoordinator';
|
|
65
|
-
export * from './internal/ReadThroughEntityCache';
|
|
66
|
-
export * from './internal/SingleFieldHolder';
|
|
67
|
-
export * from './metrics/EntityMetricsUtils';
|
|
68
|
-
export * from './metrics/IEntityMetricsAdapter';
|
|
69
|
-
export * from './metrics/NoOpEntityMetricsAdapter';
|
|
70
|
-
export * from './rules/AllowIfAllSubRulesAllowPrivacyPolicyRule';
|
|
71
|
-
export * from './rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule';
|
|
72
|
-
export * from './rules/AllowIfInParentCascadeDeletionPrivacyPolicyRule';
|
|
73
|
-
export * from './rules/AlwaysAllowPrivacyPolicyRule';
|
|
74
|
-
export * from './rules/AlwaysDenyPrivacyPolicyRule';
|
|
75
|
-
export * from './rules/AlwaysSkipPrivacyPolicyRule';
|
|
76
|
-
export * from './rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule';
|
|
77
|
-
export * from './rules/PrivacyPolicyRule';
|
|
78
|
-
export * from './utils/EntityCreationUtils';
|
|
79
|
-
export * from './utils/EntityPrivacyUtils';
|
|
80
|
-
export * from './utils/mergeEntityMutationTriggerConfigurations';
|
|
81
|
-
export * from './utils/collections/maps';
|
|
82
|
-
export * from './utils/collections/SerializableKeyMap';
|
|
83
|
-
export * from './utils/collections/sets';
|
|
7
|
+
export * from './AuthorizationResultBasedEntityAssociationLoader.ts';
|
|
8
|
+
export * from './AuthorizationResultBasedEntityLoader.ts';
|
|
9
|
+
export * from './AuthorizationResultBasedEntityMutator.ts';
|
|
10
|
+
export * from './ComposedEntityCacheAdapter.ts';
|
|
11
|
+
export * from './ComposedSecondaryEntityCache.ts';
|
|
12
|
+
export * from './EnforcingEntityAssociationLoader.ts';
|
|
13
|
+
export * from './EnforcingEntityCreator.ts';
|
|
14
|
+
export * from './EnforcingEntityDeleter.ts';
|
|
15
|
+
export * from './EnforcingEntityLoader.ts';
|
|
16
|
+
export * from './EnforcingEntityUpdater.ts';
|
|
17
|
+
export * from './Entity.ts';
|
|
18
|
+
export * from './EntityAssociationLoader.ts';
|
|
19
|
+
export * from './EntityCompanion.ts';
|
|
20
|
+
export * from './EntityCompanionProvider.ts';
|
|
21
|
+
export * from './EntityConfiguration.ts';
|
|
22
|
+
export * from './EntityConstructionUtils.ts';
|
|
23
|
+
export * from './EntityCreator.ts';
|
|
24
|
+
export * from './EntityDatabaseAdapter.ts';
|
|
25
|
+
export * from './EntityDeleter.ts';
|
|
26
|
+
export * from './EntityFieldDefinition.ts';
|
|
27
|
+
export * from './EntityFields.ts';
|
|
28
|
+
export * from './EntityInvalidationUtils.ts';
|
|
29
|
+
export * from './EntityLoader.ts';
|
|
30
|
+
export * from './EntityLoaderFactory.ts';
|
|
31
|
+
export * from './EntityMutationInfo.ts';
|
|
32
|
+
export * from './EntityMutationTriggerConfiguration.ts';
|
|
33
|
+
export * from './EntityMutationValidatorConfiguration.ts';
|
|
34
|
+
export * from './EntityMutatorFactory.ts';
|
|
35
|
+
export * from './EntityPrivacyPolicy.ts';
|
|
36
|
+
export * from './EntityQueryContext.ts';
|
|
37
|
+
export * from './EntityQueryContextProvider.ts';
|
|
38
|
+
export * from './EntitySecondaryCacheLoader.ts';
|
|
39
|
+
export * from './EntityUpdater.ts';
|
|
40
|
+
export * from './entityUtils.ts';
|
|
41
|
+
export * from './GenericEntityCacheAdapter.ts';
|
|
42
|
+
export * from './GenericSecondaryEntityCache.ts';
|
|
43
|
+
export * from './IEntityCacheAdapter.ts';
|
|
44
|
+
export * from './IEntityCacheAdapterProvider.ts';
|
|
45
|
+
export * from './IEntityDatabaseAdapterProvider.ts';
|
|
46
|
+
export * from './IEntityGenericCacher.ts';
|
|
47
|
+
export * from './ReadonlyEntity.ts';
|
|
48
|
+
export * from './ViewerContext.ts';
|
|
49
|
+
export * from './ViewerScopedEntityCompanion.ts';
|
|
50
|
+
export * from './ViewerScopedEntityCompanionProvider.ts';
|
|
51
|
+
export * from './ViewerScopedEntityLoaderFactory.ts';
|
|
52
|
+
export * from './ViewerScopedEntityMutatorFactory.ts';
|
|
53
|
+
export * from './errors/EntityCacheAdapterError.ts';
|
|
54
|
+
export * from './errors/EntityDatabaseAdapterError.ts';
|
|
55
|
+
export * from './errors/EntityError.ts';
|
|
56
|
+
export * from './errors/EntityInvalidFieldValueError.ts';
|
|
57
|
+
export * from './errors/EntityNotAuthorizedError.ts';
|
|
58
|
+
export * from './errors/EntityNotFoundError.ts';
|
|
59
|
+
export * from './internal/CompositeFieldHolder.ts';
|
|
60
|
+
export * from './internal/CompositeFieldValueMap.ts';
|
|
61
|
+
export * from './internal/EntityDataManager.ts';
|
|
62
|
+
export * from './internal/EntityFieldTransformationUtils.ts';
|
|
63
|
+
export * from './internal/EntityLoadInterfaces.ts';
|
|
64
|
+
export * from './internal/EntityTableDataCoordinator.ts';
|
|
65
|
+
export * from './internal/ReadThroughEntityCache.ts';
|
|
66
|
+
export * from './internal/SingleFieldHolder.ts';
|
|
67
|
+
export * from './metrics/EntityMetricsUtils.ts';
|
|
68
|
+
export * from './metrics/IEntityMetricsAdapter.ts';
|
|
69
|
+
export * from './metrics/NoOpEntityMetricsAdapter.ts';
|
|
70
|
+
export * from './rules/AllowIfAllSubRulesAllowPrivacyPolicyRule.ts';
|
|
71
|
+
export * from './rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule.ts';
|
|
72
|
+
export * from './rules/AllowIfInParentCascadeDeletionPrivacyPolicyRule.ts';
|
|
73
|
+
export * from './rules/AlwaysAllowPrivacyPolicyRule.ts';
|
|
74
|
+
export * from './rules/AlwaysDenyPrivacyPolicyRule.ts';
|
|
75
|
+
export * from './rules/AlwaysSkipPrivacyPolicyRule.ts';
|
|
76
|
+
export * from './rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule.ts';
|
|
77
|
+
export * from './rules/PrivacyPolicyRule.ts';
|
|
78
|
+
export * from './utils/EntityCreationUtils.ts';
|
|
79
|
+
export * from './utils/EntityPrivacyUtils.ts';
|
|
80
|
+
export * from './utils/mergeEntityMutationTriggerConfigurations.ts';
|
|
81
|
+
export * from './utils/collections/maps.ts';
|
|
82
|
+
export * from './utils/collections/SerializableKeyMap.ts';
|
|
83
|
+
export * from './utils/collections/sets.ts';
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import invariant from 'invariant';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type {
|
|
4
4
|
EntityCompositeField,
|
|
5
5
|
EntityCompositeFieldValue,
|
|
6
6
|
EntityConfiguration,
|
|
7
|
-
} from '../EntityConfiguration';
|
|
8
|
-
import { pick } from '../entityUtils';
|
|
9
|
-
import { getDatabaseFieldForEntityField } from './EntityFieldTransformationUtils';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
IEntityLoadKey,
|
|
13
|
-
IEntityLoadValue,
|
|
14
|
-
LoadValueMap,
|
|
15
|
-
} from '../internal/EntityLoadInterfaces';
|
|
7
|
+
} from '../EntityConfiguration.ts';
|
|
8
|
+
import { pick } from '../entityUtils.ts';
|
|
9
|
+
import { getDatabaseFieldForEntityField } from './EntityFieldTransformationUtils.ts';
|
|
10
|
+
import type { IEntityLoadKey, IEntityLoadValue } from '../internal/EntityLoadInterfaces.ts';
|
|
11
|
+
import { EntityLoadMethodType, LoadValueMap } from '../internal/EntityLoadInterfaces.ts';
|
|
16
12
|
|
|
17
13
|
declare const CompositeFieldHolderSerializedBrand: unique symbol;
|
|
18
14
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { EntityCompositeField, EntityCompositeFieldValue } from '../EntityConfiguration';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
CompositeFieldValueHolder,
|
|
5
|
-
} from './CompositeFieldHolder';
|
|
1
|
+
import type { EntityCompositeField, EntityCompositeFieldValue } from '../EntityConfiguration.ts';
|
|
2
|
+
import type { SerializedCompositeFieldValueHolder } from './CompositeFieldHolder.ts';
|
|
3
|
+
import { CompositeFieldValueHolder } from './CompositeFieldHolder.ts';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* @internal
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import DataLoader from 'dataloader';
|
|
2
2
|
import invariant from 'invariant';
|
|
3
3
|
|
|
4
|
-
import { EntityDatabaseAdapter } from '../EntityDatabaseAdapter';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from '
|
|
10
|
-
import {
|
|
11
|
-
import { partitionErrors } from '../entityUtils';
|
|
12
|
-
import { IEntityLoadKey, IEntityLoadValue, LoadPair } from './EntityLoadInterfaces';
|
|
13
|
-
import { ReadThroughEntityCache } from './ReadThroughEntityCache';
|
|
4
|
+
import type { EntityDatabaseAdapter } from '../EntityDatabaseAdapter.ts';
|
|
5
|
+
import type { EntityQueryContext, EntityTransactionalQueryContext } from '../EntityQueryContext.ts';
|
|
6
|
+
import { TransactionalDataLoaderMode } from '../EntityQueryContext.ts';
|
|
7
|
+
import type { EntityQueryContextProvider } from '../EntityQueryContextProvider.ts';
|
|
8
|
+
import { partitionErrors } from '../entityUtils.ts';
|
|
9
|
+
import type { IEntityLoadKey, IEntityLoadValue, LoadPair } from './EntityLoadInterfaces.ts';
|
|
10
|
+
import type { ReadThroughEntityCache } from './ReadThroughEntityCache.ts';
|
|
14
11
|
import {
|
|
15
12
|
timeAndLogLoadMapEventAsync,
|
|
16
13
|
timeAndLogLoadOneEventAsync,
|
|
17
|
-
} from '../metrics/EntityMetricsUtils';
|
|
14
|
+
} from '../metrics/EntityMetricsUtils.ts';
|
|
15
|
+
import type { IEntityMetricsAdapter } from '../metrics/IEntityMetricsAdapter.ts';
|
|
18
16
|
import {
|
|
19
17
|
EntityMetricsLoadType,
|
|
20
|
-
IEntityMetricsAdapter,
|
|
21
18
|
IncrementLoadCountEventType,
|
|
22
|
-
} from '../metrics/IEntityMetricsAdapter';
|
|
23
|
-
import { computeIfAbsent } from '../utils/collections/maps';
|
|
19
|
+
} from '../metrics/IEntityMetricsAdapter.ts';
|
|
20
|
+
import { computeIfAbsent } from '../utils/collections/maps.ts';
|
|
24
21
|
|
|
25
22
|
type DataLoaderMap<TFields extends Record<string, any>> = Map<
|
|
26
23
|
string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import nullthrows from '@expo/nullthrows';
|
|
1
2
|
import invariant from 'invariant';
|
|
2
|
-
import nullthrows from 'nullthrows';
|
|
3
3
|
|
|
4
|
-
import { EntityConfiguration } from '../EntityConfiguration';
|
|
4
|
+
import type { EntityConfiguration } from '../EntityConfiguration.ts';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EntityConfiguration } from '../EntityConfiguration';
|
|
2
|
-
import { ISerializable
|
|
1
|
+
import type { EntityConfiguration } from '../EntityConfiguration.ts';
|
|
2
|
+
import type { ISerializable } from '../utils/collections/SerializableKeyMap.ts';
|
|
3
|
+
import { SerializableKeyMap } from '../utils/collections/SerializableKeyMap.ts';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Load method type identifier of a load key. Used for keying data loaders and identification in metrics.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { EntityConfiguration } from '../EntityConfiguration';
|
|
2
|
-
import { EntityDatabaseAdapter } from '../EntityDatabaseAdapter';
|
|
3
|
-
import { EntityQueryContextProvider } from '../EntityQueryContextProvider';
|
|
4
|
-
import { IEntityCacheAdapter } from '../IEntityCacheAdapter';
|
|
5
|
-
import { IEntityCacheAdapterProvider } from '../IEntityCacheAdapterProvider';
|
|
6
|
-
import { IEntityDatabaseAdapterProvider } from '../IEntityDatabaseAdapterProvider';
|
|
7
|
-
import { EntityDataManager } from './EntityDataManager';
|
|
8
|
-
import { ReadThroughEntityCache } from './ReadThroughEntityCache';
|
|
9
|
-
import { IEntityMetricsAdapter } from '../metrics/IEntityMetricsAdapter';
|
|
1
|
+
import type { EntityConfiguration } from '../EntityConfiguration.ts';
|
|
2
|
+
import type { EntityDatabaseAdapter } from '../EntityDatabaseAdapter.ts';
|
|
3
|
+
import type { EntityQueryContextProvider } from '../EntityQueryContextProvider.ts';
|
|
4
|
+
import type { IEntityCacheAdapter } from '../IEntityCacheAdapter.ts';
|
|
5
|
+
import type { IEntityCacheAdapterProvider } from '../IEntityCacheAdapterProvider.ts';
|
|
6
|
+
import type { IEntityDatabaseAdapterProvider } from '../IEntityDatabaseAdapterProvider.ts';
|
|
7
|
+
import { EntityDataManager } from './EntityDataManager.ts';
|
|
8
|
+
import { ReadThroughEntityCache } from './ReadThroughEntityCache.ts';
|
|
9
|
+
import type { IEntityMetricsAdapter } from '../metrics/IEntityMetricsAdapter.ts';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Responsible for orchestrating fetching and caching of entity data from a
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import invariant from 'invariant';
|
|
2
2
|
|
|
3
|
-
import { EntityConfiguration } from '../EntityConfiguration';
|
|
4
|
-
import { IEntityCacheAdapter } from '../IEntityCacheAdapter';
|
|
5
|
-
import { IEntityLoadKey, IEntityLoadValue } from './EntityLoadInterfaces';
|
|
6
|
-
import { filterMap } from '../utils/collections/maps';
|
|
3
|
+
import type { EntityConfiguration } from '../EntityConfiguration.ts';
|
|
4
|
+
import type { IEntityCacheAdapter } from '../IEntityCacheAdapter.ts';
|
|
5
|
+
import type { IEntityLoadKey, IEntityLoadValue } from './EntityLoadInterfaces.ts';
|
|
6
|
+
import { filterMap } from '../utils/collections/maps.ts';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @internal
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import invariant from 'invariant';
|
|
2
2
|
|
|
3
|
-
import { EntityConfiguration } from '../EntityConfiguration';
|
|
4
|
-
import { getDatabaseFieldForEntityField } from './EntityFieldTransformationUtils';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
IEntityLoadKey,
|
|
8
|
-
IEntityLoadValue,
|
|
9
|
-
LoadValueMap,
|
|
10
|
-
} from './EntityLoadInterfaces';
|
|
3
|
+
import type { EntityConfiguration } from '../EntityConfiguration.ts';
|
|
4
|
+
import { getDatabaseFieldForEntityField } from './EntityFieldTransformationUtils.ts';
|
|
5
|
+
import type { IEntityLoadKey, IEntityLoadValue } from './EntityLoadInterfaces.ts';
|
|
6
|
+
import { EntityLoadMethodType, LoadValueMap } from './EntityLoadInterfaces.ts';
|
|
11
7
|
|
|
12
8
|
/**
|
|
13
9
|
* A load key that represents a single field (fieldName) on an entity.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from '@jest/globals';
|
|
2
2
|
|
|
3
|
-
import { CompositeFieldHolder, CompositeFieldValueHolder } from '../CompositeFieldHolder';
|
|
3
|
+
import { CompositeFieldHolder, CompositeFieldValueHolder } from '../CompositeFieldHolder.ts';
|
|
4
4
|
|
|
5
5
|
type TestFields = {
|
|
6
6
|
id: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from '@jest/globals';
|
|
2
2
|
|
|
3
|
-
import { EntityCompositeFieldValue } from '../../EntityConfiguration';
|
|
4
|
-
import { CompositeFieldValueHolder } from '../CompositeFieldHolder';
|
|
5
|
-
import { CompositeFieldValueMap } from '../CompositeFieldValueMap';
|
|
3
|
+
import type { EntityCompositeFieldValue } from '../../EntityConfiguration.ts';
|
|
4
|
+
import { CompositeFieldValueHolder } from '../CompositeFieldHolder.ts';
|
|
5
|
+
import { CompositeFieldValueMap } from '../CompositeFieldValueMap.ts';
|
|
6
6
|
|
|
7
7
|
describe(CompositeFieldValueMap, () => {
|
|
8
8
|
it('behaves like a ReadonlyMap', () => {
|