@empathyco/x-components 6.0.0-alpha.165 → 6.0.0-alpha.166

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 (28) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/ai/index.js +7 -0
  3. package/core/index.js.map +1 -1
  4. package/docs/API-reference/api/x-components.aiquery.md +13 -0
  5. package/docs/API-reference/api/x-components.aisuggestionsrequest.md +13 -0
  6. package/docs/API-reference/api/x-components.aisuggestionssearchrequest.md +13 -0
  7. package/docs/API-reference/api/x-components.fetchandsaveaisuggestions.md +13 -0
  8. package/docs/API-reference/api/x-components.fetchandsaveaisuggestionssearch.md +13 -0
  9. package/docs/API-reference/api/x-components.md +7 -0
  10. package/docs/API-reference/api/x-components.saveaiorigin.md +13 -0
  11. package/docs/API-reference/api/x-components.setaiurlparams.md +13 -0
  12. package/js/index.js +7 -0
  13. package/js/index.js.map +1 -1
  14. package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.js +9 -0
  15. package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.js.map +1 -1
  16. package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js +0 -1
  17. package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js.map +1 -1
  18. package/package.json +2 -2
  19. package/report/x-components.api.json +196 -0
  20. package/report/x-components.api.md +21 -0
  21. package/types/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.d.ts +9 -0
  22. package/types/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.d.ts.map +1 -1
  23. package/types/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.d.ts +0 -1
  24. package/types/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.d.ts.map +1 -1
  25. package/types/x-modules/ai/store/actions/index.d.ts +5 -0
  26. package/types/x-modules/ai/store/actions/index.d.ts.map +1 -0
  27. package/types/x-modules/ai/store/index.d.ts +2 -0
  28. package/types/x-modules/ai/store/index.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.0.0-alpha.166 (2025-10-24)
7
+
8
+ * fix(ai): export missing store things (#1907) ([ac5f37a](https://github.com/empathyco/x/commit/ac5f37a)), closes [#1907](https://github.com/empathyco/x/issues/1907)
9
+
10
+
11
+
12
+
13
+
6
14
  ## 6.0.0-alpha.165 (2025-10-22)
7
15
 
8
16
  * fix(url-handler): disable attribute inheritance to avoid error with GlobalEvents ([dfa0979](https://github.com/empathyco/x/commit/dfa0979))
package/ai/index.js CHANGED
@@ -1,5 +1,12 @@
1
1
  export { default as AiOverview } from '../js/x-modules/ai/components/ai-overview.vue.js';
2
+ export { fetchAndSaveAiSuggestionsSearch } from '../js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.js';
3
+ export { fetchAndSaveAiSuggestions } from '../js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js';
4
+ export { saveOrigin as saveAiOrigin } from '../js/x-modules/ai/store/actions/save-origin.action.js';
5
+ export { setUrlParams as setAiUrlParams } from '../js/x-modules/ai/store/actions/set-url-params.action.js';
2
6
  export { aiEmitters } from '../js/x-modules/ai/store/emitters.js';
7
+ export { query as aiQuery } from '../js/x-modules/ai/store/getters/ai-query.getter.js';
8
+ export { suggestionsRequest as aiSuggestionsRequest } from '../js/x-modules/ai/store/getters/suggestions-request.getter.js';
9
+ export { suggestionsSearchRequest as aiSuggestionsSearchRequest } from '../js/x-modules/ai/store/getters/suggestions-search-request.getter.js';
3
10
  export { aiXStoreModule } from '../js/x-modules/ai/store/module.js';
4
11
  export { aiWiring } from '../js/x-modules/ai/wiring.js';
5
12
  export { aiXModule } from '../js/x-modules/ai/x-module.js';
package/core/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [aiQuery](./x-components.aiquery.md)
4
+
5
+ ## aiQuery variable
6
+
7
+ Default implementation for the related prompts query getter.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ query: AiXStoreModule['getters']['query']
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [aiSuggestionsRequest](./x-components.aisuggestionsrequest.md)
4
+
5
+ ## aiSuggestionsRequest variable
6
+
7
+ Default implementation for the [AiGetters.suggestionsRequest](./x-components.aigetters.suggestionsrequest.md) getter.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ suggestionsRequest: AiXStoreModule['getters']['suggestionsRequest']
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [aiSuggestionsSearchRequest](./x-components.aisuggestionssearchrequest.md)
4
+
5
+ ## aiSuggestionsSearchRequest variable
6
+
7
+ Default implementation for the [AiGetters.suggestionsSearchRequest](./x-components.aigetters.suggestionssearchrequest.md) getter.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ suggestionsSearchRequest: AiXStoreModule['getters']['suggestionsSearchRequest']
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [fetchAndSaveAiSuggestions](./x-components.fetchandsaveaisuggestions.md)
4
+
5
+ ## fetchAndSaveAiSuggestions variable
6
+
7
+ Default implementation for the [AiActions.fetchAndSaveAiSuggestions](./x-components.aiactions.fetchandsaveaisuggestions.md)<!-- -->.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions']
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [fetchAndSaveAiSuggestionsSearch](./x-components.fetchandsaveaisuggestionssearch.md)
4
+
5
+ ## fetchAndSaveAiSuggestionsSearch variable
6
+
7
+ Default implementation for the [AiActions.fetchAndSaveAiSuggestionsSearch](./x-components.aiactions.fetchandsaveaisuggestionssearch.md)<!-- -->.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ fetchAndSaveAiSuggestionsSearch: AiXStoreModule['actions']['fetchAndSaveAiSuggestionsSearch']
13
+ ```
@@ -340,6 +340,9 @@ X-Components is a library usable everywhere not only for search experiences.
340
340
  | [addQueryToHistoryQueries](./x-components.addquerytohistoryqueries.md) | Saves a new query into the history queries. |
341
341
  | [addQueryToHistoryQueriesFromPreview](./x-components.addquerytohistoryqueriesfrompreview.md) | Saves the selectedQueryPreview query into the history queries. |
342
342
  | [AiOverview](./x-components.aioverview.md) | |
343
+ | [aiQuery](./x-components.aiquery.md) | Default implementation for the related prompts query getter. |
344
+ | [aiSuggestionsRequest](./x-components.aisuggestionsrequest.md) | Default implementation for the [AiGetters.suggestionsRequest](./x-components.aigetters.suggestionsrequest.md) getter. |
345
+ | [aiSuggestionsSearchRequest](./x-components.aisuggestionssearchrequest.md) | Default implementation for the [AiGetters.suggestionsSearchRequest](./x-components.aigetters.suggestionssearchrequest.md) getter. |
343
346
  | [aiXModule](./x-components.aixmodule.md) | AI [XModule](./x-components.xmodule.md) implementation. This module is auto-registered as soon as you import any component from the <code>AI</code> entry point. |
344
347
  | [AllFilter](./x-components.allfilter.md) | This component receives a required <code>facet</code> with [BooleanFilter](./x-types.booleanfilter.md) as prop and renders a button, which on clicked emits the [FacetsXEvents.UserClickedAllFilter](./x-components.facetsxevents.userclickedallfilter.md) event. By default the rendered button displays a message with the facet label but this content is customizable through the default slot. |
345
348
  | [AnimateWidth](./x-components.animatewidth.md) | Renders a transition wrapping an element passed in the default slot and animating its width. |
@@ -426,6 +429,8 @@ X-Components is a library usable everywhere not only for search experiences.
426
429
  | [Fade](./x-components.fade.md) | Renders a transition wrapping the element passed in the default slot. The animation just fades in/out the element by changing its opacity. |
427
430
  | [FadeAndSlide](./x-components.fadeandslide.md) | Renders a transition group wrapping the elements passed in the default slot and animating them with a fade and slide animation. |
428
431
  | [FallbackDisclaimer](./x-components.fallbackdisclaimer.md) | The <code>FallbackDisclaimer</code> component shows a message if the filters have been removed from the current search because there were no results. |
432
+ | [fetchAndSaveAiSuggestions](./x-components.fetchandsaveaisuggestions.md) | Default implementation for the [AiActions.fetchAndSaveAiSuggestions](./x-components.aiactions.fetchandsaveaisuggestions.md)<!-- -->. |
433
+ | [fetchAndSaveAiSuggestionsSearch](./x-components.fetchandsaveaisuggestionssearch.md) | Default implementation for the [AiActions.fetchAndSaveAiSuggestionsSearch](./x-components.aiactions.fetchandsaveaisuggestionssearch.md)<!-- -->. |
429
434
  | [fetchAndSaveExperienceControlsWire](./x-components.fetchandsaveexperiencecontrolswire.md) | Requests and stores a new set of controls results. |
430
435
  | [fetchAndSaveIdentifierResultsWire](./x-components.fetchandsaveidentifierresultswire.md) | Requests and stores a new set of identifier results for the query. |
431
436
  | [fetchAndSaveNextQueriesWire](./x-components.fetchandsavenextquerieswire.md) | Requests and stores the next queries. |
@@ -544,6 +549,7 @@ X-Components is a library usable everywhere not only for search experiences.
544
549
  | [ResultsList](./x-components.resultslist.md) | <p>It renders a [ItemsList](./x-components.itemslist.md) list with the results from [SearchState.results](./x-components.searchstate.results.md) by default.</p><p>The component provides a default slot which wraps the whole component with the <code>results</code> bound.</p><p>It also provides the slot result to customize the item, which is within the default slot, with the result bound.</p> |
545
550
  | [ResultVariantSelector](./x-components.resultvariantselector.md) | Component to show and select the available variants of a product for a given nest level. TODO: Log warning on mount when result is not injected. |
546
551
  | [ResultVariantsProvider](./x-components.resultvariantsprovider.md) | <p>Component that exposes the result merged with its selected variant in the default slot.</p><p>It receives the original result and keeps track of the selected variant.</p><p>It provides the original result, the array containing the selected variants and a callback to set the selected variant to be used from a child.</p> |
552
+ | [saveAiOrigin](./x-components.saveaiorigin.md) | Default implementation for the [AiActions.saveOrigin](./x-components.aiactions.saveorigin.md)<!-- -->. |
547
553
  | [saveIdentifierResultsOrigin](./x-components.saveidentifierresultsorigin.md) | Default implementation for the [IdentifierResultsActions.saveOrigin](./x-components.identifierresultsactions.saveorigin.md)<!-- -->. |
548
554
  | [saveIdentifierResultsOriginWire](./x-components.saveidentifierresultsoriginwire.md) | Sets the identifier results state <code>origin</code>. |
549
555
  | [saveOriginWire](./x-components.saveoriginwire.md) | Sets the search state <code>origin</code>. |
@@ -568,6 +574,7 @@ X-Components is a library usable everywhere not only for search experiences.
568
574
  | [semanticQueriesXModule](./x-components.semanticqueriesxmodule.md) | SemanticQueries [XModule](./x-components.xmodule.md) implementation. This module is auto-registered as soon as you import any component from the <code>semantic-queries</code>entry point. |
569
575
  | [SemanticQuery](./x-components.semanticquery.md) | This component renders a semantic query. A semantic query is a recommended query that is similar in its meaning to another one. It contains the query and the distance, which indicates how similar the query is compared to the searched query. |
570
576
  | [sessionHistoryQueries](./x-components.sessionhistoryqueries.md) | Default implementation for the [HistoryQueriesGetters.sessionHistoryQueries](./x-components.historyqueriesgetters.sessionhistoryqueries.md) getter. |
577
+ | [setAiUrlParams](./x-components.setaiurlparams.md) | Default implementation setUrlParams. |
571
578
  | [setConsent](./x-components.setconsent.md) | Sets the tagging state <code>consent</code>. |
572
579
  | [setExtraParams](./x-components.setextraparams.md) | Sets the extra params of the [ExtraParamsXModule](./x-components.extraparamsxmodule.md)<!-- -->. |
573
580
  | [setFiltersFromHistoryQueries](./x-components.setfiltersfromhistoryqueries.md) | Sets the filters of the facets module from a selectedHistoryQuery's filters. |
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [saveAiOrigin](./x-components.saveaiorigin.md)
4
+
5
+ ## saveAiOrigin variable
6
+
7
+ Default implementation for the [AiActions.saveOrigin](./x-components.aiactions.saveorigin.md)<!-- -->.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ saveOrigin: AiXStoreModule['actions']['saveOrigin']
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [setAiUrlParams](./x-components.setaiurlparams.md)
4
+
5
+ ## setAiUrlParams variable
6
+
7
+ Default implementation setUrlParams.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ setUrlParams: AiXStoreModule['actions']['setUrlParams']
13
+ ```
package/js/index.js CHANGED
@@ -200,7 +200,14 @@ export { BaseXPriorityQueue, BaseXPriorityQueueNode } from './x-bus/x-priority-q
200
200
  export { BaseXAPI } from './x-installer/api/base-api.js';
201
201
  export { XInstaller } from './x-installer/x-installer/x-installer.js';
202
202
  export { default as AiOverview } from './x-modules/ai/components/ai-overview.vue.js';
203
+ export { fetchAndSaveAiSuggestionsSearch } from './x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.js';
204
+ export { fetchAndSaveAiSuggestions } from './x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js';
205
+ export { saveOrigin as saveAiOrigin } from './x-modules/ai/store/actions/save-origin.action.js';
206
+ export { setUrlParams as setAiUrlParams } from './x-modules/ai/store/actions/set-url-params.action.js';
203
207
  export { aiEmitters } from './x-modules/ai/store/emitters.js';
208
+ export { query as aiQuery } from './x-modules/ai/store/getters/ai-query.getter.js';
209
+ export { suggestionsRequest as aiSuggestionsRequest } from './x-modules/ai/store/getters/suggestions-request.getter.js';
210
+ export { suggestionsSearchRequest as aiSuggestionsSearchRequest } from './x-modules/ai/store/getters/suggestions-search-request.getter.js';
204
211
  export { aiXStoreModule } from './x-modules/ai/store/module.js';
205
212
  export { aiWiring } from './x-modules/ai/wiring.js';
206
213
  export { aiXModule } from './x-modules/ai/x-module.js';
package/js/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -7,6 +7,15 @@ import '../../../../plugins/devtools/colors.utils.js';
7
7
  import '../../../../plugins/x-bus.js';
8
8
  import { XPlugin } from '../../../../plugins/x-plugin.js';
9
9
 
10
+ /**
11
+ * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestionsSearch}.
12
+ *
13
+ * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the commits,
14
+ * provided by Vuex.
15
+ * @param request - The AI search request to make.
16
+ * @returns The AI search response.
17
+ * @public
18
+ */
10
19
  const fetchAndSaveAiSuggestionsSearch = async ({ commit }, request) => {
11
20
  if (!request) {
12
21
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\nimport { XPlugin } from '../../../../plugins'\n\nexport const fetchAndSaveAiSuggestionsSearch: AiXStoreModule['actions']['fetchAndSaveAiSuggestionsSearch'] =\n async ({ commit }, request) => {\n if (!request) {\n return\n }\n commit('setSuggestionsSearchLoading', true)\n return XPlugin.adapter\n .aiSuggestionsSearch(request)\n .then(response => {\n if (response) {\n commit('setSuggestionsSearch', response.suggestions)\n }\n })\n .catch(error => {\n console.error(error)\n })\n .finally(() => {\n commit('setSuggestionsSearchLoading', false)\n })\n }\n"],"names":[],"mappings":";;;;;;;;;AAGO,MAAM,+BAA+B,GAC1C,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,KAAI;IAC5B,IAAI,CAAC,OAAO,EAAE;QACZ,OAAM;KACP;AACD,IAAA,MAAM,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAAA;IAC3C,OAAO,OAAO,CAAC,OAAO;SACnB,mBAAmB,CAAC,OAAO,CAAC;SAC5B,IAAI,CAAC,QAAQ,IAAG;QACf,IAAI,QAAQ,EAAE;AACZ,YAAA,MAAM,CAAC,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAA;SACrD;AACH,KAAC,CAAC;SACD,KAAK,CAAC,KAAK,IAAG;AACb,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AACtB,KAAC,CAAC;SACD,OAAO,CAAC,MAAK;AACZ,QAAA,MAAM,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAA;AAC9C,KAAC,CAAC,CAAA;AACN;;;;"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\nimport { XPlugin } from '../../../../plugins'\n\n/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestionsSearch}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the commits,\n * provided by Vuex.\n * @param request - The AI search request to make.\n * @returns The AI search response.\n * @public\n */\nexport const fetchAndSaveAiSuggestionsSearch: AiXStoreModule['actions']['fetchAndSaveAiSuggestionsSearch'] =\n async ({ commit }, request) => {\n if (!request) {\n return\n }\n commit('setSuggestionsSearchLoading', true)\n return XPlugin.adapter\n .aiSuggestionsSearch(request)\n .then(response => {\n if (response) {\n commit('setSuggestionsSearch', response.suggestions)\n }\n })\n .catch(error => {\n console.error(error)\n })\n .finally(() => {\n commit('setSuggestionsSearchLoading', false)\n })\n }\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;;AAQG;AACI,MAAM,+BAA+B,GAC1C,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,KAAI;IAC5B,IAAI,CAAC,OAAO,EAAE;QACZ,OAAM;KACP;AACD,IAAA,MAAM,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAAA;IAC3C,OAAO,OAAO,CAAC,OAAO;SACnB,mBAAmB,CAAC,OAAO,CAAC;SAC5B,IAAI,CAAC,QAAQ,IAAG;QACf,IAAI,QAAQ,EAAE;AACZ,YAAA,MAAM,CAAC,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAA;SACrD;AACH,KAAC,CAAC;SACD,KAAK,CAAC,KAAK,IAAG;AACb,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AACtB,KAAC,CAAC;SACD,OAAO,CAAC,MAAK;AACZ,QAAA,MAAM,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAA;AAC9C,KAAC,CAAC,CAAA;AACN;;;;"}
@@ -15,7 +15,6 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
15
15
  * provided by Vuex.
16
16
  * @param request - The AI request to make.
17
17
  * @returns The AI response.
18
- *
19
18
  * @public
20
19
  */
21
20
  const fetchAndSaveAiSuggestions = async ({ commit }, request) => {
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionTagging } from '@empathyco/x-types'\nimport type { AiActionContext, AiXStoreModule } from '../types'\nimport { getTaggingInfoFromUrl } from '@empathyco/x-adapter-platform'\nimport { XPlugin } from '../../../../plugins'\n\ninterface TaggingData {\n tagging: {\n toolingDisplay: string\n toolingDisplayClick: string\n searchQueries: Record<\n string,\n {\n toolingDisplay: string\n toolingDisplayClick: string\n toolingDisplayAdd2Cart: string\n }\n >\n }[]\n}\n\ntype AnswerData =\n | { responseText: string }\n | { suggestionText: string }\n | { queries: AiSuggestionQuery[] }\n | TaggingData\n\n/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestions}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The AI request to make.\n * @returns The AI response.\n *\n * @public\n */\nexport const fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions'] =\n async ({ commit }, request) => {\n if (!request) {\n return\n }\n commit('setSuggestionsLoading', true)\n return XPlugin.adapter.aiSuggestions(request).then(({ body, status }) => {\n if (status !== 200) {\n return\n }\n if (body) {\n const reader = body.getReader()\n readAnswer(reader, commit)\n }\n })\n }\n\nfunction mapTaggingData(tangingData: TaggingData): AiSuggestionTagging {\n const { toolingDisplay, toolingDisplayClick, searchQueries } = tangingData.tagging[0]\n // TODO: Using the getTaggingInfoFromUrl util here is a temporary solution.\n // It creates a dependency with the x-adapter-platform project that should be avoided.\n return {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n searchQueries: Object.fromEntries(\n Object.entries(searchQueries).map(\n ([query, { toolingDisplay, toolingDisplayClick, toolingDisplayAdd2Cart }]) => [\n query,\n {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n toolingDisplayAdd2Cart: getTaggingInfoFromUrl(toolingDisplayAdd2Cart),\n },\n ],\n ),\n ),\n }\n}\n\nfunction readAnswer(\n reader: ReadableStreamDefaultReader<Uint8Array>,\n commit: AiActionContext['commit'],\n): void {\n reader\n .read()\n .then(({ value, done }) => {\n if (done) {\n commit('setSuggestionsLoading', false)\n return\n }\n\n const result = new TextDecoder().decode(value, { stream: true })\n const parts = result.split('\\n\\n')\n for (const part of parts) {\n const lines = part.split('\\n')\n\n for (const line of lines) {\n // line.length check to avoid event lines or empty lines\n if (line.length <= 5 || line.startsWith('event:')) continue\n\n const raw = line.startsWith('data:') ? line.slice(5).trim() : line.trim()\n const data = JSON.parse(raw) as AnswerData\n\n if ('suggestionText' in data) {\n commit('setIsNoResults', false)\n commit('setSuggestionText', data.suggestionText)\n }\n if ('responseText' in data) {\n commit('setResponseText', data.responseText)\n }\n if ('queries' in data) {\n commit('setQueries', data.queries)\n }\n if ('tagging' in data) {\n commit('setTagging', mapTaggingData(data))\n }\n }\n }\n readAnswer(reader, commit)\n })\n .catch((error: { code: number }) => {\n commit('setSugg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AAI,cAAc,IAAI,IAAI,EAAE;AAC1B,oBAAA,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;iBAC7C;AACD,gBAAA,IAAI,SAAS,IAAI,IAAI,EAAE;AACrB,oBAAA,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;iBACnC;AACD,gBAAA,IAAI,SAAS,IAAI,IAAI,EAAE;oBACrB,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;iBAC3C;aACF;SACF;AACD,QAAA,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC5B,KAAC,CAAC;AACD,SAAA,KAAK,CAAC,CAAC,KAAuB,KAAI;AACjC,QAAA,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAA;;AAEtC,QAAA,IAAI,KAAK,CAAC,IAAI,KAAK,EAAE,EAAE;AACrB,YAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;SACrB;AACH,KAAC,CAAC,CAAA;AACN;;;;"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionTagging } from '@empathyco/x-types'\nimport type { AiActionContext, AiXStoreModule } from '../types'\nimport { getTaggingInfoFromUrl } from '@empathyco/x-adapter-platform'\nimport { XPlugin } from '../../../../plugins'\n\ninterface TaggingData {\n tagging: {\n toolingDisplay: string\n toolingDisplayClick: string\n searchQueries: Record<\n string,\n {\n toolingDisplay: string\n toolingDisplayClick: string\n toolingDisplayAdd2Cart: string\n }\n >\n }[]\n}\n\ntype AnswerData =\n | { responseText: string }\n | { suggestionText: string }\n | { queries: AiSuggestionQuery[] }\n | TaggingData\n\n/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestions}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The AI request to make.\n * @returns The AI response.\n * @public\n */\nexport const fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions'] =\n async ({ commit }, request) => {\n if (!request) {\n return\n }\n commit('setSuggestionsLoading', true)\n return XPlugin.adapter.aiSuggestions(request).then(({ body, status }) => {\n if (status !== 200) {\n return\n }\n if (body) {\n const reader = body.getReader()\n readAnswer(reader, commit)\n }\n })\n }\n\nfunction mapTaggingData(tangingData: TaggingData): AiSuggestionTagging {\n const { toolingDisplay, toolingDisplayClick, searchQueries } = tangingData.tagging[0]\n // TODO: Using the getTaggingInfoFromUrl util here is a temporary solution.\n // It creates a dependency with the x-adapter-platform project that should be avoided.\n return {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n searchQueries: Object.fromEntries(\n Object.entries(searchQueries).map(\n ([query, { toolingDisplay, toolingDisplayClick, toolingDisplayAdd2Cart }]) => [\n query,\n {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n toolingDisplayAdd2Cart: getTaggingInfoFromUrl(toolingDisplayAdd2Cart),\n },\n ],\n ),\n ),\n }\n}\n\nfunction readAnswer(\n reader: ReadableStreamDefaultReader<Uint8Array>,\n commit: AiActionContext['commit'],\n): void {\n reader\n .read()\n .then(({ value, done }) => {\n if (done) {\n commit('setSuggestionsLoading', false)\n return\n }\n\n const result = new TextDecoder().decode(value, { stream: true })\n const parts = result.split('\\n\\n')\n for (const part of parts) {\n const lines = part.split('\\n')\n\n for (const line of lines) {\n // line.length check to avoid event lines or empty lines\n if (line.length <= 5 || line.startsWith('event:')) continue\n\n const raw = line.startsWith('data:') ? line.slice(5).trim() : line.trim()\n const data = JSON.parse(raw) as AnswerData\n\n if ('suggestionText' in data) {\n commit('setIsNoResults', false)\n commit('setSuggestionText', data.suggestionText)\n }\n if ('responseText' in data) {\n commit('setResponseText', data.responseText)\n }\n if ('queries' in data) {\n commit('setQueries', data.queries)\n }\n if ('tagging' in data) {\n commit('setTagging', mapTaggingData(data))\n }\n }\n }\n readAnswer(reader, commit)\n })\n .catch((error: { code: number }) => {\n commit('setSuggestionsLoading', false)\n // AbortError code === 20\n if (error.code !== 20) {\n console.error(error)\n }\n })\n}\n"],"names":[],"mappings":";;;;;;;;;;AA0BA;;;;;;;;AAQG;AACI,MAAM,yBAAyB,GACpC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,KAAI;IAC5B,IAAI,CAAC,OAAO,EAAE;QACZ,OAAM;KACP;AACD,IAAA,MAAM,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAA;AACrC,IAAA,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAI;AACtE,QAAA,IAAI,MAAM,KAAK,GAAG,EAAE;YAClB,OAAM;SACP;QACD,IAAI,IAAI,EAAE;AACR,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AAC/B,YAAA,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAC3B;AACH,KAAC,CAAC,CAAA;AACJ,EAAC;AAEH,SAAS,cAAc,CAAC,WAAwB,EAAA;AAC9C,IAAA,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,aAAa,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;;;IAGrF,OAAO;AACL,QAAA,cAAc,EAAE,qBAAqB,CAAC,cAAc,CAAC;AACrD,QAAA,mBAAmB,EAAE,qBAAqB,CAAC,mBAAmB,CAAC;AAC/D,QAAA,aAAa,EAAE,MAAM,CAAC,WAAW,CAC/B,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,GAAG,CAC/B,CAAC,CAAC,KAAK,EAAE,EA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,IAAI,gBAAgB,IAAI,IAAI,EAAE;AAC5B,oBAAA,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAA;AAC/B,oBAAA,MAAM,CAAC,mBAAmB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;iBACjD;AACD,gBAAA,IAAI,cAAc,IAAI,IAAI,EAAE;AAC1B,oBAAA,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;iBAC7C;AACD,gBAAA,IAAI,SAAS,IAAI,IAAI,EAAE;AACrB,oBAAA,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;iBACnC;AACD,gBAAA,IAAI,SAAS,IAAI,IAAI,EAAE;oBACrB,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;iBAC3C;aACF;SACF;AACD,QAAA,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC5B,KAAC,CAAC;AACD,SAAA,KAAK,CAAC,CAAC,KAAuB,KAAI;AACjC,QAAA,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAA;;AAEtC,QAAA,IAAI,KAAK,CAAC,IAAI,KAAK,EAAE,EAAE;AACrB,YAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;SACrB;AACH,KAAC,CAAC,CAAA;AACN;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "6.0.0-alpha.165",
3
+ "version": "6.0.0-alpha.166",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -142,5 +142,5 @@
142
142
  "access": "public",
143
143
  "directory": "dist"
144
144
  },
145
- "gitHead": "5fed479d6d01d3ec77730964b1784a05efce9839"
145
+ "gitHead": "c6c61dd1376954c65223388333d6e2cff559eddb"
146
146
  }
@@ -1954,6 +1954,34 @@
1954
1954
  "endIndex": 76
1955
1955
  }
1956
1956
  },
1957
+ {
1958
+ "kind": "Variable",
1959
+ "canonicalReference": "@empathyco/x-components!aiQuery:var",
1960
+ "docComment": "/**\n * Default implementation for the related prompts query getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the related prompts' module.\n *\n * @returns The query with the selected related tags concatenated.\n *\n * @public\n */\n",
1961
+ "excerptTokens": [
1962
+ {
1963
+ "kind": "Content",
1964
+ "text": "query: "
1965
+ },
1966
+ {
1967
+ "kind": "Reference",
1968
+ "text": "AiXStoreModule",
1969
+ "canonicalReference": "@empathyco/x-components!AiXStoreModule:type"
1970
+ },
1971
+ {
1972
+ "kind": "Content",
1973
+ "text": "['getters']['query']"
1974
+ }
1975
+ ],
1976
+ "fileUrlPath": "src/x-modules/ai/store/getters/ai-query.getter.ts",
1977
+ "isReadonly": true,
1978
+ "releaseTag": "Public",
1979
+ "name": "aiQuery",
1980
+ "variableTypeTokenRange": {
1981
+ "startIndex": 1,
1982
+ "endIndex": 3
1983
+ }
1984
+ },
1957
1985
  {
1958
1986
  "kind": "Interface",
1959
1987
  "canonicalReference": "@empathyco/x-components!AiState:interface",
@@ -2382,6 +2410,62 @@
2382
2410
  }
