@expo/entity 0.25.3 → 0.27.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.
Files changed (178) hide show
  1. package/LICENSE +21 -0
  2. package/build/ComposedEntityCacheAdapter.d.ts +4 -2
  3. package/build/ComposedEntityCacheAdapter.js +39 -3
  4. package/build/ComposedEntityCacheAdapter.js.map +1 -1
  5. package/build/ComposedSecondaryEntityCache.d.ts +3 -2
  6. package/build/ComposedSecondaryEntityCache.js +3 -2
  7. package/build/ComposedSecondaryEntityCache.js.map +1 -1
  8. package/build/EnforcingEntityLoader.d.ts +10 -10
  9. package/build/EnforcingEntityLoader.js +8 -8
  10. package/build/EnforcingEntityLoader.js.map +1 -1
  11. package/build/Entity.d.ts +5 -5
  12. package/build/Entity.js +9 -9
  13. package/build/Entity.js.map +1 -1
  14. package/build/EntityAssociationLoader.d.ts +9 -4
  15. package/build/EntityAssociationLoader.js +5 -0
  16. package/build/EntityAssociationLoader.js.map +1 -1
  17. package/build/EntityCacheAdapter.d.ts +1 -1
  18. package/build/EntityCompanion.d.ts +1 -1
  19. package/build/EntityCompanion.js +1 -1
  20. package/build/EntityCompanionProvider.d.ts +9 -9
  21. package/build/EntityCompanionProvider.js +3 -3
  22. package/build/EntityConfiguration.d.ts +2 -2
  23. package/build/EntityDatabaseAdapter.d.ts +15 -6
  24. package/build/EntityDatabaseAdapter.js +8 -2
  25. package/build/EntityDatabaseAdapter.js.map +1 -1
  26. package/build/EntityFieldDefinition.d.ts +16 -8
  27. package/build/EntityFieldDefinition.js +12 -5
  28. package/build/EntityFieldDefinition.js.map +1 -1
  29. package/build/EntityFields.d.ts +11 -11
  30. package/build/EntityFields.js +11 -11
  31. package/build/EntityLoader.d.ts +7 -7
  32. package/build/EntityLoader.js +7 -7
  33. package/build/EntityLoader.js.map +1 -1
  34. package/build/EntityMutationInfo.d.ts +2 -0
  35. package/build/EntityMutationTriggerConfiguration.d.ts +1 -1
  36. package/build/EntityMutationTriggerConfiguration.js +1 -1
  37. package/build/EntityMutator.d.ts +7 -9
  38. package/build/EntityMutator.js +59 -47
  39. package/build/EntityMutator.js.map +1 -1
  40. package/build/EntityMutatorFactory.d.ts +4 -4
  41. package/build/EntityMutatorFactory.js +6 -6
  42. package/build/EntityMutatorFactory.js.map +1 -1
  43. package/build/EntityPrivacyPolicy.d.ts +18 -5
  44. package/build/EntityPrivacyPolicy.js +18 -5
  45. package/build/EntityPrivacyPolicy.js.map +1 -1
  46. package/build/EntityQueryContext.d.ts +12 -1
  47. package/build/EntityQueryContext.js +12 -1
  48. package/build/EntityQueryContext.js.map +1 -1
  49. package/build/EntityQueryContextProvider.d.ts +1 -1
  50. package/build/EntitySecondaryCacheLoader.d.ts +1 -1
  51. package/build/EntitySecondaryCacheLoader.js +1 -1
  52. package/build/GenericSecondaryEntityCache.d.ts +1 -1
  53. package/build/GenericSecondaryEntityCache.js +1 -1
  54. package/build/ReadonlyEntity.d.ts +1 -1
  55. package/build/ReadonlyEntity.js +1 -1
  56. package/build/ViewerContext.d.ts +2 -2
  57. package/build/ViewerContext.js +2 -2
  58. package/build/ViewerScopedEntityCompanion.d.ts +2 -2
  59. package/build/ViewerScopedEntityCompanion.js +2 -2
  60. package/build/ViewerScopedEntityLoaderFactory.d.ts +1 -1
  61. package/build/ViewerScopedEntityLoaderFactory.js +1 -1
  62. package/build/ViewerScopedEntityMutatorFactory.d.ts +5 -5
  63. package/build/ViewerScopedEntityMutatorFactory.js +7 -7
  64. package/build/ViewerScopedEntityMutatorFactory.js.map +1 -1
  65. package/build/__tests__/ComposedCacheAdapter-test.js +37 -4
  66. package/build/__tests__/ComposedCacheAdapter-test.js.map +1 -1
  67. package/build/__tests__/EntityCommonUseCases-test.js +5 -1
  68. package/build/__tests__/EntityCommonUseCases-test.js.map +1 -1
  69. package/build/__tests__/EntityCompanion-test.js +5 -1
  70. package/build/__tests__/EntityCompanion-test.js.map +1 -1
  71. package/build/__tests__/EntityCompanionProvider-test.js +5 -1
  72. package/build/__tests__/EntityCompanionProvider-test.js.map +1 -1
  73. package/build/__tests__/EntityEdges-test.js +199 -33
  74. package/build/__tests__/EntityEdges-test.js.map +1 -1
  75. package/build/__tests__/EntityLoader-test.js +5 -1
  76. package/build/__tests__/EntityLoader-test.js.map +1 -1
  77. package/build/__tests__/EntityMutator-test.js +38 -53
  78. package/build/__tests__/EntityMutator-test.js.map +1 -1
  79. package/build/__tests__/EntityPrivacyPolicy-test.js +5 -1
  80. package/build/__tests__/EntityPrivacyPolicy-test.js.map +1 -1
  81. package/build/__tests__/EntitySelfReferentialEdges-test.js +2 -2
  82. package/build/__tests__/EntitySelfReferentialEdges-test.js.map +1 -1
  83. package/build/__tests__/ViewerScopedEntityCompanionProvider-test.js +5 -1
  84. package/build/__tests__/ViewerScopedEntityCompanionProvider-test.js.map +1 -1
  85. package/build/__tests__/ViewerScopedEntityMutatorFactory-test.js +2 -3
  86. package/build/__tests__/ViewerScopedEntityMutatorFactory-test.js.map +1 -1
  87. package/build/errors/EntityCacheAdapterError.js +5 -1
  88. package/build/errors/EntityCacheAdapterError.js.map +1 -1
  89. package/build/errors/EntityDatabaseAdapterError.js +5 -1
  90. package/build/errors/EntityDatabaseAdapterError.js.map +1 -1
  91. package/build/errors/EntityInvalidFieldValueError.js +6 -2
  92. package/build/errors/EntityInvalidFieldValueError.js.map +1 -1
  93. package/build/errors/EntityNotAuthorizedError.js +5 -1
  94. package/build/errors/EntityNotAuthorizedError.js.map +1 -1
  95. package/build/errors/EntityNotFoundError.js +6 -2
  96. package/build/errors/EntityNotFoundError.js.map +1 -1
  97. package/build/index.js +5 -1
  98. package/build/index.js.map +1 -1
  99. package/build/internal/EntityDataManager.d.ts +5 -5
  100. package/build/internal/EntityDataManager.js +10 -7
  101. package/build/internal/EntityDataManager.js.map +1 -1
  102. package/build/internal/EntityFieldTransformationUtils.js +1 -1
  103. package/build/internal/EntityFieldTransformationUtils.js.map +1 -1
  104. package/build/internal/ReadThroughEntityCache.d.ts +2 -2
  105. package/build/internal/ReadThroughEntityCache.js +3 -3
  106. package/build/internal/ReadThroughEntityCache.js.map +1 -1
  107. package/build/internal/__tests__/EntityDataManager-test.js +12 -7
  108. package/build/internal/__tests__/EntityDataManager-test.js.map +1 -1
  109. package/build/internal/__tests__/ReadThroughEntityCache-test.js +5 -1
  110. package/build/internal/__tests__/ReadThroughEntityCache-test.js.map +1 -1
  111. package/build/metrics/IEntityMetricsAdapter.d.ts +63 -18
  112. package/build/metrics/IEntityMetricsAdapter.js +17 -1
  113. package/build/metrics/IEntityMetricsAdapter.js.map +1 -1
  114. package/build/metrics/NoOpEntityMetricsAdapter.d.ts +1 -3
  115. package/build/metrics/NoOpEntityMetricsAdapter.js +1 -3
  116. package/build/metrics/NoOpEntityMetricsAdapter.js.map +1 -1
  117. package/build/rules/AlwaysAllowPrivacyPolicyRule.js +5 -1
  118. package/build/rules/AlwaysAllowPrivacyPolicyRule.js.map +1 -1
  119. package/build/rules/AlwaysDenyPrivacyPolicyRule.js +5 -1
  120. package/build/rules/AlwaysDenyPrivacyPolicyRule.js.map +1 -1
  121. package/build/rules/AlwaysSkipPrivacyPolicyRule.js +5 -1
  122. package/build/rules/AlwaysSkipPrivacyPolicyRule.js.map +1 -1
  123. package/build/rules/PrivacyPolicyRule.d.ts +1 -1
  124. package/build/rules/PrivacyPolicyRule.js +1 -1
  125. package/build/utils/collections/maps.d.ts +1 -1
  126. package/build/utils/collections/maps.js +1 -1
  127. package/build/utils/testing/PrivacyPolicyRuleTestUtils.d.ts +1 -2
  128. package/build/utils/testing/StubDatabaseAdapter.js +6 -2
  129. package/build/utils/testing/StubDatabaseAdapter.js.map +1 -1
  130. package/build/utils/testing/StubQueryContextProvider.d.ts +1 -1
  131. package/build/utils/testing/StubQueryContextProvider.js +2 -0
  132. package/build/utils/testing/StubQueryContextProvider.js.map +1 -1
  133. package/package.json +3 -2
  134. package/src/ComposedEntityCacheAdapter.ts +44 -3
  135. package/src/ComposedSecondaryEntityCache.ts +3 -2
  136. package/src/EnforcingEntityLoader.ts +14 -10
  137. package/src/Entity.ts +9 -9
  138. package/src/EntityAssociationLoader.ts +9 -4
  139. package/src/EntityCacheAdapter.ts +1 -1
  140. package/src/EntityCompanion.ts +1 -1
  141. package/src/EntityCompanionProvider.ts +9 -9
  142. package/src/EntityConfiguration.ts +2 -2
  143. package/src/EntityDatabaseAdapter.ts +33 -6
  144. package/src/EntityFieldDefinition.ts +15 -6
  145. package/src/EntityFields.ts +11 -11
  146. package/src/EntityLoader.ts +11 -8
  147. package/src/EntityMutationInfo.ts +2 -0
  148. package/src/EntityMutationTriggerConfiguration.ts +1 -1
  149. package/src/EntityMutator.ts +99 -68
  150. package/src/EntityMutatorFactory.ts +4 -10
  151. package/src/EntityPrivacyPolicy.ts +20 -5
  152. package/src/EntityQueryContext.ts +12 -1
  153. package/src/EntityQueryContextProvider.ts +1 -1
  154. package/src/EntitySecondaryCacheLoader.ts +1 -1
  155. package/src/GenericSecondaryEntityCache.ts +1 -1
  156. package/src/ReadonlyEntity.ts +1 -1
  157. package/src/ViewerContext.ts +2 -2
  158. package/src/ViewerScopedEntityCompanion.ts +2 -2
  159. package/src/ViewerScopedEntityLoaderFactory.ts +1 -1
  160. package/src/ViewerScopedEntityMutatorFactory.ts +8 -23
  161. package/src/__tests__/ComposedCacheAdapter-test.ts +43 -4
  162. package/src/__tests__/EntityEdges-test.ts +287 -32
  163. package/src/__tests__/EntityMutator-test.ts +33 -54
  164. package/src/__tests__/EntitySelfReferentialEdges-test.ts +2 -2
  165. package/src/__tests__/ViewerScopedEntityMutatorFactory-test.ts +2 -6
  166. package/src/errors/EntityInvalidFieldValueError.ts +1 -1
  167. package/src/errors/EntityNotFoundError.ts +1 -1
  168. package/src/internal/EntityDataManager.ts +18 -9
  169. package/src/internal/EntityFieldTransformationUtils.ts +1 -1
  170. package/src/internal/ReadThroughEntityCache.ts +5 -3
  171. package/src/internal/__tests__/EntityDataManager-test.ts +11 -8
  172. package/src/metrics/IEntityMetricsAdapter.ts +73 -20
  173. package/src/metrics/NoOpEntityMetricsAdapter.ts +1 -5
  174. package/src/rules/PrivacyPolicyRule.ts +1 -1
  175. package/src/utils/collections/maps.ts +1 -1
  176. package/src/utils/testing/PrivacyPolicyRuleTestUtils.ts +1 -1
  177. package/src/utils/testing/StubDatabaseAdapter.ts +4 -1
  178. package/src/utils/testing/StubQueryContextProvider.ts +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-present 650 Industries, Inc. (aka Expo)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,15 +1,17 @@
