@empathyco/x-adapter-platform 1.9.1 → 1.10.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/dist/cjs/schemas/models/facet.schema.js.map +1 -1
- package/dist/esm/schemas/models/facet.schema.js.map +1 -1
- package/dist/types/schemas/models/facet.schema.d.ts +2 -2
- package/package.json +7 -6
- package/report/x-adapter-platform.api.json +10 -1
- package/report/x-adapter-platform.api.md +2 -1
- package/skills/x-adapter-platform/SKILL.md +34 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":";;;AAQA,oDAA0D;AAC1D,2CAAgD;AAEhD;;;;GAIG;AACU,QAAA,WAAW,GAAG,IAAA,+BAAmB,EAG5C;IACA,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,OAAO;IACd,+CAA+C;IAC/C,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAA,sBAAc,EAAC,IAAI,CAAC,CAAC,SAAgB;IAC9D,OAAO,EAAE;QACP,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAA,sBAAc,EAAC,IAAI,CAAC,CAAC,MAAM;QACrD,QAAQ,EAAE;YACR,OAAO,EAAE,OAAO;SACjB;KACF;CACF,CAAC,CAAA","sourcesContent":["import type {\n BooleanFacet,\n EditableNumberRangeFacet,\n HierarchicalFacet,\n NumberRangeFacet,\n SimpleFacet,\n} from '@empathyco/x-types'\nimport type { PlatformFacet } from '../../types/models/facet.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getFacetConfig } from '../facets/utils'\n\n/**\n * Default implementation for the FacetSchema.\n *\n * @public\n */\nexport const facetSchema = createMutableSchema<\n PlatformFacet,\n HierarchicalFacet | NumberRangeFacet | SimpleFacet | EditableNumberRangeFacet | BooleanFacet\n>({\n id: 'facet',\n label: 'label',\n // eslint-disable-next-line ts/no-unsafe-return\n modelName: ({ type }) => getFacetConfig(type).modelName as any,\n filters: {\n $path: 'values',\n $subSchema: ({ type }) => getFacetConfig(type).schema,\n $context: {\n facetId: 'facet',\n },\n },\n})\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAG5C;IACA,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,OAAO;IACd,+CAA+C;IAC/C,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,SAAgB;IAC9D,OAAO,EAAE;QACP,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM;QACrD,QAAQ,EAAE;YACR,OAAO,EAAE,OAAO;SACjB;KACF;CACF,CAAC,CAAA","sourcesContent":["import type {\n BooleanFacet,\n EditableNumberRangeFacet,\n HierarchicalFacet,\n NumberRangeFacet,\n SimpleFacet,\n} from '@empathyco/x-types'\nimport type { PlatformFacet } from '../../types/models/facet.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getFacetConfig } from '../facets/utils'\n\n/**\n * Default implementation for the FacetSchema.\n *\n * @public\n */\nexport const facetSchema = createMutableSchema<\n PlatformFacet,\n HierarchicalFacet | NumberRangeFacet | SimpleFacet | EditableNumberRangeFacet | BooleanFacet\n>({\n id: 'facet',\n label: 'label',\n // eslint-disable-next-line ts/no-unsafe-return\n modelName: ({ type }) => getFacetConfig(type).modelName as any,\n filters: {\n $path: 'values',\n $subSchema: ({ type }) => getFacetConfig(type).schema,\n $context: {\n facetId: 'facet',\n },\n },\n})\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { EditableNumberRangeFacet, HierarchicalFacet, NumberRangeFacet, SimpleFacet } from '@empathyco/x-types';
|
|
1
|
+
import type { BooleanFacet, EditableNumberRangeFacet, HierarchicalFacet, NumberRangeFacet, SimpleFacet } from '@empathyco/x-types';
|
|
2
2
|
import type { PlatformFacet } from '../../types/models/facet.model';
|
|
3
3
|
/**
|
|
4
4
|
* Default implementation for the FacetSchema.
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export declare const facetSchema: import("@empathyco/x-adapter").MutableSchema<PlatformFacet, HierarchicalFacet | NumberRangeFacet | SimpleFacet | EditableNumberRangeFacet>;
|
|
8
|
+
export declare const facetSchema: import("@empathyco/x-adapter").MutableSchema<PlatformFacet, HierarchicalFacet | NumberRangeFacet | SimpleFacet | EditableNumberRangeFacet | BooleanFacet>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-adapter-platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "A search client for the Empathy Platform API",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"types": "dist/types/index.d.ts",
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
|
24
|
-
"report"
|
|
24
|
+
"report",
|
|
25
|
+
"skills"
|
|
25
26
|
],
|
|
26
27
|
"engines": {
|
|
27
28
|
"node": ">=22"
|
|
@@ -47,9 +48,9 @@
|
|
|
47
48
|
"prepublishOnly": "pnpm run build"
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@empathyco/x-adapter": "8.
|
|
51
|
-
"@empathyco/x-types": "10.
|
|
52
|
-
"@empathyco/x-utils": "1.0
|
|
51
|
+
"@empathyco/x-adapter": "8.2.0",
|
|
52
|
+
"@empathyco/x-types": "10.9.0",
|
|
53
|
+
"@empathyco/x-utils": "1.1.0"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@microsoft/api-documenter": "7.30.7",
|
|
@@ -62,5 +63,5 @@
|
|
|
62
63
|
"publishConfig": {
|
|
63
64
|
"access": "public"
|
|
64
65
|
},
|
|
65
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "8c0652d19cb33994ce6221c0cd1f36a9e1acdec6"
|
|
66
67
|
}
|
|
@@ -1429,6 +1429,15 @@
|
|
|
1429
1429
|
"text": "EditableNumberRangeFacet",
|
|
1430
1430
|
"canonicalReference": "@empathyco/x-adapter-platform!EditableNumberRangeFacet:interface"
|
|
1431
1431
|
},
|
|
1432
|
+
{
|
|
1433
|
+
"kind": "Content",
|
|
1434
|
+
"text": " | "
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"kind": "Reference",
|
|
1438
|
+
"text": "BooleanFacet",
|
|
1439
|
+
"canonicalReference": "@empathyco/x-adapter-platform!BooleanFacet:interface"
|
|
1440
|
+
},
|
|
1432
1441
|
{
|
|
1433
1442
|
"kind": "Content",
|
|
1434
1443
|
"text": ">"
|
|
@@ -1440,7 +1449,7 @@
|
|
|
1440
1449
|
"name": "facetSchema",
|
|
1441
1450
|
"variableTypeTokenRange": {
|
|
1442
1451
|
"startIndex": 1,
|
|
1443
|
-
"endIndex":
|
|
1452
|
+
"endIndex": 16
|
|
1444
1453
|
}
|
|
1445
1454
|
},
|
|
1446
1455
|
{
|
|
@@ -135,9 +135,10 @@ export interface FacetConfig {
|
|
|
135
135
|
// Warning: (ae-forgotten-export) The symbol "NumberRangeFacet" needs to be exported by the entry point index.d.ts
|
|
136
136
|
// Warning: (ae-forgotten-export) The symbol "SimpleFacet" needs to be exported by the entry point index.d.ts
|
|
137
137
|
// Warning: (ae-forgotten-export) The symbol "EditableNumberRangeFacet" needs to be exported by the entry point index.d.ts
|
|
138
|
+
// Warning: (ae-forgotten-export) The symbol "BooleanFacet" needs to be exported by the entry point index.d.ts
|
|
138
139
|
//
|
|
139
140
|
// @public
|
|
140
|
-
export const facetSchema: MutableSchema<PlatformFacet, HierarchicalFacet | NumberRangeFacet | SimpleFacet | EditableNumberRangeFacet>;
|
|
141
|
+
export const facetSchema: MutableSchema<PlatformFacet, HierarchicalFacet | NumberRangeFacet | SimpleFacet | EditableNumberRangeFacet | BooleanFacet>;
|
|
141
142
|
|
|
142
143
|
// Warning: (ae-forgotten-export) The symbol "FacetsRequest" needs to be exported by the entry point index.d.ts
|
|
143
144
|
// Warning: (ae-forgotten-export) The symbol "FacetsResponse" needs to be exported by the entry point index.d.ts
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: x-adapter-platform
|
|
3
|
+
description: 'Use when importing, using, or debugging components from x-adapter-platform.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# x-adapter-platform
|
|
7
|
+
|
|
8
|
+
Adapter para la Empathy Platform API construido sobre `x-adapter`: contiene la configuración, mappers y schemas de los endpoints de la plataforma. Es el adapter por defecto usado en `x-archetype`.
|
|
9
|
+
|
|
10
|
+
## Componentes disponibles
|
|
11
|
+
|
|
12
|
+
- `platformAdapter` — objeto con todos los `EndpointAdapter` de la plataforma:
|
|
13
|
+
- `search` — búsqueda de resultados.
|
|
14
|
+
- `browse` — browsing sin query.
|
|
15
|
+
- `facets` — facets disponibles para la query.
|
|
16
|
+
- `popularSearches` — búsquedas populares.
|
|
17
|
+
- `recommendations` — productos más clicados.
|
|
18
|
+
- `nextQueries` — queries que suelen hacerse a continuación.
|
|
19
|
+
- `querySuggestions` — sugerencias de query.
|
|
20
|
+
- `relatedTags` — tags para refinar la query.
|
|
21
|
+
- `relatedPrompts` — prompts relacionados.
|
|
22
|
+
- `semanticQueries` — queries semánticas.
|
|
23
|
+
- `identifierResults` — búsqueda por identificador (SKU).
|
|
24
|
+
- `experienceControls` — experience controls del snippet.
|
|
25
|
+
- `aiSuggestions` / `aiSuggestionsSearch` — sugerencias AI.
|
|
26
|
+
- `tagging` — envío de eventos de métricas.
|
|
27
|
+
- `resultSchema`, `facetsSchema`, etc. — `MutableSchemas` de request/response que se pueden modificar con `$extends`, `$override` y `$replace`.
|
|
28
|
+
- `mapFilters`, `getFacetConfig`, `extractUrlParameters`, `getTaggingInfoFromUrl` — helpers de mapeo y utilidades.
|
|
29
|
+
|
|
30
|
+
## Instalación
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
npm install @empathyco/x-adapter-platform
|
|
34
|
+
```
|