2383
2411
  ]
2384
2412
  },
2413
+ {
2414
+ "kind": "Variable",
2415
+ "canonicalReference": "@empathyco/x-components!aiSuggestionsRequest:var",
2416
+ "docComment": "/**\n * Default implementation for the {@link AiGetters.suggestionsRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the ai module.\n *\n * @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the ai module.\n *\n * @returns The ai request to fetch data from the API.\n *\n * @public\n */\n",
2417
+ "excerptTokens": [
2418
+ {
2419
+ "kind": "Content",
2420
+ "text": "suggestionsRequest: "
2421
+ },
2422
+ {
2423
+ "kind": "Reference",
2424
+ "text": "AiXStoreModule",
2425
+ "canonicalReference": "@empathyco/x-components!AiXStoreModule:type"
2426
+ },
2427
+ {
2428
+ "kind": "Content",
2429
+ "text": "['getters']['suggestionsRequest']"
2430
+ }
2431
+ ],
2432
+ "fileUrlPath": "src/x-modules/ai/store/getters/suggestions-request.getter.ts",
2433
+ "isReadonly": true,
2434
+ "releaseTag": "Public",
2435
+ "name": "aiSuggestionsRequest",
2436
+ "variableTypeTokenRange": {
2437
+ "startIndex": 1,
2438
+ "endIndex": 3
2439
+ }
2440
+ },
2441
+ {
2442
+ "kind": "Variable",
2443
+ "canonicalReference": "@empathyco/x-components!aiSuggestionsSearchRequest:var",
2444
+ "docComment": "/**\n * Default implementation for the {@link AiGetters.suggestionsSearchRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the ai module.\n *\n * @returns The ai request to fetch data from the API.\n *\n * @public\n */\n",
2445
+ "excerptTokens": [
2446
+ {
2447
+ "kind": "Content",
2448
+ "text": "suggestionsSearchRequest: "
2449
+ },
2450
+ {
2451
+ "kind": "Reference",
2452
+ "text": "AiXStoreModule",
2453
+ "canonicalReference": "@empathyco/x-components!AiXStoreModule:type"
2454
+ },
2455
+ {
2456
+ "kind": "Content",
2457
+ "text": "['getters']['suggestionsSearchRequest']"
2458
+ }
2459
+ ],
2460
+ "fileUrlPath": "src/x-modules/ai/store/getters/suggestions-search-request.getter.ts",
2461
+ "isReadonly": true,
2462
+ "releaseTag": "Public",
2463
+ "name": "aiSuggestionsSearchRequest",
2464
+ "variableTypeTokenRange": {
2465
+ "startIndex": 1,
2466
+ "endIndex": 3
2467
+ }
2468
+ },
2385
2469
  {
2386
2470
  "kind": "Interface",
2387
2471
  "canonicalReference": "@empathyco/x-components!AiXEvents:interface",
@@ -25758,6 +25842,62 @@
25758
25842
  ],
