Add more breaking changes.

Update API reports.

Signed-off-by: Jussi Hallila <jussi@hallila.com>
This commit is contained in:
Jussi Hallila
2022-01-13 16:34:22 +01:00
parent 28fd9bc603
commit cd8bf7a4ab
9 changed files with 79 additions and 30 deletions
+12 -1
View File
@@ -6,7 +6,7 @@
BREAKING CHANGES:
- The helper function to create a fact retriever registration is now expecting an object of configuration items instead of individual arguments.
Modify your techInsights.ts plugin configuration in `packages/backend/src/plugins/techInsights.ts` (or equivalent) the following way:
Modify your `techInsights.ts` plugin configuration in `packages/backend/src/plugins/techInsights.ts` (or equivalent) the following way:
```diff
-createFactRetrieverRegistration(
@@ -20,6 +20,17 @@ BREAKING CHANGES:
```
- `TechInsightsStore` interface has changed its signature of `insertFacts` method. If you have created your own implementation of either `TechInsightsDatabase` or `FactRetrieverEngine` you need to modify the implementation/call to this method to accept/pass-in an object instead if individual arguments. The interface now accepts an additional `lifecycle` argument which is optional (defined below). An example modification to fact retriever engine:
```diff
-await this.repository.insertFacts(factRetriever.id, facts);
+await this.repository.insertFacts({
+ id: factRetriever.id,
+ facts,
+ lifecycle,
+});
```
Adds a configuration option to fact retrievers to define lifecycle for facts the retriever persists. Possible values are either 'max items' or 'time-to-live'. The former will keep only n number of items in the database for each fact per entity. The latter will remove all facts that are older than the TTL value.
Possible values: