@empathyco/x-components 8.15.1 → 9.0.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/CHANGELOG.md +11 -0
- package/browse/index.js +1 -2
- package/core/index.js +0 -1
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-components.browseactions.md +0 -19
- package/docs/API-reference/api/x-components.browsemutations.md +0 -19
- package/docs/API-reference/api/x-components.gethashfromquerypreviewinfo.md +72 -0
- package/docs/API-reference/api/x-components.gethashfromquerypreviewitem.md +56 -0
- package/docs/API-reference/api/x-components.md +22 -121
- package/docs/API-reference/api/x-components.queriespreviewactions.md +0 -19
- package/docs/API-reference/api/x-components.queriespreviewmutations.md +0 -19
- package/docs/API-reference/api/x-components.recommendationsactions.md +0 -38
- package/docs/API-reference/api/x-components.recommendationsmutations.md +0 -19
- package/docs/API-reference/api/x-components.searchactions.md +0 -38
- package/docs/API-reference/api/x-components.searchmutations.md +0 -38
- package/js/index.js +4 -7
- package/js/index.js.map +1 -1
- package/js/x-modules/browse/store/module.js +0 -6
- package/js/x-modules/browse/store/module.js.map +1 -1
- package/js/x-modules/browse/wiring.js +1 -8
- package/js/x-modules/browse/wiring.js.map +1 -1
- package/js/x-modules/queries-preview/store/module.js +0 -9
- package/js/x-modules/queries-preview/store/module.js.map +1 -1
- package/js/x-modules/queries-preview/wiring.js +2 -11
- package/js/x-modules/queries-preview/wiring.js.map +1 -1
- package/js/x-modules/recommendations/store/module.js +0 -7
- package/js/x-modules/recommendations/store/module.js.map +1 -1
- package/js/x-modules/recommendations/wiring.js +0 -9
- package/js/x-modules/recommendations/wiring.js.map +1 -1
- package/js/x-modules/search/store/module.js +2 -17
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search/wiring.js +2 -18
- package/js/x-modules/search/wiring.js.map +1 -1
- package/package.json +2 -2
- package/queries-preview/index.js +2 -1
- package/report/x-components.api.json +143 -1166
- package/report/x-components.api.md +7 -70
- package/search/index.js +1 -3
- package/types/src/services/index.d.ts +0 -1
- package/types/src/services/index.d.ts.map +1 -1
- package/types/src/services/services.types.d.ts +0 -21
- package/types/src/services/services.types.d.ts.map +1 -1
- package/types/src/x-modules/browse/store/actions/index.d.ts +0 -1
- package/types/src/x-modules/browse/store/actions/index.d.ts.map +1 -1
- package/types/src/x-modules/browse/store/module.d.ts.map +1 -1
- package/types/src/x-modules/browse/store/types.d.ts +0 -12
- package/types/src/x-modules/browse/store/types.d.ts.map +1 -1
- package/types/src/x-modules/browse/wiring.d.ts +0 -7
- package/types/src/x-modules/browse/wiring.d.ts.map +1 -1
- package/types/src/x-modules/queries-preview/index.d.ts +1 -0
- package/types/src/x-modules/queries-preview/index.d.ts.map +1 -1
- package/types/src/x-modules/queries-preview/store/module.d.ts.map +1 -1
- package/types/src/x-modules/queries-preview/store/types.d.ts +0 -17
- package/types/src/x-modules/queries-preview/store/types.d.ts.map +1 -1
- package/types/src/x-modules/queries-preview/wiring.d.ts +0 -9
- package/types/src/x-modules/queries-preview/wiring.d.ts.map +1 -1
- package/types/src/x-modules/recommendations/store/module.d.ts.map +1 -1
- package/types/src/x-modules/recommendations/store/types.d.ts +0 -17
- package/types/src/x-modules/recommendations/store/types.d.ts.map +1 -1
- package/types/src/x-modules/recommendations/wiring.d.ts +0 -3
- package/types/src/x-modules/recommendations/wiring.d.ts.map +1 -1
- package/types/src/x-modules/search/store/actions/index.d.ts +0 -2
- package/types/src/x-modules/search/store/actions/index.d.ts.map +1 -1
- package/types/src/x-modules/search/store/module.d.ts.map +1 -1
- package/types/src/x-modules/search/store/types.d.ts +0 -24
- package/types/src/x-modules/search/store/types.d.ts.map +1 -1
- package/types/src/x-modules/search/wiring.d.ts +0 -16
- package/types/src/x-modules/search/wiring.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.browseactions.fetchandsaveresultsenrichment.md +0 -13
- package/docs/API-reference/api/x-components.browsemutations.updateresultsfromenrichment.md +0 -13
- package/docs/API-reference/api/x-components.cancelfetchandsavepartialresultsenrichment.md +0 -17
- package/docs/API-reference/api/x-components.cancelfetchandsaveresultsenrichment.md +0 -17
- package/docs/API-reference/api/x-components.defaultresultsenrichmentservice._constructor_.md +0 -13
- package/docs/API-reference/api/x-components.defaultresultsenrichmentservice.fetchresults.md +0 -52
- package/docs/API-reference/api/x-components.defaultresultsenrichmentservice.instance.md +0 -13
- package/docs/API-reference/api/x-components.defaultresultsenrichmentservice.md +0 -164
- package/docs/API-reference/api/x-components.defaultresultsenrichmentservice.store.md +0 -11
- package/docs/API-reference/api/x-components.defaultresultsenrichmentservice.updateresults.md +0 -66
- package/docs/API-reference/api/x-components.fetchandsavebrowseresultsenrichment.md +0 -66
- package/docs/API-reference/api/x-components.fetchandsavebrowseresultsenrichmentwire.md +0 -13
- package/docs/API-reference/api/x-components.fetchandsavepartialresultsenrichment.md +0 -66
- package/docs/API-reference/api/x-components.fetchandsavepartialresultsenrichmentwire.md +0 -13
- package/docs/API-reference/api/x-components.fetchandsavequerypreviewresultsenrichmentwire.md +0 -13
- package/docs/API-reference/api/x-components.fetchandsaveresultsenrichment.md +0 -66
- package/docs/API-reference/api/x-components.fetchandsaveresultsenrichmentwire.md +0 -13
- package/docs/API-reference/api/x-components.queriespreviewactions.fetchandsavequerypreviewresultsenrichment.md +0 -13
- package/docs/API-reference/api/x-components.queriespreviewmutations.updatequerypreviewresultsfromenrichment.md +0 -16
- package/docs/API-reference/api/x-components.recommendationsactions.cancelfetchandsaverecommendationsenrichment.md +0 -13
- package/docs/API-reference/api/x-components.recommendationsactions.fetchandsaverecommendationsenrichment.md +0 -13
- package/docs/API-reference/api/x-components.recommendationsmutations.updaterecommendationsfromenrichment.md +0 -13
- package/docs/API-reference/api/x-components.resultsenrichmentservice.fetchresults.md +0 -13
- package/docs/API-reference/api/x-components.resultsenrichmentservice.md +0 -77
- package/docs/API-reference/api/x-components.resultsenrichmentservice.updateresults.md +0 -13
- package/docs/API-reference/api/x-components.searchactions.fetchandsavepartialresultsenrichment.md +0 -13
- package/docs/API-reference/api/x-components.searchactions.fetchandsaveresultsenrichment.md +0 -13
- package/docs/API-reference/api/x-components.searchmutations.updatepartialresultsfromenrichment.md +0 -13
- package/docs/API-reference/api/x-components.searchmutations.updateresultsfromenrichment.md +0 -13
- package/js/services/results-enrichment.service.js +0 -37
- package/js/services/results-enrichment.service.js.map +0 -1
- package/js/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.js +0 -21
- package/js/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.js.map +0 -1
- package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview-results-enrichment.action.js +0 -21
- package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview-results-enrichment.action.js.map +0 -1
- package/js/x-modules/recommendations/store/actions/fetch-and-save-recommendations-enrichment.action.js +0 -30
- package/js/x-modules/recommendations/store/actions/fetch-and-save-recommendations-enrichment.action.js.map +0 -1
- package/js/x-modules/search/store/actions/fetch-and-save-partial-results-enrichment.action.js +0 -33
- package/js/x-modules/search/store/actions/fetch-and-save-partial-results-enrichment.action.js.map +0 -1
- package/js/x-modules/search/store/actions/fetch-and-save-results-enrichment.action.js +0 -28
- package/js/x-modules/search/store/actions/fetch-and-save-results-enrichment.action.js.map +0 -1
- package/types/src/services/results-enrichment.service.d.ts +0 -31
- package/types/src/services/results-enrichment.service.d.ts.map +0 -1
- package/types/src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.d.ts +0 -17
- package/types/src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.d.ts.map +0 -1
- package/types/src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview-results-enrichment.action.d.ts +0 -3
- package/types/src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview-results-enrichment.action.d.ts.map +0 -1
- package/types/src/x-modules/recommendations/store/actions/fetch-and-save-recommendations-enrichment.action.d.ts +0 -17
- package/types/src/x-modules/recommendations/store/actions/fetch-and-save-recommendations-enrichment.action.d.ts.map +0 -1
- package/types/src/x-modules/search/store/actions/fetch-and-save-partial-results-enrichment.action.d.ts +0 -17
- package/types/src/x-modules/search/store/actions/fetch-and-save-partial-results-enrichment.action.d.ts.map +0 -1
- package/types/src/x-modules/search/store/actions/fetch-and-save-results-enrichment.action.d.ts +0 -17
- package/types/src/x-modules/search/store/actions/fetch-and-save-results-enrichment.action.d.ts.map +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [fetchAndSaveResultsEnrichment](./x-components.fetchandsaveresultsenrichment.md)
|
|
4
|
-
|
|
5
|
-
## fetchAndSaveResultsEnrichment() function
|
|
6
|
-
|
|
7
|
-
Default implementation for [SearchActions.fetchAndSaveResultsEnrichment](./x-components.searchactions.fetchandsaveresultsenrichment.md) action.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
fetchAndSaveResultsEnrichment: (context: SearchActionContext, request: Result[]) => void | Promise<void>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
context
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
[SearchActionContext](./x-components.searchactioncontext.md)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</td></tr>
|
|
47
|
-
<tr><td>
|
|
48
|
-
|
|
49
|
-
request
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</td><td>
|
|
53
|
-
|
|
54
|
-
Result\[\]
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</td><td>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</td></tr>
|
|
61
|
-
</tbody></table>
|
|
62
|
-
|
|
63
|
-
**Returns:**
|
|
64
|
-
|
|
65
|
-
void \| Promise<void>
|
|
66
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [fetchAndSaveResultsEnrichmentWire](./x-components.fetchandsaveresultsenrichmentwire.md)
|
|
4
|
-
|
|
5
|
-
## fetchAndSaveResultsEnrichmentWire variable
|
|
6
|
-
|
|
7
|
-
Requests and stores the enrichment results for the results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
fetchAndSaveResultsEnrichmentWire: import("../../wiring").Wire<import("@empathyco/x-types").Result[]>
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [QueriesPreviewActions](./x-components.queriespreviewactions.md) > [fetchAndSaveQueryPreviewResultsEnrichment](./x-components.queriespreviewactions.fetchandsavequerypreviewresultsenrichment.md)
|
|
4
|
-
|
|
5
|
-
## QueriesPreviewActions.fetchAndSaveQueryPreviewResultsEnrichment property
|
|
6
|
-
|
|
7
|
-
Requests and stores the enrichment results for the query preview results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
fetchAndSaveQueryPreviewResultsEnrichment: (queryPreviewItem: QueryPreviewItem) => void;
|
|
13
|
-
```
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [QueriesPreviewMutations](./x-components.queriespreviewmutations.md) > [updateQueryPreviewResultsFromEnrichment](./x-components.queriespreviewmutations.updatequerypreviewresultsfromenrichment.md)
|
|
4
|
-
|
|
5
|
-
## QueriesPreviewMutations.updateQueryPreviewResultsFromEnrichment property
|
|
6
|
-
|
|
7
|
-
Updates the query preview results with the enrichment results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
updateQueryPreviewResultsFromEnrichment: (enrichmentPayload: {
|
|
13
|
-
queryPreviewItem: QueryPreviewItem;
|
|
14
|
-
enrichmentResults: any[];
|
|
15
|
-
}) => void;
|
|
16
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [RecommendationsActions](./x-components.recommendationsactions.md) > [cancelFetchAndSaveRecommendationsEnrichment](./x-components.recommendationsactions.cancelfetchandsaverecommendationsenrichment.md)
|
|
4
|
-
|
|
5
|
-
## RecommendationsActions.cancelFetchAndSaveRecommendationsEnrichment property
|
|
6
|
-
|
|
7
|
-
Cancels / interrupt [RecommendationsActions.fetchAndSaveRecommendationsEnrichment](./x-components.recommendationsactions.fetchandsaverecommendationsenrichment.md) synchronous promise.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
cancelFetchAndSaveRecommendationsEnrichment: () => void;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [RecommendationsActions](./x-components.recommendationsactions.md) > [fetchAndSaveRecommendationsEnrichment](./x-components.recommendationsactions.fetchandsaverecommendationsenrichment.md)
|
|
4
|
-
|
|
5
|
-
## RecommendationsActions.fetchAndSaveRecommendationsEnrichment property
|
|
6
|
-
|
|
7
|
-
Requests and saves the enrichment results for the recommendations.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
fetchAndSaveRecommendationsEnrichment: (results: Result[]) => void;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [RecommendationsMutations](./x-components.recommendationsmutations.md) > [updateRecommendationsFromEnrichment](./x-components.recommendationsmutations.updaterecommendationsfromenrichment.md)
|
|
4
|
-
|
|
5
|
-
## RecommendationsMutations.updateRecommendationsFromEnrichment property
|
|
6
|
-
|
|
7
|
-
Updates the recommendations with the enrichment results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
updateRecommendationsFromEnrichment: (enrichmentResults: any[]) => void;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ResultsEnrichmentService](./x-components.resultsenrichmentservice.md) > [fetchResults](./x-components.resultsenrichmentservice.fetchresults.md)
|
|
4
|
-
|
|
5
|
-
## ResultsEnrichmentService.fetchResults property
|
|
6
|
-
|
|
7
|
-
Fetches the enrichment results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
fetchResults: (results: Result[]) => Promise<any[]>;
|
|
13
|
-
```
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ResultsEnrichmentService](./x-components.resultsenrichmentservice.md)
|
|
4
|
-
|
|
5
|
-
## ResultsEnrichmentService interface
|
|
6
|
-
|
|
7
|
-
Service to handle the enrichment of the results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export interface ResultsEnrichmentService
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Properties
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Property
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Modifiers
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th><th>
|
|
33
|
-
|
|
34
|
-
Description
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</th></tr></thead>
|
|
38
|
-
<tbody><tr><td>
|
|
39
|
-
|
|
40
|
-
[fetchResults](./x-components.resultsenrichmentservice.fetchresults.md)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</td><td>
|
|
47
|
-
|
|
48
|
-
(results: Result\[\]) => Promise<any\[\]>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
</td><td>
|
|
52
|
-
|
|
53
|
-
Fetches the enrichment results.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</td></tr>
|
|
57
|
-
<tr><td>
|
|
58
|
-
|
|
59
|
-
[updateResults](./x-components.resultsenrichmentservice.updateresults.md)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</td><td>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</td><td>
|
|
66
|
-
|
|
67
|
-
(results: Result\[\], enrichmentResults: any\[\]) => void
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</td><td>
|
|
71
|
-
|
|
72
|
-
Updates the results with the enrichment results. Updates via mutation.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</td></tr>
|
|
76
|
-
</tbody></table>
|
|
77
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ResultsEnrichmentService](./x-components.resultsenrichmentservice.md) > [updateResults](./x-components.resultsenrichmentservice.updateresults.md)
|
|
4
|
-
|
|
5
|
-
## ResultsEnrichmentService.updateResults property
|
|
6
|
-
|
|
7
|
-
Updates the results with the enrichment results. Updates via mutation.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
updateResults: (results: Result[], enrichmentResults: any[]) => void;
|
|
13
|
-
```
|
package/docs/API-reference/api/x-components.searchactions.fetchandsavepartialresultsenrichment.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchActions](./x-components.searchactions.md) > [fetchAndSavePartialResultsEnrichment](./x-components.searchactions.fetchandsavepartialresultsenrichment.md)
|
|
4
|
-
|
|
5
|
-
## SearchActions.fetchAndSavePartialResultsEnrichment property
|
|
6
|
-
|
|
7
|
-
Requests and stores the enrichment results for the partial results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
fetchAndSavePartialResultsEnrichment: (partialResults: PartialResult[]) => void;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchActions](./x-components.searchactions.md) > [fetchAndSaveResultsEnrichment](./x-components.searchactions.fetchandsaveresultsenrichment.md)
|
|
4
|
-
|
|
5
|
-
## SearchActions.fetchAndSaveResultsEnrichment property
|
|
6
|
-
|
|
7
|
-
Requests and stores the enrichment results for the results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
fetchAndSaveResultsEnrichment: (results: Result[]) => void;
|
|
13
|
-
```
|
package/docs/API-reference/api/x-components.searchmutations.updatepartialresultsfromenrichment.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchMutations](./x-components.searchmutations.md) > [updatePartialResultsFromEnrichment](./x-components.searchmutations.updatepartialresultsfromenrichment.md)
|
|
4
|
-
|
|
5
|
-
## SearchMutations.updatePartialResultsFromEnrichment property
|
|
6
|
-
|
|
7
|
-
Updates the partial results with the enrichment results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
updatePartialResultsFromEnrichment: (enrichmentResults: any[]) => void;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchMutations](./x-components.searchmutations.md) > [updateResultsFromEnrichment](./x-components.searchmutations.updateresultsfromenrichment.md)
|
|
4
|
-
|
|
5
|
-
## SearchMutations.updateResultsFromEnrichment property
|
|
6
|
-
|
|
7
|
-
Updates the results with the enrichment results.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
updateResultsFromEnrichment: (enrichmentResults: any[]) => void;
|
|
13
|
-
```
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import '../plugins/x-bus.js';
|
|
2
|
-
import '@empathyco/x-utils';
|
|
3
|
-
import { XPlugin } from '../plugins/x-plugin.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Default implementation for the {@link ResultsEnrichmentService}.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
class DefaultResultsEnrichmentService {
|
|
11
|
-
constructor() { }
|
|
12
|
-
get store() {
|
|
13
|
-
return XPlugin.store;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Fetches the enrichment results.
|
|
17
|
-
*
|
|
18
|
-
* @param results - The results to fetch the enrichment results for.
|
|
19
|
-
*/
|
|
20
|
-
async fetchResults(_) {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Updates the results with the enrichment results. Updates via mutation.
|
|
25
|
-
*
|
|
26
|
-
* @param results - The results to update.
|
|
27
|
-
* @param enrichmentResults - The enrichment results to update the results with.
|
|
28
|
-
*/
|
|
29
|
-
updateResults(_, __) { }
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Global instance of the {@link ResultsEnrichmentService}.
|
|
33
|
-
*/
|
|
34
|
-
DefaultResultsEnrichmentService.instance = new DefaultResultsEnrichmentService();
|
|
35
|
-
|
|
36
|
-
export { DefaultResultsEnrichmentService };
|
|
37
|
-
//# sourceMappingURL=results-enrichment.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"results-enrichment.service.js","sources":["../../../src/services/results-enrichment.service.ts"],"sourcesContent":["import type { Result } from '@empathyco/x-types'\nimport type { Store } from 'vuex'\nimport type { RootXStoreState } from '../store/index'\nimport type { ResultsEnrichmentService } from './services.types'\nimport { XPlugin } from '../plugins/index'\n\n/**\n * Default implementation for the {@link ResultsEnrichmentService}.\n *\n * @public\n */\nexport class DefaultResultsEnrichmentService implements ResultsEnrichmentService {\n /**\n * Global instance of the {@link ResultsEnrichmentService}.\n */\n public static instance: ResultsEnrichmentService = new DefaultResultsEnrichmentService()\n\n public constructor() {}\n\n protected get store(): Store<RootXStoreState> {\n return XPlugin.store\n }\n\n /**\n * Fetches the enrichment results.\n *\n * @param results - The results to fetch the enrichment results for.\n */\n async fetchResults(_: Result[]): Promise<any[]> {\n return []\n }\n\n /**\n * Updates the results with the enrichment results. Updates via mutation.\n *\n * @param results - The results to update.\n * @param enrichmentResults - The enrichment results to update the results with.\n */\n updateResults(_: Result[], __: any[]): void {}\n}\n"],"names":[],"mappings":";;;;AAMA;;;;AAIG;MACU,+BAA+B,CAAA;AAM1C,IAAA,WAAA,GAAA,EAAsB;AAEtB,IAAA,IAAc,KAAK,GAAA;QACjB,OAAO,OAAO,CAAC,KAAK;IACtB;AAEA;;;;AAIG;IACH,MAAM,YAAY,CAAC,CAAW,EAAA;AAC5B,QAAA,OAAO,EAAE;IACX;AAEA;;;;;AAKG;AACH,IAAA,aAAa,CAAC,CAAW,EAAE,EAAS,IAAS;;AA1B7C;;AAEG;AACW,+BAAA,CAAA,QAAQ,GAA6B,IAAI,+BAA+B,EAAE;;;;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service.js';
|
|
2
|
-
import { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils.js';
|
|
3
|
-
|
|
4
|
-
const { fetchAndSave, cancelPrevious } = createFetchAndSaveActions({
|
|
5
|
-
async fetch(_, results) {
|
|
6
|
-
return results.length > 0 ? DefaultResultsEnrichmentService.instance.fetchResults(results) : [];
|
|
7
|
-
},
|
|
8
|
-
onSuccess({ commit }, enrichmentResults) {
|
|
9
|
-
commit('updateResultsFromEnrichment', enrichmentResults);
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* Default implementation for {@link BrowseActions.fetchAndSaveResultsEnrichment}
|
|
14
|
-
* action.
|
|
15
|
-
*
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
const fetchAndSaveResultsEnrichment = fetchAndSave;
|
|
19
|
-
|
|
20
|
-
export { fetchAndSaveResultsEnrichment };
|
|
21
|
-
//# sourceMappingURL=fetch-and-save-results-enrichment.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-results-enrichment.action.js","sources":["../../../../../../src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.ts"],"sourcesContent":["import type { Result } from '@empathyco/x-types'\n\nimport type { BrowseActionContext } from '../types'\nimport { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service'\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils'\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n BrowseActionContext,\n Result[],\n any[]\n>({\n async fetch(_, results) {\n return results.length > 0 ? DefaultResultsEnrichmentService.instance.fetchResults(results) : []\n },\n onSuccess({ commit }, enrichmentResults) {\n commit('updateResultsFromEnrichment', enrichmentResults)\n },\n})\n\n/**\n * Default implementation for {@link BrowseActions.fetchAndSaveResultsEnrichment}\n * action.\n *\n * @public\n */\nexport const fetchAndSaveResultsEnrichment = fetchAndSave\n\n/**\n * Default implementation for {@link BrowseActions.cancelFetchAndSaveResultsEnrichment}\n * action.\n *\n * @public\n */\nexport const cancelFetchAndSaveResultsEnrichment = cancelPrevious\n"],"names":[],"mappings":";;;AAMA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;AACA,IAAA,MAAM,KAAK,CAAC,CAAC,EAAE,OAAO,EAAA;QACpB,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,+BAA+B,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE;IACjG,CAAC;AACD,IAAA,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAA;AACrC,QAAA,MAAM,CAAC,6BAA6B,EAAE,iBAAiB,CAAC;IAC1D,CAAC;AACF,CAAA,CAAC;AAEF;;;;;AAKG;AACI,MAAM,6BAA6B,GAAG;;;;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service.js';
|
|
2
|
-
|
|
3
|
-
const fetchAndSaveQueryPreviewResultsEnrichment = async ({ commit }, queryPreviewItem) => {
|
|
4
|
-
if (!queryPreviewItem || !queryPreviewItem.results) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
DefaultResultsEnrichmentService.instance
|
|
8
|
-
.fetchResults(queryPreviewItem.results)
|
|
9
|
-
.then(enrichmentResults => {
|
|
10
|
-
commit('updateQueryPreviewResultsFromEnrichment', {
|
|
11
|
-
queryPreviewItem,
|
|
12
|
-
enrichmentResults,
|
|
13
|
-
});
|
|
14
|
-
})
|
|
15
|
-
.catch(error => {
|
|
16
|
-
console.error(error);
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export { fetchAndSaveQueryPreviewResultsEnrichment };
|
|
21
|
-
//# sourceMappingURL=fetch-and-save-query-preview-results-enrichment.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-query-preview-results-enrichment.action.js","sources":["../../../../../../src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview-results-enrichment.action.ts"],"sourcesContent":["import type { QueriesPreviewXStoreModule } from '../types'\nimport { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service'\n\nexport const fetchAndSaveQueryPreviewResultsEnrichment: QueriesPreviewXStoreModule['actions']['fetchAndSaveQueryPreviewResultsEnrichment'] =\n async ({ commit }, queryPreviewItem) => {\n if (!queryPreviewItem || !queryPreviewItem.results) {\n return\n }\n\n DefaultResultsEnrichmentService.instance\n .fetchResults(queryPreviewItem.results)\n .then(enrichmentResults => {\n commit('updateQueryPreviewResultsFromEnrichment', {\n queryPreviewItem,\n enrichmentResults,\n })\n })\n .catch(error => {\n console.error(error)\n })\n }\n"],"names":[],"mappings":";;AAGO,MAAM,yCAAyC,GACpD,OAAO,EAAE,MAAM,EAAE,EAAE,gBAAgB,KAAI;IACrC,IAAI,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE;QAClD;IACF;AAEA,IAAA,+BAA+B,CAAC;AAC7B,SAAA,YAAY,CAAC,gBAAgB,CAAC,OAAO;SACrC,IAAI,CAAC,iBAAiB,IAAG;QACxB,MAAM,CAAC,yCAAyC,EAAE;YAChD,gBAAgB;YAChB,iBAAiB;AAClB,SAAA,CAAC;AACJ,IAAA,CAAC;SACA,KAAK,CAAC,KAAK,IAAG;AACb,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACtB,IAAA,CAAC,CAAC;AACN;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service.js';
|
|
2
|
-
import { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils.js';
|
|
3
|
-
|
|
4
|
-
const { fetchAndSave, cancelPrevious } = createFetchAndSaveActions({
|
|
5
|
-
async fetch(_, recommendations) {
|
|
6
|
-
return recommendations.length > 0
|
|
7
|
-
? DefaultResultsEnrichmentService.instance.fetchResults(recommendations)
|
|
8
|
-
: [];
|
|
9
|
-
},
|
|
10
|
-
onSuccess({ commit }, enrichmentResults) {
|
|
11
|
-
commit('updateRecommendationsFromEnrichment', enrichmentResults);
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
/**
|
|
15
|
-
* Default implementation for {@link RecommendationsActions.fetchAndSaveRecommendationsEnrichment}
|
|
16
|
-
* action.
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
const fetchAndSaveRecommendationsEnrichment = fetchAndSave;
|
|
21
|
-
/**
|
|
22
|
-
* Default implementation for {@link RecommendationsActions.cancelFetchAndSaveRecommendationsEnrichment}
|
|
23
|
-
* action.
|
|
24
|
-
*
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
const cancelFetchAndSaveRecommendationsEnrichment = cancelPrevious;
|
|
28
|
-
|
|
29
|
-
export { cancelFetchAndSaveRecommendationsEnrichment, fetchAndSaveRecommendationsEnrichment };
|
|
30
|
-
//# sourceMappingURL=fetch-and-save-recommendations-enrichment.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-recommendations-enrichment.action.js","sources":["../../../../../../src/x-modules/recommendations/store/actions/fetch-and-save-recommendations-enrichment.action.ts"],"sourcesContent":["import type { Result } from '@empathyco/x-types'\n\nimport type { RecommendationsActionContext } from '../types'\nimport { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service'\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils'\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n RecommendationsActionContext,\n Result[],\n any[]\n>({\n async fetch(_, recommendations) {\n return recommendations.length > 0\n ? DefaultResultsEnrichmentService.instance.fetchResults(recommendations)\n : []\n },\n onSuccess({ commit }, enrichmentResults) {\n commit('updateRecommendationsFromEnrichment', enrichmentResults)\n },\n})\n\n/**\n * Default implementation for {@link RecommendationsActions.fetchAndSaveRecommendationsEnrichment}\n * action.\n *\n * @public\n */\nexport const fetchAndSaveRecommendationsEnrichment = fetchAndSave\n\n/**\n * Default implementation for {@link RecommendationsActions.cancelFetchAndSaveRecommendationsEnrichment}\n * action.\n *\n * @public\n */\nexport const cancelFetchAndSaveRecommendationsEnrichment = cancelPrevious\n"],"names":[],"mappings":";;;AAMA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;AACA,IAAA,MAAM,KAAK,CAAC,CAAC,EAAE,eAAe,EAAA;AAC5B,QAAA,OAAO,eAAe,CAAC,MAAM,GAAG;cAC5B,+BAA+B,CAAC,QAAQ,CAAC,YAAY,CAAC,eAAe;cACrE,EAAE;IACR,CAAC;AACD,IAAA,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAA;AACrC,QAAA,MAAM,CAAC,qCAAqC,EAAE,iBAAiB,CAAC;IAClE,CAAC;AACF,CAAA,CAAC;AAEF;;;;;AAKG;AACI,MAAM,qCAAqC,GAAG;AAErD;;;;;AAKG;AACI,MAAM,2CAA2C,GAAG;;;;"}
|
package/js/x-modules/search/store/actions/fetch-and-save-partial-results-enrichment.action.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service.js';
|
|
2
|
-
import { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils.js';
|
|
3
|
-
|
|
4
|
-
const { fetchAndSave, cancelPrevious } = createFetchAndSaveActions({
|
|
5
|
-
async fetch(_, partialResults) {
|
|
6
|
-
const results = partialResults.flatMap(partialResult => partialResult.results ?? []);
|
|
7
|
-
const resultSet = new Set();
|
|
8
|
-
const uniqueResults = results.filter(result => resultSet.has(result.id) ? false : resultSet.add(result.id));
|
|
9
|
-
return uniqueResults.length > 0
|
|
10
|
-
? DefaultResultsEnrichmentService.instance.fetchResults(uniqueResults)
|
|
11
|
-
: [];
|
|
12
|
-
},
|
|
13
|
-
onSuccess({ commit }, enrichmentResults) {
|
|
14
|
-
commit('updatePartialResultsFromEnrichment', enrichmentResults);
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* Default implementation for {@link SearchActions.fetchAndSavePartialResultsEnrichment}
|
|
19
|
-
* action.
|
|
20
|
-
*
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
const fetchAndSavePartialResultsEnrichment = fetchAndSave;
|
|
24
|
-
/**
|
|
25
|
-
* Default implementation for {@link SearchActions.cancelFetchAndSavePartialResultsEnrichment}
|
|
26
|
-
* action.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
const cancelFetchAndSavePartialResultsEnrichment = cancelPrevious;
|
|
31
|
-
|
|
32
|
-
export { cancelFetchAndSavePartialResultsEnrichment, fetchAndSavePartialResultsEnrichment };
|
|
33
|
-
//# sourceMappingURL=fetch-and-save-partial-results-enrichment.action.js.map
|
package/js/x-modules/search/store/actions/fetch-and-save-partial-results-enrichment.action.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-partial-results-enrichment.action.js","sources":["../../../../../../src/x-modules/search/store/actions/fetch-and-save-partial-results-enrichment.action.ts"],"sourcesContent":["import type { PartialResult } from '@empathyco/x-types'\n\nimport type { SearchActionContext } from '../types'\nimport { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service'\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils'\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n SearchActionContext,\n PartialResult[],\n any[]\n>({\n async fetch(_, partialResults) {\n const results = partialResults.flatMap(partialResult => partialResult.results ?? [])\n const resultSet = new Set()\n const uniqueResults = results.filter(result =>\n resultSet.has(result.id) ? false : resultSet.add(result.id),\n )\n return uniqueResults.length > 0\n ? DefaultResultsEnrichmentService.instance.fetchResults(uniqueResults)\n : []\n },\n onSuccess({ commit }, enrichmentResults) {\n commit('updatePartialResultsFromEnrichment', enrichmentResults)\n },\n})\n\n/**\n * Default implementation for {@link SearchActions.fetchAndSavePartialResultsEnrichment}\n * action.\n *\n * @public\n */\nexport const fetchAndSavePartialResultsEnrichment = fetchAndSave\n\n/**\n * Default implementation for {@link SearchActions.cancelFetchAndSavePartialResultsEnrichment}\n * action.\n *\n * @public\n */\nexport const cancelFetchAndSavePartialResultsEnrichment = cancelPrevious\n"],"names":[],"mappings":";;;AAMA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;AACA,IAAA,MAAM,KAAK,CAAC,CAAC,EAAE,cAAc,EAAA;AAC3B,QAAA,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,aAAa,IAAI,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;AACpF,QAAA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAA,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,IACzC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAC5D;AACD,QAAA,OAAO,aAAa,CAAC,MAAM,GAAG;cAC1B,+BAA+B,CAAC,QAAQ,CAAC,YAAY,CAAC,aAAa;cACnE,EAAE;IACR,CAAC;AACD,IAAA,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAA;AACrC,QAAA,MAAM,CAAC,oCAAoC,EAAE,iBAAiB,CAAC;IACjE,CAAC;AACF,CAAA,CAAC;AAEF;;;;;AAKG;AACI,MAAM,oCAAoC,GAAG;AAEpD;;;;;AAKG;AACI,MAAM,0CAA0C,GAAG;;;;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service.js';
|
|
2
|
-
import { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils.js';
|
|
3
|
-
|
|
4
|
-
const { fetchAndSave, cancelPrevious } = createFetchAndSaveActions({
|
|
5
|
-
async fetch(_, results) {
|
|
6
|
-
return results.length > 0 ? DefaultResultsEnrichmentService.instance.fetchResults(results) : [];
|
|
7
|
-
},
|
|
8
|
-
onSuccess({ commit }, enrichmentResults) {
|
|
9
|
-
commit('updateResultsFromEnrichment', enrichmentResults);
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* Default implementation for {@link SearchActions.fetchAndSaveResultsEnrichment}
|
|
14
|
-
* action.
|
|
15
|
-
*
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
const fetchAndSaveResultsEnrichment = fetchAndSave;
|
|
19
|
-
/**
|
|
20
|
-
* Default implementation for {@link SearchActions.cancelFetchAndSaveResultsEnrichment}
|
|
21
|
-
* action.
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
const cancelFetchAndSaveResultsEnrichment = cancelPrevious;
|
|
26
|
-
|
|
27
|
-
export { cancelFetchAndSaveResultsEnrichment, fetchAndSaveResultsEnrichment };
|
|
28
|
-
//# sourceMappingURL=fetch-and-save-results-enrichment.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-results-enrichment.action.js","sources":["../../../../../../src/x-modules/search/store/actions/fetch-and-save-results-enrichment.action.ts"],"sourcesContent":["import type { Result } from '@empathyco/x-types'\n\nimport type { SearchActionContext } from '../types'\nimport { DefaultResultsEnrichmentService } from '../../../../services/results-enrichment.service'\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils'\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n SearchActionContext,\n Result[],\n any[]\n>({\n async fetch(_, results) {\n return results.length > 0 ? DefaultResultsEnrichmentService.instance.fetchResults(results) : []\n },\n onSuccess({ commit }, enrichmentResults) {\n commit('updateResultsFromEnrichment', enrichmentResults)\n },\n})\n\n/**\n * Default implementation for {@link SearchActions.fetchAndSaveResultsEnrichment}\n * action.\n *\n * @public\n */\nexport const fetchAndSaveResultsEnrichment = fetchAndSave\n\n/**\n * Default implementation for {@link SearchActions.cancelFetchAndSaveResultsEnrichment}\n * action.\n *\n * @public\n */\nexport const cancelFetchAndSaveResultsEnrichment = cancelPrevious\n"],"names":[],"mappings":";;;AAMA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;AACA,IAAA,MAAM,KAAK,CAAC,CAAC,EAAE,OAAO,EAAA;QACpB,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,+BAA+B,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE;IACjG,CAAC;AACD,IAAA,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAA;AACrC,QAAA,MAAM,CAAC,6BAA6B,EAAE,iBAAiB,CAAC;IAC1D,CAAC;AACF,CAAA,CAAC;AAEF;;;;;AAKG;AACI,MAAM,6BAA6B,GAAG;AAE7C;;;;;AAKG;AACI,MAAM,mCAAmC,GAAG;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Result } from '@empathyco/x-types';
|
|
2
|
-
import type { Store } from 'vuex';
|
|
3
|
-
import type { RootXStoreState } from '../store/index';
|
|
4
|
-
import type { ResultsEnrichmentService } from './services.types';
|
|
5
|
-
/**
|
|
6
|
-
* Default implementation for the {@link ResultsEnrichmentService}.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export declare class DefaultResultsEnrichmentService implements ResultsEnrichmentService {
|
|
11
|
-
/**
|
|
12
|
-
* Global instance of the {@link ResultsEnrichmentService}.
|
|
13
|
-
*/
|
|
14
|
-
static instance: ResultsEnrichmentService;
|
|
15
|
-
constructor();
|
|
16
|
-
protected get store(): Store<RootXStoreState>;
|
|
17
|
-
/**
|
|
18
|
-
* Fetches the enrichment results.
|
|
19
|
-
*
|
|
20
|
-
* @param results - The results to fetch the enrichment results for.
|
|
21
|
-
*/
|
|
22
|
-
fetchResults(_: Result[]): Promise<any[]>;
|
|
23
|
-
/**
|
|
24
|
-
* Updates the results with the enrichment results. Updates via mutation.
|
|
25
|
-
*
|
|
26
|
-
* @param results - The results to update.
|
|
27
|
-
* @param enrichmentResults - The enrichment results to update the results with.
|
|
28
|
-
*/
|
|
29
|
-
updateResults(_: Result[], __: any[]): void;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=results-enrichment.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"results-enrichment.service.d.ts","sourceRoot":"","sources":["../../../../src/services/results-enrichment.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAGhE;;;;GAIG;AACH,qBAAa,+BAAgC,YAAW,wBAAwB;IAC9E;;OAEG;IACH,OAAc,QAAQ,EAAE,wBAAwB,CAAwC;;IAIxF,SAAS,KAAK,KAAK,IAAI,KAAK,CAAC,eAAe,CAAC,CAE5C;IAED;;;;OAIG;IACG,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAI/C;;;;;OAKG;IACH,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;CAC5C"}
|
package/types/src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Result } from '@empathyco/x-types';
|
|
2
|
-
import type { BrowseActionContext } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Default implementation for {@link BrowseActions.fetchAndSaveResultsEnrichment}
|
|
5
|
-
* action.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export declare const fetchAndSaveResultsEnrichment: (context: BrowseActionContext, request: Result[]) => void | Promise<void>;
|
|
10
|
-
/**
|
|
11
|
-
* Default implementation for {@link BrowseActions.cancelFetchAndSaveResultsEnrichment}
|
|
12
|
-
* action.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export declare const cancelFetchAndSaveResultsEnrichment: () => void;
|
|
17
|
-
//# sourceMappingURL=fetch-and-save-results-enrichment.action.d.ts.map
|
package/types/src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-results-enrichment.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAiBnD;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,2EAAe,CAAA;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,YAAiB,CAAA"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { QueriesPreviewXStoreModule } from '../types';
|
|
2
|
-
export declare const fetchAndSaveQueryPreviewResultsEnrichment: QueriesPreviewXStoreModule['actions']['fetchAndSaveQueryPreviewResultsEnrichment'];
|
|
3
|
-
//# sourceMappingURL=fetch-and-save-query-preview-results-enrichment.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-query-preview-results-enrichment.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview-results-enrichment.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAG1D,eAAO,MAAM,yCAAyC,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,2CAA2C,CAiBtI,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Result } from '@empathyco/x-types';
|
|
2
|
-
import type { RecommendationsActionContext } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Default implementation for {@link RecommendationsActions.fetchAndSaveRecommendationsEnrichment}
|
|
5
|
-
* action.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export declare const fetchAndSaveRecommendationsEnrichment: (context: RecommendationsActionContext, request: Result[]) => void | Promise<void>;
|
|
10
|
-
/**
|
|
11
|
-
* Default implementation for {@link RecommendationsActions.cancelFetchAndSaveRecommendationsEnrichment}
|
|
12
|
-
* action.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export declare const cancelFetchAndSaveRecommendationsEnrichment: () => void;
|
|
17
|
-
//# sourceMappingURL=fetch-and-save-recommendations-enrichment.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-recommendations-enrichment.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/recommendations/store/actions/fetch-and-save-recommendations-enrichment.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAmB5D;;;;;GAKG;AACH,eAAO,MAAM,qCAAqC,oFAAe,CAAA;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,2CAA2C,YAAiB,CAAA"}
|