25759
25843
  "extendsTokenRanges": []
25760
25844
  },
25845
+ {
25846
+ "kind": "Variable",
25847
+ "canonicalReference": "@empathyco/x-components!fetchAndSaveAiSuggestions:var",
25848
+ "docComment": "/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestions}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions, provided by Vuex.\n *\n * @param request - The AI request to make.\n *\n * @returns The AI response.\n *\n * @public\n */\n",
25849
+ "excerptTokens": [
25850
+ {
25851
+ "kind": "Content",
25852
+ "text": "fetchAndSaveAiSuggestions: "
25853
+ },
25854
+ {
25855
+ "kind": "Reference",
25856
+ "text": "AiXStoreModule",
25857
+ "canonicalReference": "@empathyco/x-components!AiXStoreModule:type"
25858
+ },
25859
+ {
25860
+ "kind": "Content",
25861
+ "text": "['actions']['fetchAndSaveAiSuggestions']"
25862
+ }
25863
+ ],
25864
+ "fileUrlPath": "src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts",
25865
+ "isReadonly": true,
25866
+ "releaseTag": "Public",
25867
+ "name": "fetchAndSaveAiSuggestions",
25868
+ "variableTypeTokenRange": {
25869
+ "startIndex": 1,
25870
+ "endIndex": 3
25871
+ }
25872
+ },
25873
+ {
25874
+ "kind": "Variable",
25875
+ "canonicalReference": "@empathyco/x-components!fetchAndSaveAiSuggestionsSearch:var",
25876
+ "docComment": "/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestionsSearch}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the commits, provided by Vuex.\n *\n * @param request - The AI search request to make.\n *\n * @returns The AI search response.\n *\n * @public\n */\n",
25877
+ "excerptTokens": [
25878
+ {
25879
+ "kind": "Content",
25880
+ "text": "fetchAndSaveAiSuggestionsSearch: "
25881
+ },
25882
+ {
25883
+ "kind": "Reference",
25884
+ "text": "AiXStoreModule",
25885
+ "canonicalReference": "@empathyco/x-components!AiXStoreModule:type"
25886
+ },
25887
+ {
25888
+ "kind": "Content",
25889
+ "text": "['actions']['fetchAndSaveAiSuggestionsSearch']"
25890
+ }
25891
+ ],
25892
+ "fileUrlPath": "src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts",
25893
+ "isReadonly": true,
25894
+ "releaseTag": "Public",
25895
+ "name": "fetchAndSaveAiSuggestionsSearch",
25896
+ "variableTypeTokenRange": {
25897
+ "startIndex": 1,
25898
+ "endIndex": 3
25899
+ }
25900
+ },
25761
25901
  {
25762
25902
  "kind": "Function",
25763
25903
  "canonicalReference": "@empathyco/x-components!fetchAndSaveExperienceControlsResponse:function(1)",
@@ -54996,6 +55136,34 @@
54996
55136
  ],