1
1
  import EntityCacheAdapter from './EntityCacheAdapter';
2
2
  import EntityConfiguration from './EntityConfiguration';
3
3
  import { CacheLoadResult } from './internal/ReadThroughEntityCache';
4
+ /**
5
+ * A EntityCacheAdapter that composes other EntityCacheAdapter instances.
6
+ */
4
7
  export default class ComposedEntityCacheAdapter<TFields> extends EntityCacheAdapter<TFields> {
5
8
  private readonly cacheAdapters;
6
9
  /**
7
- * A {@link EntityCacheAdapter} that composes other {@link EntityCacheAdapter} instances.
8
- *
9
10
  * @param entityConfiguration - configuration for entity being loaded
10
11
  * @param cacheAdapters - list of cache adapters to compose in order of precedence.
11
12
  * Earlier cache adapters are read from first and written to (including invalidations) last.
12
13
  * Typically, caches closer to the application should be ordered before caches closer to the database.
14
+ * A lower layer cache is closer to the database, while a higher layer cache is closer to the application.
13
15
  */
14
16
  constructor(entityConfiguration: EntityConfiguration<TFields>, cacheAdapters: EntityCacheAdapter<TFields>[]);
15
17
  loadManyAsync<N extends keyof TFields>(fieldName: N, fieldValues: readonly NonNullable<TFields[N]>[]): Promise<ReadonlyMap<NonNullable<TFields[N]>, CacheLoadResult<TFields>>>;
@@ -6,14 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const nullthrows_1 = __importDefault(require("nullthrows"));
7
7
  const EntityCacheAdapter_1 = __importDefault(require("./EntityCacheAdapter"));
8
8
  const ReadThroughEntityCache_1 = require("./internal/ReadThroughEntityCache");
9
+ /**
10
+ * A EntityCacheAdapter that composes other EntityCacheAdapter instances.
11
+ */
9
12
  class ComposedEntityCacheAdapter extends EntityCacheAdapter_1.default {
10
13
  /**
11
- * A {@link EntityCacheAdapter} that composes other {@link EntityCacheAdapter} instances.
12
- *
13
14
  * @param entityConfiguration - configuration for entity being loaded
14
15
  * @param cacheAdapters - list of cache adapters to compose in order of precedence.
15
16
  * Earlier cache adapters are read from first and written to (including invalidations) last.
16
17
  * Typically, caches closer to the application should be ordered before caches closer to the database.
18
+ * A lower layer cache is closer to the database, while a higher layer cache is closer to the application.
17
19
  */
18
20
  constructor(entityConfiguration, cacheAdapters) {
19
21
  super(entityConfiguration);
@@ -21,8 +23,10 @@ class ComposedEntityCacheAdapter extends EntityCacheAdapter_1.default {
21
23
  }
22
24
  async loadManyAsync(fieldName, fieldValues) {
23
25
  const retMap = new Map();
26
+ const fulfilledFieldValuesByCacheIndex = Array.from({ length: this.cacheAdapters.length }, () => []);
24
27
  let unfulfilledFieldValues = fieldValues;
25
- for (const cacheAdapter of this.cacheAdapters) {
28
+ for (let i = 0; i < this.cacheAdapters.length; i++) {
29
+ const cacheAdapter = (0, nullthrows_1.default)(this.cacheAdapters[i]);
26
30
  const cacheResultsFromAdapter = await cacheAdapter.loadManyAsync(fieldName, unfulfilledFieldValues);
27
31
  const newUnfulfilledFieldValues = [];
28
32
  for (const [fieldValue, cacheResult] of cacheResultsFromAdapter) {
@@ -31,9 +35,41 @@ class ComposedEntityCacheAdapter extends EntityCacheAdapter_1.default {
31
35
  }
32
36
  else {
33
37
  retMap.set(fieldValue, cacheResult);
38
+ (0, nullthrows_1.default)(fulfilledFieldValuesByCacheIndex[i]).push(fieldValue);
34
39
  }
35
40
  }
36
41
  unfulfilledFieldValues = newUnfulfilledFieldValues;
42
+ if (unfulfilledFieldValues.length === 0) {
43
+ break;
44
+ }
45
+ }
46
+ // Recache values from lower layers that were not found in higher layers
47
+ // Write to lower layers first
48
+ for (let i = this.cacheAdapters.length - 1; i >= 0; i--) {
49
+ const cacheAdapter = (0, nullthrows_1.default)(this.cacheAdapters[i]);
50
+ const hitsToCache = new Map();
51
+ const negativesToCache = [];
52
+ // Loop over all lower layer caches to collect hits and misses
53
+ for (let j = i + 1; j < this.cacheAdapters.length; j++) {
54
+ const fulfilledFieldValues = (0, nullthrows_1.default)(fulfilledFieldValuesByCacheIndex[j]);
55
+ fulfilledFieldValues.forEach((fieldValue) => {
56
+ const cacheResult = (0, nullthrows_1.default)(retMap.get(fieldValue));
57
+ if (cacheResult.status === ReadThroughEntityCache_1.CacheStatus.HIT) {
58
+ hitsToCache.set(fieldValue, cacheResult.item);
59
+ }
60
+ else if (cacheResult.status === ReadThroughEntityCache_1.CacheStatus.NEGATIVE) {
61
+ negativesToCache.push(fieldValue);
62
+ }
63
+ });
64
+ }
65
+ const promises = [];
66
+ if (hitsToCache.size > 0) {
67
+ promises.push(cacheAdapter.cacheManyAsync(fieldName, hitsToCache));
68
+ }
69
+ if (negativesToCache.length > 0) {
70
+ promises.push(cacheAdapter.cacheDBMissesAsync(fieldName, negativesToCache));
71
+ }
72
+ await Promise.all(promises);
37
73
  }
38
74
  for (const fieldValue of unfulfilledFieldValues) {
39
75
  retMap.set(fieldValue, { status: ReadThroughEntityCache_1.CacheStatus.MISS });
@@ -1 +1 @@
1
- {"version":3,"file":"ComposedEntityCacheAdapter.js","sourceRoot":"","sources":["../src/ComposedEntityCacheAdapter.ts"],"names":[],"mappings":";;;;;AAAA,4DAAoC;AAEpC,8EAAsD;AAEtD,8EAAiF;AAEjF,MAAqB,0BAAoC,SAAQ,4BAA2B;IAC1F;;;;;;;OAOG;IACH,YACE,mBAAiD,EAChC,aAA4C;QAE7D,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAFV,kBAAa,GAAb,aAAa,CAA+B;IAG/D,CAAC;IAEM,KAAK,CAAC,aAAa,CACxB,SAAY,EACZ,WAA+C;QAE/C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqD,CAAC;QAE5E,IAAI,sBAAsB,GAAG,WAAW,CAAC;QACzC,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,aAAa,EAAE;YAC7C,MAAM,uBAAuB,GAAG,MAAM,YAAY,CAAC,aAAa,CAC9D,SAAS,EACT,sBAAsB,CACvB,CAAC;YAEF,MAAM,yBAAyB,GAAG,EAAE,CAAC;YACrC,KAAK,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,IAAI,uBAAuB,EAAE;gBAC/D,IAAI,WAAW,CAAC,MAAM,KAAK,oCAAW,CAAC,IAAI,EAAE;oBAC3C,yBAAyB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;iBAC5C;qBAAM;oBACL,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;iBACrC;aACF;YACD,sBAAsB,GAAG,yBAAyB,CAAC;SACpD;QAED,KAAK,MAAM,U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;YACvD,MAAM,YAAY,CAAC,kBAAkB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;SAC/D;IACH,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAC9B,SAAY,EACZ,WAA+C;QAE/C,iCAAiC;QACjC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YACvD,MAAM,YAAY,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;YACvD,MAAM,YAAY,CAAC,mBAAmB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;SAChE;IACH,CAAC;CACF;AArHD,6CAqHC"}
@@ -1,9 +1,10 @@
1
1
  import { ISecondaryEntityCache } from './EntitySecondaryCacheLoader';
2
+ /**
3
+ * A ISecondaryEntityCache that composes other ISecondaryEntityCache instances.
4
+ */
2
5
  export default class ComposedSecondaryEntityCache<TLoadParams, TFields> implements ISecondaryEntityCache<TFields, TLoadParams> {
3
6
  private readonly secondaryEntityCaches;
4
7
  /**
5
- * A {@link ISecondaryEntityCache} that composes other {@link ISecondaryEntityCache} instances.
6
- *
7
8
  * @param secondaryEntityCaches - list of caches to compose in order of precedence.
8
9
  * Earlier caches are read from first and written to (including invalidations) last.
9
10
  * Typically, caches closer to the application should be ordered before caches closer to the database.
@@ -4,10 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const nullthrows_1 = __importDefault(require("nullthrows"));
7
+ /**
8
+ * A ISecondaryEntityCache that composes other ISecondaryEntityCache instances.
9
+ */
7
10
  class ComposedSecondaryEntityCache {
8
11
  /**
9
- * A {@link ISecondaryEntityCache} that composes other {@link ISecondaryEntityCache} instances.
10
- *
11
12
  * @param secondaryEntityCaches - list of caches to compose in order of precedence.
12
13
  * Earlier caches are read from first and written to (including invalidations) last.
13
14
  * Typically, caches closer to the application should be ordered before caches closer to the database.
@@ -1 +1 @@
1
- {"version":3,"file":"ComposedSecondaryEntityCache.js","sourceRoot":"","sources":["../src/ComposedSecondaryEntityCache.ts"],"names":[],"mappings":";;;;;AAAA,4DAAoC;AAIpC,MAAqB,4BAA4B;IAG/C;;;;;;OAMG;IACH,YACmB,qBAAoE;QAApE,0BAAqB,GAArB,qBAAqB,CAA+C;IACpF,CAAC;IAEJ,KAAK,CAAC,oBAAoB,CACxB,eAAiD,EACjD,OAE0E;QAE1E,OAAO,MAAM,4BAA4B,CAAC,+BAA+B,CACvE,IAAI,CAAC,qBAAqB,EAC1B,eAAe,EACf,OAAO,CACR,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAClD,qBAAoE,EACpE,eAAiD,EACjD,OAE0E;QAE1E,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,EAAE;YACtC,OAAO,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;SACvC;QAED,MAAM,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC,GAAG,qBAAqB,CAAC;QAE1D,OAAO,MAAM,IAAA,oBAAU,EAAC,UAAU,CAAC,CAAC,oBAAoB,CACtD,eAAe,EACf,CAAC,sBAAsB,EAAE,EAAE,CACzB,4BAA4B,CAAC,+BAA+B,CAC1D,UAAU,EACV,sBAAsB,EACtB,OAAO,CACR,CACJ,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,eAAiD;QACzE,gCAAgC;QAChC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YAC/D,MAAM,oBAAoB,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;YACvE,MAAM,oBAAoB,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;SACjE;IACH,CAAC;CACF;AA1DD,+CA0DC"}
1
+ {"version":3,"file":"ComposedSecondaryEntityCache.js","sourceRoot":"","sources":["../src/ComposedSecondaryEntityCache.ts"],"names":[],"mappings":";;;;;AAAA,4DAAoC;AAIpC;;GAEG;AACH,MAAqB,4BAA4B;IAG/C;;;;OAIG;IACH,YACmB,qBAAoE;QAApE,0BAAqB,GAArB,qBAAqB,CAA+C;IACpF,CAAC;IAEJ,KAAK,CAAC,oBAAoB,CACxB,eAAiD,EACjD,OAE0E;QAE1E,OAAO,MAAM,4BAA4B,CAAC,+BAA+B,CACvE,IAAI,CAAC,qBAAqB,EAC1B,eAAe,EACf,OAAO,CACR,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAClD,qBAAoE,EACpE,eAAiD,EACjD,OAE0E;QAE1E,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,EAAE;YACtC,OAAO,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;SACvC;QAED,MAAM,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC,GAAG,qBAAqB,CAAC;QAE1D,OAAO,MAAM,IAAA,oBAAU,EAAC,UAAU,CAAC,CAAC,oBAAoB,CACtD,eAAe,EACf,CAAC,sBAAsB,EAAE,EAAE,CACzB,4BAA4B,CAAC,+BAA+B,CAC1D,UAAU,EACV,sBAAsB,EACtB,OAAO,CACR,CACJ,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,eAAiD;QACzE,gCAAgC;QAChC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YAC/D,MAAM,oBAAoB,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;YACvE,MAAM,oBAAoB,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;SACjE;IACH,CAAC;CACF;AAxDD,+CAwDC"}
@@ -1,4 +1,4 @@
1
- import { FieldEqualityCondition, QuerySelectionModifiers } from './EntityDatabaseAdapter';
1
+ import { FieldEqualityCondition, QuerySelectionModifiers, QuerySelectionModifiersWithOrderByRaw } from './EntityDatabaseAdapter';
2
2
  import EntityLoader from './EntityLoader';
3
3
  import EntityPrivacyPolicy from './EntityPrivacyPolicy';
4
4
  import ReadonlyEntity from './ReadonlyEntity';
@@ -12,44 +12,44 @@ export default class EnforcingEntityLoader<TFields, TID extends NonNullable<TFie
12
12
  constructor(entityLoader: EntityLoader<TFields, TID, TViewerContext, TEntity, TPrivacyPolicy, TSelectedFields>);
13
13
  /**
14
14
  * Enforcing version of entity loader method by the same name.
15
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
15
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
16
16
  */
17
17
  loadManyByFieldEqualingManyAsync<N extends keyof Pick<TFields, TSelectedFields>>(fieldName: N, fieldValues: readonly NonNullable<TFields[N]>[]): Promise<ReadonlyMap<NonNullable<TFields[N]>, readonly TEntity[]>>;
18
18
  /**
19
19
  * Enforcing version of entity loader method by the same name.
20
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
20
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
21
21
  */
22
22
  loadManyByFieldEqualingAsync<N extends keyof Pick<TFields, TSelectedFields>>(fieldName: N, fieldValue: NonNullable<TFields[N]>): Promise<readonly TEntity[]>;
23
23
  /**
24
24
  * Enforcing version of entity loader method by the same name.
25
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view the returned entity
25
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view the returned entity
26
26
  * @throws when multiple entities are found matching the condition
27
27
  */
28
28
  loadByFieldEqualingAsync<N extends keyof Pick<TFields, TSelectedFields>>(uniqueFieldName: N, fieldValue: NonNullable<TFields[N]>): Promise<TEntity | null>;
29
29
  /**
30
30
  * Enforcing version of entity loader method by the same name.
31
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view the returned entity
31
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view the returned entity
32
32
  */
33
33
  loadByIDAsync(id: TID): Promise<TEntity>;
34
34
  /**
35
35
  * Enforcing version of entity loader method by the same name.
36
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view the returned entity
36
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view the returned entity
37
37
  * @throws when multiple entities are found matching the condition
38
38
  */
39
39
  loadByIDNullableAsync(id: TID): Promise<TEntity | null>;
40
40
  /**
41
41
  * Enforcing version of entity loader method by the same name.
42
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
42
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
43
43
  */
44
44
  loadManyByIDsAsync(ids: readonly TID[]): Promise<ReadonlyMap<TID, TEntity>>;
45
45
  /**
46
46
  * Enforcing version of entity loader method by the same name.
47
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
47
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
48
48
  */
49
49
  loadManyByFieldEqualityConjunctionAsync<N extends keyof Pick<TFields, TSelectedFields>>(fieldEqualityOperands: FieldEqualityCondition<TFields, N>[], querySelectionModifiers?: QuerySelectionModifiers<TFields>): Promise<readonly TEntity[]>;
50
50
  /**
51
51
  * Enforcing version of entity loader method by the same name.
52
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
52
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
53
53
  */
54
- loadManyByRawWhereClauseAsync(rawWhereClause: string, bindings: any[] | object, querySelectionModifiers?: QuerySelectionModifiers<TFields>): Promise<readonly TEntity[]>;
54
+ loadManyByRawWhereClauseAsync(rawWhereClause: string, bindings: any[] | object, querySelectionModifiers?: QuerySelectionModifiersWithOrderByRaw<TFields>): Promise<readonly TEntity[]>;
55
55
  }
@@ -11,7 +11,7 @@ class EnforcingEntityLoader {
11
11
  }
12
12
  /**
13
13
  * Enforcing version of entity loader method by the same name.
14
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
14
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
15
15
  */
16
16
  async loadManyByFieldEqualingManyAsync(fieldName, fieldValues) {
17
17
  const fieldValuesToResults = await this.entityLoader.loadManyByFieldEqualingManyAsync(fieldName, fieldValues);
@@ -19,7 +19,7 @@ class EnforcingEntityLoader {
19
19
  }
20
20
  /**
21
21
  * Enforcing version of entity loader method by the same name.
22
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
22
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
23
23
  */
24
24
  async loadManyByFieldEqualingAsync(fieldName, fieldValue) {
25
25
  const entityResults = await this.entityLoader.loadManyByFieldEqualingAsync(fieldName, fieldValue);
@@ -27,7 +27,7 @@ class EnforcingEntityLoader {
27
27
  }
28
28
  /**
29
29
  * Enforcing version of entity loader method by the same name.
30
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view the returned entity
30
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view the returned entity
31
31
  * @throws when multiple entities are found matching the condition
32
32
  */
33
33
  async loadByFieldEqualingAsync(uniqueFieldName, fieldValue) {
@@ -36,7 +36,7 @@ class EnforcingEntityLoader {
36
36
  }
37
37
  /**
38
38
  * Enforcing version of entity loader method by the same name.
39
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view the returned entity
39
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view the returned entity
40
40
  */
41
41
  async loadByIDAsync(id) {
42
42
  const entityResult = await this.entityLoader.loadByIDAsync(id);
@@ -44,7 +44,7 @@ class EnforcingEntityLoader {
44
44
  }
45
45
  /**
46
46
  * Enforcing version of entity loader method by the same name.
47
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view the returned entity
47
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view the returned entity
48
48
  * @throws when multiple entities are found matching the condition
49
49
  */
50
50
  async loadByIDNullableAsync(id) {
@@ -53,7 +53,7 @@ class EnforcingEntityLoader {
53
53
  }
54
54
  /**
55
55
  * Enforcing version of entity loader method by the same name.
56
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
56
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
57
57
  */
58
58
  async loadManyByIDsAsync(ids) {
59
59
  const entityResults = await this.entityLoader.loadManyByIDsAsync(ids);
@@ -61,7 +61,7 @@ class EnforcingEntityLoader {
61
61
  }
62
62
  /**
63
63
  * Enforcing version of entity loader method by the same name.
64
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
64
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
65
65
  */
66
66
  async loadManyByFieldEqualityConjunctionAsync(fieldEqualityOperands, querySelectionModifiers = {}) {
67
67
  const entityResults = await this.entityLoader.loadManyByFieldEqualityConjunctionAsync(fieldEqualityOperands, querySelectionModifiers);
@@ -69,7 +69,7 @@ class EnforcingEntityLoader {
69
69
  }
70
70
  /**
71
71
  * Enforcing version of entity loader method by the same name.
72
- * @throws {@link EntityNotAuthorizedError} when viewer is not authorized to view one or more of the returned entities
72
+ * @throws EntityNotAuthorizedError when viewer is not authorized to view one or more of the returned entities
73
73
  */
74
74
  async loadManyByRawWhereClauseAsync(rawWhereClause, bindings, querySelectionModifiers = {}) {
75
75
  const entityResults = await this.entityLoader.loadManyByRawWhereClauseAsync(rawWhereClause, bindings, querySelectionModifiers);
@@ -1 +1 @@
1
- {"version":3,"file":"EnforcingEntityLoader.js","sourceRoot":"","sources":["../src/EnforcingEntityLoader.ts"],"names":[],"mappings":";;AAKA,mDAAkD;AAElD;;;GAGG;AACH,MAAqB,qBAAqB;I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;QACvE,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,kBAAkB,CAAC,GAAmB;QAC1C,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QACtE,OAAO,IAAA,aAAM,EAAC,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,uCAAuC,CAC3C,qBAA2D,EAC3D,0BAA4D,EAAE;QAE9D,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,uCAAuC,CACnF,qBAAqB,EACrB,uBAAuB,CACxB,CAAC;QACF,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,6BAA6B,CACjC,cAAsB,EACtB,QAAwB,EACxB,0BAA0E,EAAE;QAE5E,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,6BAA6B,CACzE,cAAc,EACd,QAAQ,EACR,uBAAuB,CACxB,CAAC;QACF,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AApID,wCAoIC"}
package/build/Entity.d.ts CHANGED
@@ -9,19 +9,19 @@ import ViewerContext from './ViewerContext';
9
9
  * Entity is a privacy-first data model.
10
10
  *
11
11
  * A instance of an entity represents a single "row" of persisted data in a database that a
12
- * viewer, represented by the corresponding {@link ViewerContext}, has permission to read.
12
+ * viewer, represented by the corresponding ViewerContext, has permission to read.
13
13
  *
14
14
  * Create, read, update, and delete permissions for an entity are declaratively defined using an
15
- * {@link EntityPrivacyPolicy}.
15
+ * EntityPrivacyPolicy.
16
16
  *
17
- * Entites are loaded through an {@link EntityLoader}, which is responsible for
17
+ * Entites are loaded through an EntityLoader, which is responsible for
18
18
  * orchestrating fetching, caching, and authorization of reading "rows".
19
19
  *
20
- * Entities are mutated and deleted through an {@link EntityMutator}, which is responsible for
20
+ * Entities are mutated and deleted through an EntityMutator, which is responsible for
21
21
  * orchestrating database writes, cache invalidation, and authorization of writing "rows".
22
22
  *
23
23
  * All concrete entity implementations should extend this class and provide their
24
- * own {@link EntityCompanionDefinition}.
24
+ * own EntityCompanionDefinition.
25
25
  */
26
26
  export default abstract class Entity<TFields, TID extends NonNullable<TFields[TSelectedFields]>, TViewerContext extends ViewerContext, TSelectedFields extends keyof TFields = keyof TFields> extends ReadonlyEntity<TFields, TID, TViewerContext, TSelectedFields> {
27
27
  /**
package/build/Entity.js CHANGED
@@ -9,19 +9,19 @@ const ReadonlyEntity_1 = __importDefault(require("./ReadonlyEntity"));
9
9
  * Entity is a privacy-first data model.
10
10
  *
11
11
  * A instance of an entity represents a single "row" of persisted data in a database that a
12
- * viewer, represented by the corresponding {@link ViewerContext}, has permission to read.
12
+ * viewer, represented by the corresponding ViewerContext, has permission to read.
13
13
  *
14
14
  * Create, read, update, and delete permissions for an entity are declaratively defined using an
15
- * {@link EntityPrivacyPolicy}.
15
+ * EntityPrivacyPolicy.
16
16
  *
17
- * Entites are loaded through an {@link EntityLoader}, which is responsible for
17
+ * Entites are loaded through an EntityLoader, which is responsible for
18
18
  * orchestrating fetching, caching, and authorization of reading "rows".
19
19
  *
20
- * Entities are mutated and deleted through an {@link EntityMutator}, which is responsible for
20
+ * Entities are mutated and deleted through an EntityMutator, which is responsible for
21
21
  * orchestrating database writes, cache invalidation, and authorization of writing "rows".
22
22
  *
23
23
  * All concrete entity implementations should extend this class and provide their
24
- * own {@link EntityCompanionDefinition}.
24
+ * own EntityCompanionDefinition.
25
25
  */
26
26
  class Entity extends ReadonlyEntity_1.default {
27
27
  /**
@@ -37,7 +37,7 @@ class Entity extends ReadonlyEntity_1.default {
37
37
  return viewerContext
38
38
  .getViewerScopedEntityCompanionForClass(this)
39
39
  .getMutatorFactory()
40
- .forCreate(queryContext, { cascadingDeleteCause: null });
40
+ .forCreate(queryContext);
41
41
  }
42
42
  /**
43
43
  * Vend mutator for updating an existing entity in given query context.
@@ -54,7 +54,7 @@ class Entity extends ReadonlyEntity_1.default {
54
54
  .getViewerContext()
55
55
  .getViewerScopedEntityCompanionForClass(this)
56
56
  .getMutatorFactory()
57
- .forUpdate(existingEntity, queryContext, { cascadingDeleteCause: null });
57
+ .forUpdate(existingEntity, queryContext);
58
58
  }
59
59
  /**
60
60
  * Delete an existing entity in given query context.
@@ -70,7 +70,7 @@ class Entity extends ReadonlyEntity_1.default {
70
70
  .getViewerContext()
71
71
  .getViewerScopedEntityCompanionForClass(this)
72
72
  .getMutatorFactory()
73
- .forDelete(existingEntity, queryContext, { cascadingDeleteCause: null })
73
+ .forDelete(existingEntity, queryContext)
74
74
  .deleteAsync();
75
75
  }
76
76
  /**
@@ -87,7 +87,7 @@ class Entity extends ReadonlyEntity_1.default {
87
87
  .getViewerContext()
88
88
  .getViewerScopedEntityCompanionForClass(this)
89
89
  .getMutatorFactory()
90
- .forDelete(existingEntity, queryContext, { cascadingDeleteCause: null })
90
+ .forDelete(existingEntity, queryContext)
91
91
  .enforceDeleteAsync();
92
92
  }
93
93
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.js","sourceRoot":"","sources":["../src/Entity.ts"],"names":[],"mappings":";;;;;AAAA,2CAAoD;AAMpD,sEAA8C;AAG9C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAA8B,MAK5B,SAAQ,wBAA6D;IACrE;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAuBZ,aAA+B,EAC/B,eAAmC,aAAa;SAC7C,sCAAsC,CAAC,IAAI,CAAC;SAC5C,uBAAuB,EAAE;SACzB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gBAAgB,EAAE;aAClB,sCAAsC,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC/E,MAAM,gBAAgB,GAAG,MAAM,IAAA,qBAAW,EACxC,aAAa,CAAC,oBAAoB,CAChC,cAAc,CAAC,gBAAgB,EAAE,EACjC,YAAY,EACZ,EAAE,oBAAoB,EAAE,IAAI,EAAE,EAC9B,cAAc,EACd,SAAS,CAAC,iBAAiB,EAAE,CAC9B,CACF,CAAC;QACF,OAAO,gBAAgB,CAAC,EAAE,CAAC;IAC7B,CAAC;CACF;AA/RD,yBA+RC"}
@@ -4,6 +4,11 @@ import EntityPrivacyPolicy from './EntityPrivacyPolicy';
4
4
  import { EntityQueryContext } from './EntityQueryContext';
5
5
  import ReadonlyEntity from './ReadonlyEntity';
6
6
  import ViewerContext from './ViewerContext';
7
+ /**
8
+ * An association loader is a set of convenience methods for loading entities
9
+ * associated with an entity. In relational databases, these entities are often referenced
10
+ * by foreign keys.
11
+ */
7
12
  export default class EntityAssociationLoader<TFields, TID extends NonNullable<TFields[TSelectedFields]>, TViewerContext extends ViewerContext, TEntity extends ReadonlyEntity<TFields, TID, TViewerContext, TSelectedFields>, TSelectedFields extends keyof TFields> {
8
13
  private readonly entity;
9
14
  constructor(entity: TEntity);
@@ -44,7 +49,7 @@ export default class EntityAssociationLoader<TFields, TID extends NonNullable<TF
44
49
  */
45
50
  loadManyAssociatedEntitiesByFieldEqualingAsync<TAssociatedFields, TAssociatedID extends NonNullable<TAssociatedFields[TAssociatedSelectedFields]>, TAssociatedEntity extends ReadonlyEntity<TAssociatedFields, TAssociatedID, TViewerContext, TAssociatedSelectedFields>, TAssociatedPrivacyPolicy extends EntityPrivacyPolicy<TAssociatedFields, TAssociatedID, TViewerContext, TAssociatedEntity, TAssociatedSelectedFields>, TAssociatedSelectedFields extends keyof TAssociatedFields = keyof TAssociatedFields>(fieldIdentifyingAssociatedEntity: keyof Pick<TFields, TSelectedFields>, associatedEntityClass: IEntityClass<TAssociatedFields, TAssociatedID, TViewerContext, TAssociatedEntity, TAssociatedPrivacyPolicy, TAssociatedSelectedFields>, associatedEntityLookupByField: keyof Pick<TAssociatedFields, TAssociatedSelectedFields>, queryContext?: EntityQueryContext): Promise<readonly Result<TAssociatedEntity>[]>;
46
51
  /**
47
- * Load an associated entity by folding a sequence of {@link EntityLoadThroughDirective}. At each
52
+ * Load an associated entity by folding a sequence of EntityLoadThroughDirective. At each
48
53
  * fold step, load an associated entity identified by a field value of the current fold value.
49
54
  * @param loadDirectives - associated entity load directives instructing each step of the fold
50
55
  * @param queryContext - query context in which to perform the loads
@@ -53,7 +58,7 @@ export default class EntityAssociationLoader<TFields, TID extends NonNullable<TF
53
58
  EntityLoadThroughDirective<TViewerContext, TFields, TFields2, TID2, TEntity2, TPrivacyPolicy2, TSelectedFields, TSelectedFields2>
54
59
  ], queryContext?: EntityQueryContext): Promise<Result<TEntity2> | null>;
55
60
  /**
56
- * Load an associated entity by folding a sequence of {@link EntityLoadThroughDirective}. At each
61
+ * Load an associated entity by folding a sequence of EntityLoadThroughDirective. At each
57
62
  * fold step, load an associated entity identified by a field value of the current fold value.
58
63
  * @param loadDirectives - associated entity load directives instructing each step of the fold
59
64
  * @param queryContext - query context in which to perform the loads
@@ -63,7 +68,7 @@ export default class EntityAssociationLoader<TFields, TID extends NonNullable<TF
63
68
  EntityLoadThroughDirective<TViewerContext, TFields2, TFields3, TID3, TEntity3, TPrivacyPolicy3, TSelectedFields2, TSelectedFields3>
64
69
  ], queryContext?: EntityQueryContext): Promise<Result<TEntity3> | null>;
65
70
  /**
66
- * Load an associated entity by folding a sequence of {@link EntityLoadThroughDirective}. At each
71
+ * Load an associated entity by folding a sequence of EntityLoadThroughDirective. At each
67
72
  * fold step, load an associated entity identified by a field value of the current fold value.
68
73
  * @param loadDirectives - associated entity load directives instructing each step of the fold
69
74
  * @param queryContext - query context in which to perform the loads
@@ -74,7 +79,7 @@ export default class EntityAssociationLoader<TFields, TID extends NonNullable<TF
74
79
  EntityLoadThroughDirective<TViewerContext, TFields3, TFields4, TID4, TEntity4, TPrivacyPolicy4, TSelectedFields3, TSelectedFields4>
75
80
  ], queryContext?: EntityQueryContext): Promise<Result<TEntity4> | null>;
76
81
  /**
77
- * Load an associated entity by folding a sequence of {@link EntityLoadThroughDirective}. At each
82
+ * Load an associated entity by folding a sequence of EntityLoadThroughDirective. At each
78
83
  * fold step, load an associated entity identified by a field value of the current fold value.
79
84
  * @param loadDirectives - associated entity load directives instructing each step of the fold
80
85
  * @param queryContext - query context in which to perform the loads
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const results_1 = require("@expo/results");
4
+ /**
5
+ * An association loader is a set of convenience methods for loading entities
6
+ * associated with an entity. In relational databases, these entities are often referenced
7
+ * by foreign keys.
8
+ */
4
9
  class EntityAssociationLoader {
5
10
  constructor(entity) {
6
11
  this.entity = entity;
@@ -1 +1 @@
1
- {"version":3,"file":"EntityAssociationLoader.js","sourceRoot":"","sources":["../src/EntityAssociationLoader.ts"],"names":[],"mappings":";;AAAA,2CAA+C;AAQ/C,MAAqB,uBAAuB;IAO1C,YAA6B,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;IAAG,CAAC;IAEhD;;;;;;OAMG;IACH,KAAK,CAAC,yBAAyB,CAmB7B,gCAAmD,EACnD,qBAOC,EACD,eAAmC,IAAI,CAAC,MAAM;SAC3C,gBAAgB,EAAE;SAClB,sCAAsC,CAAC,qBAAqB,CAAC;SAC7D,uBAAuB,EAAE;SACzB,eAAe,EAAE;QAIpB,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC;QAClF,IAAI,CAAC,kBAAkB,EAAE;YACvB,OAAO,IAAA,gBAAM,EAAC,IAAI,CAEjB,CAAC;SACH;QAED,MAAM,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gBACjC,sBAAsB,GAAG,MAAM,aAAa;qBACzC,iBAAiB,EAAE;qBACnB,wCAAwC,CACvC,gCAAgC,EAChC,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,CACb,CAAC;aACL;iBAAM;gBACL,MAAM,2BAA2B,GAAG,MAAM,aAAa;qBACpD,iBAAiB,EAAE;qBACnB,yBAAyB,CACxB,gCAAgC,EAChC,qBAAqB,EACrB,YAAY,CACb,CAAC;gBAEJ,IAAI,2BAA2B,CAAC,EAAE,IAAI,2BAA2B,CAAC,KAAK,KAAK,IAAI,EAAE;oBAChF,sBAAsB,GAAG,IAAI,CAAC;iBAC/B;qBAAM;oBACL,sBAAsB,GAAG,2BAA2B,CAAC;iBACtD;aACF;YAED,IAAI,CAAC,sBAAsB,EAAE;gBAC3B,OAAO,IAAI,CAAC;aACb;YAED,IAAI,CAAC,sBAAsB,CAAC,EAAE,EAAE;gBAC9B,OAAO,IAAA,gBAAM,EAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;aAC9C;YACD,aAAa,GAAG,sBAAsB,CAAC,KAAK,CAAC;SAC9C;QACD,OAAO,IAAA,gBAAM,EAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;CACF;AA/cD,0CA+cC"}
@@ -23,7 +23,7 @@ export default abstract class EntityCacheAdapter<TFields> {
23
23
  /**
24
24
  * Negatively cache objects that could not be found in the cache or DB.
25
25
  * @param fieldName - object field being queried
26
- * @param fieldValues - fieldValues for objects reported as {@link CacheStatus.NEGATIVE}
26
+ * @param fieldValues - fieldValues for objects reported as CacheStatus.NEGATIVE
27
27
  * in the cache and not found in the DB.
28
28
  */
29
29
  abstract cacheDBMissesAsync<N extends keyof TFields>(fieldName: N, fieldValues: readonly NonNullable<TFields[N]>[]): Promise<void>;
@@ -28,7 +28,7 @@ export default class EntityCompanion<TFields, TID extends NonNullable<TFields[TS
28
28
  */
29
29
  getQueryContextProvider(): EntityQueryContextProvider;
30
30
  /**
31
- * Get the {@link IEntityMetricsAdapter} for this companion.
31
+ * Get the IEntityMetricsAdapter for this companion.
32
32
  */
33
33
  getMetricsAdapter(): IEntityMetricsAdapter;
34
34
  }
@@ -29,7 +29,7 @@ class EntityCompanion {
29
29
  return this.tableDataCoordinator.getQueryContextProvider();
30
30
  }
31
31
  /**
32
- * Get the {@link IEntityMetricsAdapter} for this companion.
32
+ * Get the IEntityMetricsAdapter for this companion.
33
33
  */
34
34
  getMetricsAdapter() {
35
35
  return this.metricsAdapter;
@@ -53,24 +53,24 @@ export declare class EntityCompanionDefinition<TFields, TID extends NonNullable<
53
53
  */
54
54
  entityClass: IEntityClass<TFields, TID, TViewerContext, TEntity, TPrivacyPolicy, TSelectedFields>;
55
55
  /**
56
- * The {@link EntityConfiguration} for this entity.
56
+ * The EntityConfiguration for this entity.
57
57
  */
58
58
  entityConfiguration: EntityConfiguration<TFields>;
59
59
  /**
60
- * The {@link EntityPrivacyPolicy} class for this entity.
60
+ * The EntityPrivacyPolicy class for this entity.
61
61
  */
62
62
  privacyPolicyClass: IPrivacyPolicyClass<TPrivacyPolicy>;
63
63
  /**
64
- * An optional list of {@link EntityMutationValidator} for this entity.
64
+ * An optional list of EntityMutationValidator for this entity.
65
65
  */
66
66
  mutationValidators?: () => EntityMutationValidator<TFields, TID, TViewerContext, TEntity, TSelectedFields>[];
67
67
  /**
68
- * An optional list of {@link EntityMutationTrigger} for this entity.
68
+ * An optional list of EntityMutationTrigger for this entity.
69
69
  */
70
70
  mutationTriggers?: () => EntityMutationTriggerConfiguration<TFields, TID, TViewerContext, TEntity, TSelectedFields>;
71
71
  /**
72
- * An optional subset of fields defined in the {@link EntityConfiguration} which belong to this entity.
73
- * For use when multiple types of entities are backed by a single table ({@link EntityConfiguration}) yet
72
+ * An optional subset of fields defined in the EntityConfiguration which belong to this entity.
73
+ * For use when multiple types of entities are backed by a single table (EntityConfiguration) yet
74
74
  * only expose a subset of the fields.
75
75
  */
76
76
  entitySelectedFields?: TSelectedFields[];
@@ -79,11 +79,11 @@ export declare class EntityCompanionDefinition<TFields, TID extends NonNullable<
79
79
  /**
80
80
  * An instance of the Entity framework.
81
81
  *
82
- * Required to create a {@link ViewerContext}, which is the application entry point
82
+ * Required to create a ViewerContext, which is the application entry point
83
83
  * into the framework.
84
84
  *
85
85
  * Internally, this is a lazy entity companion factory that instantiates and caches one
86
- * {@link EntityCompanion} for each type of {@link Entity}.
86
+ * EntityCompanion for each type of Entity.
87
87
  */
88
88
  export default class EntityCompanionProvider {
89
89
  readonly metricsAdapter: IEntityMetricsAdapter;
@@ -93,7 +93,7 @@ export default class EntityCompanionProvider {
93
93
  private readonly tableDataCoordinatorMap;
94
94
  /**
95
95
  * Instantiate an Entity framework.
96
- * @param metricsAdapter - An {@link IEntityMetricsAdapter} for collecting metrics on this instance
96
+ * @param metricsAdapter - An IEntityMetricsAdapter for collecting metrics on this instance
97
97
  * @param databaseAdapterFlavors - Database adapter configurations for this instance
98
98
  * @param cacheAdapterFlavors - Cache adapter configurations for this instance
99
99
  */
@@ -26,16 +26,16 @@ exports.EntityCompanionDefinition = EntityCompanionDefinition;
26
26
  /**
27
27
  * An instance of the Entity framework.
28
28
  *
29
- * Required to create a {@link ViewerContext}, which is the application entry point
29
+ * Required to create a ViewerContext, which is the application entry point
30
30
  * into the framework.
31
31
  *
32
32
  * Internally, this is a lazy entity companion factory that instantiates and caches one
33
- * {@link EntityCompanion} for each type of {@link Entity}.
33
+ * EntityCompanion for each type of Entity.
34
34
  */
35
35
  class EntityCompanionProvider {
36
36
  /**
37
37
  * Instantiate an Entity framework.
38
- * @param metricsAdapter - An {@link IEntityMetricsAdapter} for collecting metrics on this instance
38
+ * @param metricsAdapter - An IEntityMetricsAdapter for collecting metrics on this instance
39
39
  * @param databaseAdapterFlavors - Database adapter configurations for this instance
40
40
  * @param cacheAdapterFlavors - Cache adapter configurations for this instance
41
41
  */
@@ -26,11 +26,11 @@ export default class EntityConfiguration<TFields> {
26
26
  */
27
27
  tableName: string;
28
28
  /**
29
- * Map from each entity field to an {@link EntityFieldDefinition} specifying information about the field.
29
+ * Map from each entity field to an EntityFieldDefinition specifying information about the field.
30
30
  */
31
31
  schema: Record<keyof TFields, EntityFieldDefinition<any>>;
32
32
  /**
33
- * List of other entity types that reference this type in {@link EntityFieldDefinition} associations.
33
+ * List of other entity types that reference this type in EntityFieldDefinition associations.
34
34
  */
35
35
  getInboundEdges?: () => IEntityClass<any, any, any, any, any, any>[];
36
36
  /**