54997
55137
  "name": "sanitize"
54998
55138
  },
55139
+ {
55140
+ "kind": "Variable",
55141
+ "canonicalReference": "@empathyco/x-components!saveAiOrigin:var",
55142
+ "docComment": "/**\n * Default implementation for the {@link AiActions.saveOrigin}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions, provided by Vuex.\n *\n * @param queryOriginInit - The object to create the {@link QueryOrigin} with.\n *\n * @public\n */\n",
55143
+ "excerptTokens": [
55144
+ {
55145
+ "kind": "Content",
55146
+ "text": "saveOrigin: "
55147
+ },
55148
+ {
55149
+ "kind": "Reference",
55150
+ "text": "AiXStoreModule",
55151
+ "canonicalReference": "@empathyco/x-components!AiXStoreModule:type"
55152
+ },
55153
+ {
55154
+ "kind": "Content",
55155
+ "text": "['actions']['saveOrigin']"
55156
+ }
55157
+ ],
55158
+ "fileUrlPath": "src/x-modules/ai/store/actions/save-origin.action.ts",
55159
+ "isReadonly": true,
55160
+ "releaseTag": "Public",
55161
+ "name": "saveAiOrigin",
55162
+ "variableTypeTokenRange": {
55163
+ "startIndex": 1,
55164
+ "endIndex": 3
55165
+ }
55166
+ },
54999
55167
  {
55000
55168
  "kind": "Variable",
55001
55169
  "canonicalReference": "@empathyco/x-components!saveIdentifierResultsOrigin:var",
@@ -62243,6 +62411,34 @@
62243
62411
  "endIndex": 3
62244
62412
  }
62245
62413
  },
62414
+ {
62415
+ "kind": "Variable",
62416
+ "canonicalReference": "@empathyco/x-components!setAiUrlParams:var",
62417
+ "docComment": "/**\n * Default implementation setUrlParams.\n *\n * @param context - The context of the actions, provided by Vuex.\n *\n * @param urlParams - List of params from the url.\n *\n * @public\n */\n",
62418
+ "excerptTokens": [
62419
+ {
62420
+ "kind": "Content",
62421
+ "text": "setUrlParams: "
62422
+ },
62423
+ {
62424
+ "kind": "Reference",
62425
+ "text": "AiXStoreModule",
62426
+ "canonicalReference": "@empathyco/x-components!AiXStoreModule:type"
62427
+ },
62428
+ {
62429
+ "kind": "Content",
62430
+ "text": "['actions']['setUrlParams']"
62431
+ }
62432
+ ],
62433
+ "fileUrlPath": "src/x-modules/ai/store/actions/set-url-params.action.ts",
62434
+ "isReadonly": true,
62435
+ "releaseTag": "Public",
62436
+ "name": "setAiUrlParams",
62437
+ "variableTypeTokenRange": {
62438
+ "startIndex": 1,
62439
+ "endIndex": 3
62440
+ }
62441
+ },
62246
62442
  {
62247
62443
  "kind": "Function",
62248
62444
  "canonicalReference": "@empathyco/x-components!setConfig:function(1)",
@@ -295,6 +295,9 @@ expandText: string;
295
295
  collapseText: string;
296
296
  }, {}>;
297
297
 
298
+ // @public
299
+ export const aiQuery: AiXStoreModule['getters']['query'];
300
+
298
301
  export { AIStarIcon }
299
302
 
300
303
  // @public
@@ -318,6 +321,12 @@ export interface AiState extends QueryState {
318
321
  tagging: AiSuggestionTagging | undefined;
319
322
  }
320
323
 
324
+ // @public
325
+ export const aiSuggestionsRequest: AiXStoreModule['getters']['suggestionsRequest'];
326
+
327
+ // @public
328
+ export const aiSuggestionsSearchRequest: AiXStoreModule['getters']['suggestionsSearchRequest'];
329
+
321
330
  // @internal
322
331
  export const aiWiring: {
323
332
  ParamsLoadedFromUrl: {
@@ -3036,6 +3045,12 @@ export interface FetchAndSaveActions<Context extends XActionContext<StatusState,
3036
3045
  fetchAndSave: (context: Context, request: Request) => void | Promise<void>;
3037
3046
  }
3038
3047
 
3048
+ // @public
3049
+ export const fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions'];
3050
+
3051
+ // @public
3052
+ export const fetchAndSaveAiSuggestionsSearch: AiXStoreModule['actions']['fetchAndSaveAiSuggestionsSearch'];
3053
+
3039
3054
  // @public
3040
3055
  export const fetchAndSaveExperienceControlsResponse: (context: ExperienceControlsActionContext, request: ExperienceControlsRequest | null) => void | Promise<void>;
3041
3056
 
@@ -6334,6 +6349,9 @@ export interface RootXStoreState {
6334
6349
  // @public
6335
6350
  export const sanitize: (str: string) => string;
6336
6351
 
6352
+ // @public
6353
+ export const saveAiOrigin: AiXStoreModule['actions']['saveOrigin'];
6354
+
6337
6355
  // @public
6338
6356
  export const saveIdentifierResultsOrigin: IdentifierResultsXStoreModule['actions']['saveOrigin'];
6339
6357
 
@@ -7101,6 +7119,9 @@ required: true;
7101
7119
  // @public
7102
7120
  export const sessionHistoryQueries: HistoryQueriesXStoreModule['getters']['sessionHistoryQueries'];
7103
7121
 
7122
+ // @public
7123
+ export const setAiUrlParams: AiXStoreModule['actions']['setUrlParams'];
7124
+
7104
7125
  // @public
7105
7126
  export function setConfig<T extends {
7106
7127
  config: T['config'];
@@ -1,3 +1,12 @@
1
1
  import type { AiXStoreModule } from '../types';
2
+ /**
3
+ * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestionsSearch}.
4
+ *
5
+ * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the commits,
6
+ * provided by Vuex.
7
+ * @param request - The AI search request to make.
8
+ * @returns The AI search response.
9
+ * @public
10
+ */
2
11
  export declare const fetchAndSaveAiSuggestionsSearch: AiXStoreModule['actions']['fetchAndSaveAiSuggestionsSearch'];
3
12
  //# sourceMappingURL=fetch-and-save-ai-suggestions-search.action.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAmBtG,CAAA"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAmBtG,CAAA"}
@@ -6,7 +6,6 @@ import type { AiXStoreModule } from '../types';
6
6
  * provided by Vuex.
7
7
  * @param request - The AI request to make.
8
8
  * @returns The AI response.
9
- *
10
9
  * @public
11
10
  */
12
11
  export declare const fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions'];
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,UAAU,CAAA;AAyB/D;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,2BAA2B,CAe1F,CAAA"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,UAAU,CAAA;AAyB/D;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,2BAA2B,CAe1F,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './fetch-and-save-ai-suggestions-search.action';
2
+ export * from './fetch-and-save-ai-suggestions.action';
3
+ export { saveOrigin as saveAiOrigin } from './save-origin.action';
4
+ export { setUrlParams as setAiUrlParams } from './set-url-params.action';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAA;AAC7D,cAAc,wCAAwC,CAAA;AACtD,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,4 +1,6 @@
1
+ export * from './actions';
1
2
  export * from './emitters';
3
+ export * from './getters';
2
4
  export * from './module';
3
5
  export * from './types';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}