@empathyco/x-adapter-platform 1.7.2 → 1.9.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/facets/utils.js +5 -0
- package/dist/cjs/schemas/facets/utils.js.map +1 -1
- package/dist/cjs/schemas/models/browse-result.schema.js +44 -0
- package/dist/cjs/schemas/models/browse-result.schema.js.map +1 -0
- package/dist/cjs/schemas/models/filters/boolean-filter.schema.js +17 -0
- package/dist/cjs/schemas/models/filters/boolean-filter.schema.js.map +1 -0
- package/dist/cjs/schemas/models/index.js +1 -0
- package/dist/cjs/schemas/models/index.js.map +1 -1
- package/dist/cjs/schemas/responses/browse-response.schema.js +2 -2
- package/dist/cjs/schemas/responses/browse-response.schema.js.map +1 -1
- package/dist/cjs/types/models/facet.model.js.map +1 -1
- package/dist/cjs/types/models/tagging.model.js.map +1 -1
- package/dist/esm/schemas/facets/utils.js +5 -0
- package/dist/esm/schemas/facets/utils.js.map +1 -1
- package/dist/esm/schemas/models/browse-result.schema.js +41 -0
- package/dist/esm/schemas/models/browse-result.schema.js.map +1 -0
- package/dist/esm/schemas/models/filters/boolean-filter.schema.js +14 -0
- package/dist/esm/schemas/models/filters/boolean-filter.schema.js.map +1 -0
- package/dist/esm/schemas/models/index.js +1 -0
- package/dist/esm/schemas/models/index.js.map +1 -1
- package/dist/esm/schemas/responses/browse-response.schema.js +2 -2
- package/dist/esm/schemas/responses/browse-response.schema.js.map +1 -1
- package/dist/esm/types/models/facet.model.js.map +1 -1
- package/dist/esm/types/models/tagging.model.js.map +1 -1
- package/dist/types/schemas/models/browse-result.schema.d.ts +8 -0
- package/dist/types/schemas/models/filters/boolean-filter.schema.d.ts +8 -0
- package/dist/types/schemas/models/index.d.ts +1 -0
- package/dist/types/types/models/facet.model.d.ts +1 -1
- package/dist/types/types/models/tagging.model.d.ts +4 -0
- package/package.json +3 -3
- package/report/x-adapter-platform.api.json +159 -1
- package/report/x-adapter-platform.api.md +14 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFacetConfig = getFacetConfig;
|
|
4
|
+
const boolean_filter_schema_1 = require("../models/filters/boolean-filter.schema");
|
|
4
5
|
const editable_number_filter_schema_1 = require("../models/filters/editable-number-filter.schema");
|
|
5
6
|
const hierarchical_filter_schema_1 = require("../models/filters/hierarchical-filter.schema");
|
|
6
7
|
const number_filter_schema_1 = require("../models/filters/number-filter.schema");
|
|
@@ -28,6 +29,10 @@ function getFacetConfig(type) {
|
|
|
28
29
|
modelName: 'NumberRangeFacet',
|
|
29
30
|
schema: number_filter_schema_1.numberFilterSchema,
|
|
30
31
|
},
|
|
32
|
+
boolean: {
|
|
33
|
+
modelName: 'BooleanFacet',
|
|
34
|
+
schema: boolean_filter_schema_1.booleanFilterSchema,
|
|
35
|
+
},
|
|
31
36
|
'editable-range': {
|
|
32
37
|
modelName: 'EditableNumberRangeFacet',
|
|
33
38
|
schema: editable_number_filter_schema_1.editableNumberFilterSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/schemas/facets/utils.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/schemas/facets/utils.ts"],"names":[],"mappings":";;AAgBA,wCAwBC;AAtCD,mFAA6E;AAC7E,mGAA4F;AAC5F,6FAAuF;AACvF,iFAA2E;AAC3E,iFAA2E;AAE3E;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,IAAuB;;IACpD,MAAM,WAAW,GAA2C;QAC1D,KAAK,EAAE;YACL,SAAS,EAAE,aAAa;YACxB,MAAM,EAAE,yCAAkB;SAC3B;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,mBAAmB;YAC9B,MAAM,EAAE,qDAAwB;SACjC;QACD,KAAK,EAAE;YACL,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE,yCAAkB;SAC3B;QACD,OAAO,EAAE;YACP,SAAS,EAAE,cAAc;YACzB,MAAM,EAAE,2CAAmB;SAC5B;QACD,gBAAgB,EAAE;YAChB,SAAS,EAAE,0BAA0B;YACrC,MAAM,EAAE,0DAA0B;SACnC;KACF,CAAA;IACD,OAAO,MAAA,WAAW,CAAC,IAAI,CAAC,mCAAI,WAAW,CAAC,KAAK,CAAA;AAC/C,CAAC","sourcesContent":["import type { PlatformFacetType } from '../../types/models/facet.model'\nimport type { FacetConfig } from './types'\nimport { booleanFilterSchema } from '../models/filters/boolean-filter.schema'\nimport { editableNumberFilterSchema } from '../models/filters/editable-number-filter.schema'\nimport { hierarchicalFilterSchema } from '../models/filters/hierarchical-filter.schema'\nimport { numberFilterSchema } from '../models/filters/number-filter.schema'\nimport { simpleFilterSchema } from '../models/filters/simple-filter.schema'\n\n/**\n * Returns the facet's config.\n *\n * @param type - The facet type to resolve the configuration.\n * @returns The facet's config.\n *\n * @public\n */\nexport function getFacetConfig(type: PlatformFacetType): FacetConfig {\n const typeConfigs: Record<PlatformFacetType, FacetConfig> = {\n value: {\n modelName: 'SimpleFacet',\n schema: simpleFilterSchema,\n },\n hierarchical: {\n modelName: 'HierarchicalFacet',\n schema: hierarchicalFilterSchema,\n },\n range: {\n modelName: 'NumberRangeFacet',\n schema: numberFilterSchema,\n },\n boolean: {\n modelName: 'BooleanFacet',\n schema: booleanFilterSchema,\n },\n 'editable-range': {\n modelName: 'EditableNumberRangeFacet',\n schema: editableNumberFilterSchema,\n },\n }\n return typeConfigs[type] ?? typeConfigs.value\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browseResultSchema = void 0;
|
|
4
|
+
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
|
+
const url_utils_1 = require("../../mappers/url.utils");
|
|
6
|
+
/**
|
|
7
|
+
* Default implementation for the BrowseResultSchema.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
exports.browseResultSchema = (0, x_adapter_1.createMutableSchema)({
|
|
12
|
+
id: '__id',
|
|
13
|
+
images: '__images',
|
|
14
|
+
name: '__name',
|
|
15
|
+
url: '__url',
|
|
16
|
+
identifier: {
|
|
17
|
+
value: '__externalId',
|
|
18
|
+
},
|
|
19
|
+
rating: {
|
|
20
|
+
value: () => null,
|
|
21
|
+
},
|
|
22
|
+
price: {
|
|
23
|
+
value: ({ __prices: rawPrices }) => { var _a; return (_a = rawPrices.current) === null || _a === void 0 ? void 0 : _a.value; },
|
|
24
|
+
originalValue: ({ __prices: rawPrices }) => { var _a, _b, _c; return (_b = (_a = rawPrices.previous) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : (_c = rawPrices.current) === null || _c === void 0 ? void 0 : _c.value; },
|
|
25
|
+
hasDiscount: ({ __prices: rawPrices }) => {
|
|
26
|
+
var _a, _b, _c, _d, _e, _f;
|
|
27
|
+
return ((_b = (_a = rawPrices.current) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0) <
|
|
28
|
+
((_f = (_d = (_c = rawPrices.previous) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : (_e = rawPrices.current) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : 0);
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
type: () => 'Default',
|
|
32
|
+
modelName: () => 'Result',
|
|
33
|
+
isWishlisted: () => false,
|
|
34
|
+
tagging: {
|
|
35
|
+
$path: 'tagging',
|
|
36
|
+
$subSchema: {
|
|
37
|
+
add2cart: ({ browseAdd2Cart }) => (0, url_utils_1.getTaggingInfoFromUrl)(browseAdd2Cart),
|
|
38
|
+
click: ({ browseProduct }) => (0, url_utils_1.getTaggingInfoFromUrl)(browseProduct),
|
|
39
|
+
checkout: ({ browseCheckout }) => (0, url_utils_1.getTaggingInfoFromUrl)(browseCheckout),
|
|
40
|
+
displayClick: ({ displayBrowseProduct }) => (0, url_utils_1.getDisplayTaggingInfoFromUrl)(displayBrowseProduct),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=browse-result.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-result.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/browse-result.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,uDAA6F;AAE7F;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,IAAA,+BAAmB,EAAyB;IAC5E,EAAE,EAAE,MAAM;IACV,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,OAAO;IACZ,UAAU,EAAE;QACV,KAAK,EAAE,cAAc;KACtB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;KAClB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,WAAC,OAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,CAAA,EAAA;QAC5D,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,mBACzC,OAAA,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,CAAA,EAAA;QACvD,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;;YACvC,OAAA,CAAC,MAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,mCAAI,CAAC,CAAC;gBAC/B,CAAC,MAAA,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,mCAAI,CAAC,CAAC,CAAA;SAAA;KAC/D;IACD,IAAI,EAAE,GAAG,EAAE,CAAC,SAAS;IACrB,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ;IACzB,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK;IACzB,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE;YACV,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,cAAc,CAAC;YACvE,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,aAAa,CAAC;YAClE,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,cAAc,CAAC;YACvE,YAAY,EAAE,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CACzC,IAAA,wCAA4B,EAAC,oBAAoB,CAAC;SACrD;KACF;CACF,CAAC,CAAA","sourcesContent":["import type { Result } from '@empathyco/x-types'\nimport type { PlatformResult } from '../../types/models/result.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getDisplayTaggingInfoFromUrl, getTaggingInfoFromUrl } from '../../mappers/url.utils'\n\n/**\n * Default implementation for the BrowseResultSchema.\n *\n * @public\n */\nexport const browseResultSchema = createMutableSchema<PlatformResult, Result>({\n id: '__id',\n images: '__images',\n name: '__name',\n url: '__url',\n identifier: {\n value: '__externalId',\n },\n rating: {\n value: () => null,\n },\n price: {\n value: ({ __prices: rawPrices }) => rawPrices.current?.value,\n originalValue: ({ __prices: rawPrices }) =>\n rawPrices.previous?.value ?? rawPrices.current?.value,\n hasDiscount: ({ __prices: rawPrices }) =>\n (rawPrices.current?.value ?? 0) <\n (rawPrices.previous?.value ?? rawPrices.current?.value ?? 0),\n },\n type: () => 'Default',\n modelName: () => 'Result',\n isWishlisted: () => false,\n tagging: {\n $path: 'tagging',\n $subSchema: {\n add2cart: ({ browseAdd2Cart }) => getTaggingInfoFromUrl(browseAdd2Cart),\n click: ({ browseProduct }) => getTaggingInfoFromUrl(browseProduct),\n checkout: ({ browseCheckout }) => getTaggingInfoFromUrl(browseCheckout),\n displayClick: ({ displayBrowseProduct }) =>\n getDisplayTaggingInfoFromUrl(displayBrowseProduct),\n },\n },\n})\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.booleanFilterSchema = void 0;
|
|
4
|
+
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
|
+
/**
|
|
6
|
+
* Default implementation for the BooleanFilterSchema.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
exports.booleanFilterSchema = (0, x_adapter_1.createMutableSchema)({
|
|
11
|
+
id: 'filter',
|
|
12
|
+
label: 'value',
|
|
13
|
+
facetId: (_, $context) => $context === null || $context === void 0 ? void 0 : $context.facetId,
|
|
14
|
+
selected: () => false,
|
|
15
|
+
modelName: () => 'BooleanFilter',
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=boolean-filter.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-filter.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/filters/boolean-filter.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAE1D;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,IAAA,+BAAmB,EAAgC;IACpF,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAiB;IACrD,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;IACrB,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe;CACjC,CAAC,CAAA","sourcesContent":["import type { BooleanFilter } from '@empathyco/x-types'\nimport type { PlatformFilter } from '../../../types/models/facet.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the BooleanFilterSchema.\n *\n * @public\n */\nexport const booleanFilterSchema = createMutableSchema<PlatformFilter, BooleanFilter>({\n id: 'filter',\n label: 'value',\n facetId: (_, $context) => $context?.facetId as string,\n selected: () => false,\n modelName: () => 'BooleanFilter',\n})\n"]}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./ai"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./banner.schema"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./browse-result.schema"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./facet.schema"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./filters"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./next-query.schema"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/models/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,0DAA+B;AAC/B,yDAA8B;AAC9B,oDAAyB;AACzB,8DAAmC;AACnC,mEAAwC;AACxC,4DAAiC;AACjC,+DAAoC;AACpC,kEAAuC;AACvC,+DAAoC;AACpC,0DAA+B;AAC/B,kEAAuC;AACvC,8DAAmC","sourcesContent":["export * from './ai'\nexport * from './banner.schema'\nexport * from './facet.schema'\nexport * from './filters'\nexport * from './next-query.schema'\nexport * from './partial-results.schema'\nexport * from './promoted.schema'\nexport * from './redirection.schema'\nexport * from './related-prompt.schema'\nexport * from './related-tag.schema'\nexport * from './result.schema'\nexport * from './semantic-query.schema'\nexport * from './suggestion.schema'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/models/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,0DAA+B;AAC/B,iEAAsC;AACtC,yDAA8B;AAC9B,oDAAyB;AACzB,8DAAmC;AACnC,mEAAwC;AACxC,4DAAiC;AACjC,+DAAoC;AACpC,kEAAuC;AACvC,+DAAoC;AACpC,0DAA+B;AAC/B,kEAAuC;AACvC,8DAAmC","sourcesContent":["export * from './ai'\nexport * from './banner.schema'\nexport * from './browse-result.schema'\nexport * from './facet.schema'\nexport * from './filters'\nexport * from './next-query.schema'\nexport * from './partial-results.schema'\nexport * from './promoted.schema'\nexport * from './redirection.schema'\nexport * from './related-prompt.schema'\nexport * from './related-tag.schema'\nexport * from './result.schema'\nexport * from './semantic-query.schema'\nexport * from './suggestion.schema'\n"]}
|
|
@@ -4,9 +4,9 @@ exports.browseResponseSchema = void 0;
|
|
|
4
4
|
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
5
|
const url_utils_1 = require("../../mappers/url.utils");
|
|
6
6
|
const banner_schema_1 = require("../models/banner.schema");
|
|
7
|
+
const browse_result_schema_1 = require("../models/browse-result.schema");
|
|
7
8
|
const facet_schema_1 = require("../models/facet.schema");
|
|
8
9
|
const promoted_schema_1 = require("../models/promoted.schema");
|
|
9
|
-
const result_schema_1 = require("../models/result.schema");
|
|
10
10
|
const stats_schema_1 = require("../models/stats.schema");
|
|
11
11
|
/**
|
|
12
12
|
* Default implementation for the BrowseResponseSchema.
|
|
@@ -16,7 +16,7 @@ const stats_schema_1 = require("../models/stats.schema");
|
|
|
16
16
|
exports.browseResponseSchema = (0, x_adapter_1.createMutableSchema)({
|
|
17
17
|
results: {
|
|
18
18
|
$path: 'catalog.content',
|
|
19
|
-
$subSchema:
|
|
19
|
+
$subSchema: browse_result_schema_1.browseResultSchema,
|
|
20
20
|
},
|
|
21
21
|
facets: {
|
|
22
22
|
$path: 'catalog.facets',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browse-response.schema.js","sourceRoot":"","sources":["../../../../src/schemas/responses/browse-response.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,uDAA6F;AAC7F,2DAAsD;AACtD,yDAAoD;AACpD,+DAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"browse-response.schema.js","sourceRoot":"","sources":["../../../../src/schemas/responses/browse-response.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,uDAA6F;AAC7F,2DAAsD;AACtD,yEAAmE;AACnE,yDAAoD;AACpD,+DAA0D;AAC1D,yDAAoD;AAEpD;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,IAAA,+BAAmB,EAAyC;IAC9F,OAAO,EAAE;QACP,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE,yCAAkB;KAC/B;IACD,MAAM,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,UAAU,EAAE,0BAAW;KACxB;IACD,YAAY,EAAE,kBAAkB;IAChC,OAAO,EAAE;QACP,KAAK,EAAE,gBAAgB;QACvB,UAAU,EAAE,4BAAY;KACzB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,gCAAc;KAC3B;IACD,KAAK,EAAE;QACL,KAAK,EAAE,eAAe;QACtB,UAAU,EAAE,0BAAW;KACxB;IACD,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,cAAc,CAAC,CAAA,EAAA;IACvF,oBAAoB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WACpC,OAAA,IAAA,wCAA4B,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,qBAAqB,CAAC,CAAA,EAAA;CACxE,CAAC,CAAA","sourcesContent":["import type { BrowseResponse } from '@empathyco/x-types'\nimport type { PlatformBrowseResponse } from '../../types/responses/browse-response.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getDisplayTaggingInfoFromUrl, getTaggingInfoFromUrl } from '../../mappers/url.utils'\nimport { bannerSchema } from '../models/banner.schema'\nimport { browseResultSchema } from '../models/browse-result.schema'\nimport { facetSchema } from '../models/facet.schema'\nimport { promotedSchema } from '../models/promoted.schema'\nimport { statsSchema } from '../models/stats.schema'\n\n/**\n * Default implementation for the BrowseResponseSchema.\n *\n * @public\n */\nexport const browseResponseSchema = createMutableSchema<PlatformBrowseResponse, BrowseResponse>({\n results: {\n $path: 'catalog.content',\n $subSchema: browseResultSchema,\n },\n facets: {\n $path: 'catalog.facets',\n $subSchema: facetSchema,\n },\n totalResults: 'catalog.numFound',\n banners: {\n $path: 'banner.content',\n $subSchema: bannerSchema,\n },\n promoteds: {\n $path: 'promoted.content',\n $subSchema: promotedSchema,\n },\n stats: {\n $path: 'catalog.stats',\n $subSchema: statsSchema,\n },\n browseTagging: ({ catalog }) => getTaggingInfoFromUrl(catalog?.tagging?.browseCategory),\n displayBrowseTagging: ({ catalog }) =>\n getDisplayTaggingInfoFromUrl(catalog?.tagging?.displayBrowseCategory),\n})\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet.model.js","sourceRoot":"","sources":["../../../../src/types/models/facet.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { BooleanFilter, Facet, Filter } from '@empathyco/x-types'\n\n/**\n * Facet model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFacet {\n label: string\n facet: string\n type: PlatformFacetType\n values: PlatformFilter[]\n}\n\n/**\n * Facet type for the `platform` API. It can be: value, hierarchical or range.\n *\n * @public\n */\nexport type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range'\n\n/**\n * Filter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFilter {\n count: number\n filter: string\n id: string\n value: string\n}\n\n/**\n * HierarchicalFilter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformHierarchicalFilter extends PlatformFilter {\n children: PlatformFacet\n}\n\n/**\n * Hierarchical Facet model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFacet extends Facet {\n /** Model name to indicate the facet type. */\n modelName: 'HierarchicalFacet'\n /** Filters available for the facet. */\n filters: AdapterHierarchicalFilter[]\n}\n\n/**\n * Hierarchical Filter model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFilter extends BooleanFilter {\n /** Model name to indicate the filter type. */\n modelName: 'HierarchicalFilter'\n /** A unique id used to reference the parent filter or null if it hasn't. */\n parentId: Filter['id'] | null\n /** Descendants filters. */\n children?: AdapterHierarchicalFilter[]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"facet.model.js","sourceRoot":"","sources":["../../../../src/types/models/facet.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { BooleanFilter, Facet, Filter } from '@empathyco/x-types'\n\n/**\n * Facet model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFacet {\n label: string\n facet: string\n type: PlatformFacetType\n values: PlatformFilter[]\n}\n\n/**\n * Facet type for the `platform` API. It can be: value, hierarchical or range.\n *\n * @public\n */\nexport type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range' | 'boolean'\n\n/**\n * Filter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFilter {\n count: number\n filter: string\n id: string\n value: string\n}\n\n/**\n * HierarchicalFilter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformHierarchicalFilter extends PlatformFilter {\n children: PlatformFacet\n}\n\n/**\n * Hierarchical Facet model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFacet extends Facet {\n /** Model name to indicate the facet type. */\n modelName: 'HierarchicalFacet'\n /** Filters available for the facet. */\n filters: AdapterHierarchicalFilter[]\n}\n\n/**\n * Hierarchical Filter model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFilter extends BooleanFilter {\n /** Model name to indicate the filter type. */\n modelName: 'HierarchicalFilter'\n /** A unique id used to reference the parent filter or null if it hasn't. */\n parentId: Filter['id'] | null\n /** Descendants filters. */\n children?: AdapterHierarchicalFilter[]\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagging.model.js","sourceRoot":"","sources":["../../../../src/types/models/tagging.model.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Tagging model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformTagging {\n add2cart: string\n checkout: string\n click: string\n displayClick: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tagging.model.js","sourceRoot":"","sources":["../../../../src/types/models/tagging.model.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Tagging model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformTagging {\n add2cart: string\n checkout: string\n click: string\n displayClick: string\n browseAdd2Cart: string\n browseProduct: string\n browseCheckout: string\n displayBrowseProduct: string\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { booleanFilterSchema } from '../models/filters/boolean-filter.schema';
|
|
1
2
|
import { editableNumberFilterSchema } from '../models/filters/editable-number-filter.schema';
|
|
2
3
|
import { hierarchicalFilterSchema } from '../models/filters/hierarchical-filter.schema';
|
|
3
4
|
import { numberFilterSchema } from '../models/filters/number-filter.schema';
|
|
@@ -25,6 +26,10 @@ export function getFacetConfig(type) {
|
|
|
25
26
|
modelName: 'NumberRangeFacet',
|
|
26
27
|
schema: numberFilterSchema,
|
|
27
28
|
},
|
|
29
|
+
boolean: {
|
|
30
|
+
modelName: 'BooleanFacet',
|
|
31
|
+
schema: booleanFilterSchema,
|
|
32
|
+
},
|
|
28
33
|
'editable-range': {
|
|
29
34
|
modelName: 'EditableNumberRangeFacet',
|
|
30
35
|
schema: editableNumberFilterSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/schemas/facets/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAE3E;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,IAAuB;;IACpD,MAAM,WAAW,GAA2C;QAC1D,KAAK,EAAE;YACL,SAAS,EAAE,aAAa;YACxB,MAAM,EAAE,kBAAkB;SAC3B;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,mBAAmB;YAC9B,MAAM,EAAE,wBAAwB;SACjC;QACD,KAAK,EAAE;YACL,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE,kBAAkB;SAC3B;QACD,gBAAgB,EAAE;YAChB,SAAS,EAAE,0BAA0B;YACrC,MAAM,EAAE,0BAA0B;SACnC;KACF,CAAA;IACD,OAAO,MAAA,WAAW,CAAC,IAAI,CAAC,mCAAI,WAAW,CAAC,KAAK,CAAA;AAC/C,CAAC","sourcesContent":["import type { PlatformFacetType } from '../../types/models/facet.model'\nimport type { FacetConfig } from './types'\nimport { editableNumberFilterSchema } from '../models/filters/editable-number-filter.schema'\nimport { hierarchicalFilterSchema } from '../models/filters/hierarchical-filter.schema'\nimport { numberFilterSchema } from '../models/filters/number-filter.schema'\nimport { simpleFilterSchema } from '../models/filters/simple-filter.schema'\n\n/**\n * Returns the facet's config.\n *\n * @param type - The facet type to resolve the configuration.\n * @returns The facet's config.\n *\n * @public\n */\nexport function getFacetConfig(type: PlatformFacetType): FacetConfig {\n const typeConfigs: Record<PlatformFacetType, FacetConfig> = {\n value: {\n modelName: 'SimpleFacet',\n schema: simpleFilterSchema,\n },\n hierarchical: {\n modelName: 'HierarchicalFacet',\n schema: hierarchicalFilterSchema,\n },\n range: {\n modelName: 'NumberRangeFacet',\n schema: numberFilterSchema,\n },\n 'editable-range': {\n modelName: 'EditableNumberRangeFacet',\n schema: editableNumberFilterSchema,\n },\n }\n return typeConfigs[type] ?? typeConfigs.value\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/schemas/facets/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAE3E;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,IAAuB;;IACpD,MAAM,WAAW,GAA2C;QAC1D,KAAK,EAAE;YACL,SAAS,EAAE,aAAa;YACxB,MAAM,EAAE,kBAAkB;SAC3B;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,mBAAmB;YAC9B,MAAM,EAAE,wBAAwB;SACjC;QACD,KAAK,EAAE;YACL,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE,kBAAkB;SAC3B;QACD,OAAO,EAAE;YACP,SAAS,EAAE,cAAc;YACzB,MAAM,EAAE,mBAAmB;SAC5B;QACD,gBAAgB,EAAE;YAChB,SAAS,EAAE,0BAA0B;YACrC,MAAM,EAAE,0BAA0B;SACnC;KACF,CAAA;IACD,OAAO,MAAA,WAAW,CAAC,IAAI,CAAC,mCAAI,WAAW,CAAC,KAAK,CAAA;AAC/C,CAAC","sourcesContent":["import type { PlatformFacetType } from '../../types/models/facet.model'\nimport type { FacetConfig } from './types'\nimport { booleanFilterSchema } from '../models/filters/boolean-filter.schema'\nimport { editableNumberFilterSchema } from '../models/filters/editable-number-filter.schema'\nimport { hierarchicalFilterSchema } from '../models/filters/hierarchical-filter.schema'\nimport { numberFilterSchema } from '../models/filters/number-filter.schema'\nimport { simpleFilterSchema } from '../models/filters/simple-filter.schema'\n\n/**\n * Returns the facet's config.\n *\n * @param type - The facet type to resolve the configuration.\n * @returns The facet's config.\n *\n * @public\n */\nexport function getFacetConfig(type: PlatformFacetType): FacetConfig {\n const typeConfigs: Record<PlatformFacetType, FacetConfig> = {\n value: {\n modelName: 'SimpleFacet',\n schema: simpleFilterSchema,\n },\n hierarchical: {\n modelName: 'HierarchicalFacet',\n schema: hierarchicalFilterSchema,\n },\n range: {\n modelName: 'NumberRangeFacet',\n schema: numberFilterSchema,\n },\n boolean: {\n modelName: 'BooleanFacet',\n schema: booleanFilterSchema,\n },\n 'editable-range': {\n modelName: 'EditableNumberRangeFacet',\n schema: editableNumberFilterSchema,\n },\n }\n return typeConfigs[type] ?? typeConfigs.value\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createMutableSchema } from '@empathyco/x-adapter';
|
|
2
|
+
import { getDisplayTaggingInfoFromUrl, getTaggingInfoFromUrl } from '../../mappers/url.utils';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseResultSchema.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const browseResultSchema = createMutableSchema({
|
|
9
|
+
id: '__id',
|
|
10
|
+
images: '__images',
|
|
11
|
+
name: '__name',
|
|
12
|
+
url: '__url',
|
|
13
|
+
identifier: {
|
|
14
|
+
value: '__externalId',
|
|
15
|
+
},
|
|
16
|
+
rating: {
|
|
17
|
+
value: () => null,
|
|
18
|
+
},
|
|
19
|
+
price: {
|
|
20
|
+
value: ({ __prices: rawPrices }) => { var _a; return (_a = rawPrices.current) === null || _a === void 0 ? void 0 : _a.value; },
|
|
21
|
+
originalValue: ({ __prices: rawPrices }) => { var _a, _b, _c; return (_b = (_a = rawPrices.previous) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : (_c = rawPrices.current) === null || _c === void 0 ? void 0 : _c.value; },
|
|
22
|
+
hasDiscount: ({ __prices: rawPrices }) => {
|
|
23
|
+
var _a, _b, _c, _d, _e, _f;
|
|
24
|
+
return ((_b = (_a = rawPrices.current) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0) <
|
|
25
|
+
((_f = (_d = (_c = rawPrices.previous) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : (_e = rawPrices.current) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : 0);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
type: () => 'Default',
|
|
29
|
+
modelName: () => 'Result',
|
|
30
|
+
isWishlisted: () => false,
|
|
31
|
+
tagging: {
|
|
32
|
+
$path: 'tagging',
|
|
33
|
+
$subSchema: {
|
|
34
|
+
add2cart: ({ browseAdd2Cart }) => getTaggingInfoFromUrl(browseAdd2Cart),
|
|
35
|
+
click: ({ browseProduct }) => getTaggingInfoFromUrl(browseProduct),
|
|
36
|
+
checkout: ({ browseCheckout }) => getTaggingInfoFromUrl(browseCheckout),
|
|
37
|
+
displayClick: ({ displayBrowseProduct }) => getDisplayTaggingInfoFromUrl(displayBrowseProduct),
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=browse-result.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-result.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/browse-result.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE7F;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAyB;IAC5E,EAAE,EAAE,MAAM;IACV,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,OAAO;IACZ,UAAU,EAAE;QACV,KAAK,EAAE,cAAc;KACtB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;KAClB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,WAAC,OAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,CAAA,EAAA;QAC5D,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,mBACzC,OAAA,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,CAAA,EAAA;QACvD,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;;YACvC,OAAA,CAAC,MAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,mCAAI,CAAC,CAAC;gBAC/B,CAAC,MAAA,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,mCAAI,CAAC,CAAC,CAAA;SAAA;KAC/D;IACD,IAAI,EAAE,GAAG,EAAE,CAAC,SAAS;IACrB,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ;IACzB,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK;IACzB,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE;YACV,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,cAAc,CAAC;YACvE,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,aAAa,CAAC;YAClE,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,cAAc,CAAC;YACvE,YAAY,EAAE,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CACzC,4BAA4B,CAAC,oBAAoB,CAAC;SACrD;KACF;CACF,CAAC,CAAA","sourcesContent":["import type { Result } from '@empathyco/x-types'\nimport type { PlatformResult } from '../../types/models/result.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getDisplayTaggingInfoFromUrl, getTaggingInfoFromUrl } from '../../mappers/url.utils'\n\n/**\n * Default implementation for the BrowseResultSchema.\n *\n * @public\n */\nexport const browseResultSchema = createMutableSchema<PlatformResult, Result>({\n id: '__id',\n images: '__images',\n name: '__name',\n url: '__url',\n identifier: {\n value: '__externalId',\n },\n rating: {\n value: () => null,\n },\n price: {\n value: ({ __prices: rawPrices }) => rawPrices.current?.value,\n originalValue: ({ __prices: rawPrices }) =>\n rawPrices.previous?.value ?? rawPrices.current?.value,\n hasDiscount: ({ __prices: rawPrices }) =>\n (rawPrices.current?.value ?? 0) <\n (rawPrices.previous?.value ?? rawPrices.current?.value ?? 0),\n },\n type: () => 'Default',\n modelName: () => 'Result',\n isWishlisted: () => false,\n tagging: {\n $path: 'tagging',\n $subSchema: {\n add2cart: ({ browseAdd2Cart }) => getTaggingInfoFromUrl(browseAdd2Cart),\n click: ({ browseProduct }) => getTaggingInfoFromUrl(browseProduct),\n checkout: ({ browseCheckout }) => getTaggingInfoFromUrl(browseCheckout),\n displayClick: ({ displayBrowseProduct }) =>\n getDisplayTaggingInfoFromUrl(displayBrowseProduct),\n },\n },\n})\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createMutableSchema } from '@empathyco/x-adapter';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the BooleanFilterSchema.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const booleanFilterSchema = createMutableSchema({
|
|
8
|
+
id: 'filter',
|
|
9
|
+
label: 'value',
|
|
10
|
+
facetId: (_, $context) => $context === null || $context === void 0 ? void 0 : $context.facetId,
|
|
11
|
+
selected: () => false,
|
|
12
|
+
modelName: () => 'BooleanFilter',
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=boolean-filter.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-filter.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/filters/boolean-filter.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAgC;IACpF,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAiB;IACrD,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;IACrB,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe;CACjC,CAAC,CAAA","sourcesContent":["import type { BooleanFilter } from '@empathyco/x-types'\nimport type { PlatformFilter } from '../../../types/models/facet.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the BooleanFilterSchema.\n *\n * @public\n */\nexport const booleanFilterSchema = createMutableSchema<PlatformFilter, BooleanFilter>({\n id: 'filter',\n label: 'value',\n facetId: (_, $context) => $context?.facetId as string,\n selected: () => false,\n modelName: () => 'BooleanFilter',\n})\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA","sourcesContent":["export * from './ai'\nexport * from './banner.schema'\nexport * from './facet.schema'\nexport * from './filters'\nexport * from './next-query.schema'\nexport * from './partial-results.schema'\nexport * from './promoted.schema'\nexport * from './redirection.schema'\nexport * from './related-prompt.schema'\nexport * from './related-tag.schema'\nexport * from './result.schema'\nexport * from './semantic-query.schema'\nexport * from './suggestion.schema'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA","sourcesContent":["export * from './ai'\nexport * from './banner.schema'\nexport * from './browse-result.schema'\nexport * from './facet.schema'\nexport * from './filters'\nexport * from './next-query.schema'\nexport * from './partial-results.schema'\nexport * from './promoted.schema'\nexport * from './redirection.schema'\nexport * from './related-prompt.schema'\nexport * from './related-tag.schema'\nexport * from './result.schema'\nexport * from './semantic-query.schema'\nexport * from './suggestion.schema'\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createMutableSchema } from '@empathyco/x-adapter';
|
|
2
2
|
import { getDisplayTaggingInfoFromUrl, getTaggingInfoFromUrl } from '../../mappers/url.utils';
|
|
3
3
|
import { bannerSchema } from '../models/banner.schema';
|
|
4
|
+
import { browseResultSchema } from '../models/browse-result.schema';
|
|
4
5
|
import { facetSchema } from '../models/facet.schema';
|
|
5
6
|
import { promotedSchema } from '../models/promoted.schema';
|
|
6
|
-
import { resultSchema } from '../models/result.schema';
|
|
7
7
|
import { statsSchema } from '../models/stats.schema';
|
|
8
8
|
/**
|
|
9
9
|
* Default implementation for the BrowseResponseSchema.
|
|
@@ -13,7 +13,7 @@ import { statsSchema } from '../models/stats.schema';
|
|
|
13
13
|
export const browseResponseSchema = createMutableSchema({
|
|
14
14
|
results: {
|
|
15
15
|
$path: 'catalog.content',
|
|
16
|
-
$subSchema:
|
|
16
|
+
$subSchema: browseResultSchema,
|
|
17
17
|
},
|
|
18
18
|
facets: {
|
|
19
19
|
$path: 'catalog.facets',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browse-response.schema.js","sourceRoot":"","sources":["../../../../src/schemas/responses/browse-response.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"browse-response.schema.js","sourceRoot":"","sources":["../../../../src/schemas/responses/browse-response.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAyC;IAC9F,OAAO,EAAE;QACP,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE,kBAAkB;KAC/B;IACD,MAAM,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,UAAU,EAAE,WAAW;KACxB;IACD,YAAY,EAAE,kBAAkB;IAChC,OAAO,EAAE;QACP,KAAK,EAAE,gBAAgB;QACvB,UAAU,EAAE,YAAY;KACzB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,cAAc;KAC3B;IACD,KAAK,EAAE;QACL,KAAK,EAAE,eAAe;QACtB,UAAU,EAAE,WAAW;KACxB;IACD,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,cAAc,CAAC,CAAA,EAAA;IACvF,oBAAoB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WACpC,OAAA,4BAA4B,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,qBAAqB,CAAC,CAAA,EAAA;CACxE,CAAC,CAAA","sourcesContent":["import type { BrowseResponse } from '@empathyco/x-types'\nimport type { PlatformBrowseResponse } from '../../types/responses/browse-response.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getDisplayTaggingInfoFromUrl, getTaggingInfoFromUrl } from '../../mappers/url.utils'\nimport { bannerSchema } from '../models/banner.schema'\nimport { browseResultSchema } from '../models/browse-result.schema'\nimport { facetSchema } from '../models/facet.schema'\nimport { promotedSchema } from '../models/promoted.schema'\nimport { statsSchema } from '../models/stats.schema'\n\n/**\n * Default implementation for the BrowseResponseSchema.\n *\n * @public\n */\nexport const browseResponseSchema = createMutableSchema<PlatformBrowseResponse, BrowseResponse>({\n results: {\n $path: 'catalog.content',\n $subSchema: browseResultSchema,\n },\n facets: {\n $path: 'catalog.facets',\n $subSchema: facetSchema,\n },\n totalResults: 'catalog.numFound',\n banners: {\n $path: 'banner.content',\n $subSchema: bannerSchema,\n },\n promoteds: {\n $path: 'promoted.content',\n $subSchema: promotedSchema,\n },\n stats: {\n $path: 'catalog.stats',\n $subSchema: statsSchema,\n },\n browseTagging: ({ catalog }) => getTaggingInfoFromUrl(catalog?.tagging?.browseCategory),\n displayBrowseTagging: ({ catalog }) =>\n getDisplayTaggingInfoFromUrl(catalog?.tagging?.displayBrowseCategory),\n})\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet.model.js","sourceRoot":"","sources":["../../../../src/types/models/facet.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { BooleanFilter, Facet, Filter } from '@empathyco/x-types'\n\n/**\n * Facet model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFacet {\n label: string\n facet: string\n type: PlatformFacetType\n values: PlatformFilter[]\n}\n\n/**\n * Facet type for the `platform` API. It can be: value, hierarchical or range.\n *\n * @public\n */\nexport type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range'\n\n/**\n * Filter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFilter {\n count: number\n filter: string\n id: string\n value: string\n}\n\n/**\n * HierarchicalFilter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformHierarchicalFilter extends PlatformFilter {\n children: PlatformFacet\n}\n\n/**\n * Hierarchical Facet model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFacet extends Facet {\n /** Model name to indicate the facet type. */\n modelName: 'HierarchicalFacet'\n /** Filters available for the facet. */\n filters: AdapterHierarchicalFilter[]\n}\n\n/**\n * Hierarchical Filter model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFilter extends BooleanFilter {\n /** Model name to indicate the filter type. */\n modelName: 'HierarchicalFilter'\n /** A unique id used to reference the parent filter or null if it hasn't. */\n parentId: Filter['id'] | null\n /** Descendants filters. */\n children?: AdapterHierarchicalFilter[]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"facet.model.js","sourceRoot":"","sources":["../../../../src/types/models/facet.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { BooleanFilter, Facet, Filter } from '@empathyco/x-types'\n\n/**\n * Facet model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFacet {\n label: string\n facet: string\n type: PlatformFacetType\n values: PlatformFilter[]\n}\n\n/**\n * Facet type for the `platform` API. It can be: value, hierarchical or range.\n *\n * @public\n */\nexport type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range' | 'boolean'\n\n/**\n * Filter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformFilter {\n count: number\n filter: string\n id: string\n value: string\n}\n\n/**\n * HierarchicalFilter model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformHierarchicalFilter extends PlatformFilter {\n children: PlatformFacet\n}\n\n/**\n * Hierarchical Facet model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFacet extends Facet {\n /** Model name to indicate the facet type. */\n modelName: 'HierarchicalFacet'\n /** Filters available for the facet. */\n filters: AdapterHierarchicalFilter[]\n}\n\n/**\n * Hierarchical Filter model used when combining search response mappers.\n *\n * @internal\n */\nexport interface AdapterHierarchicalFilter extends BooleanFilter {\n /** Model name to indicate the filter type. */\n modelName: 'HierarchicalFilter'\n /** A unique id used to reference the parent filter or null if it hasn't. */\n parentId: Filter['id'] | null\n /** Descendants filters. */\n children?: AdapterHierarchicalFilter[]\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagging.model.js","sourceRoot":"","sources":["../../../../src/types/models/tagging.model.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Tagging model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformTagging {\n add2cart: string\n checkout: string\n click: string\n displayClick: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tagging.model.js","sourceRoot":"","sources":["../../../../src/types/models/tagging.model.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Tagging model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformTagging {\n add2cart: string\n checkout: string\n click: string\n displayClick: string\n browseAdd2Cart: string\n browseProduct: string\n browseCheckout: string\n displayBrowseProduct: string\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Result } from '@empathyco/x-types';
|
|
2
|
+
import type { PlatformResult } from '../../types/models/result.model';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseResultSchema.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const browseResultSchema: import("@empathyco/x-adapter").MutableSchema<PlatformResult, Result>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BooleanFilter } from '@empathyco/x-types';
|
|
2
|
+
import type { PlatformFilter } from '../../../types/models/facet.model';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BooleanFilterSchema.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const booleanFilterSchema: import("@empathyco/x-adapter").MutableSchema<PlatformFilter, BooleanFilter>;
|
|
@@ -15,7 +15,7 @@ export interface PlatformFacet {
|
|
|
15
15
|
*
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
|
-
export type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range';
|
|
18
|
+
export type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range' | 'boolean';
|
|
19
19
|
/**
|
|
20
20
|
* Filter model for the `platform` API.
|
|
21
21
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-adapter-platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.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",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@empathyco/x-adapter": "8.1.8",
|
|
51
|
-
"@empathyco/x-types": "10.
|
|
51
|
+
"@empathyco/x-types": "10.8.0",
|
|
52
52
|
"@empathyco/x-utils": "1.0.9"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "9ef0ca691f4a51842f146bfed943a8c1bdf0ead4"
|
|
66
66
|
}
|
|
@@ -938,6 +938,56 @@
|
|
|
938
938
|
"endIndex": 8
|
|
939
939
|
}
|
|
940
940
|
},
|
|
941
|
+
{
|
|
942
|
+
"kind": "Variable",
|
|
943
|
+
"canonicalReference": "@empathyco/x-adapter-platform!browseResultSchema:var",
|
|
944
|
+
"docComment": "/**\n * Default implementation for the BrowseResultSchema.\n *\n * @public\n */\n",
|
|
945
|
+
"excerptTokens": [
|
|
946
|
+
{
|
|
947
|
+
"kind": "Content",
|
|
948
|
+
"text": "browseResultSchema: "
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"kind": "Content",
|
|
952
|
+
"text": "import(\"@empathyco/x-adapter\")."
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"kind": "Reference",
|
|
956
|
+
"text": "MutableSchema",
|
|
957
|
+
"canonicalReference": "@empathyco/x-adapter!MutableSchema:type"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"kind": "Content",
|
|
961
|
+
"text": "<"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"kind": "Reference",
|
|
965
|
+
"text": "PlatformResult",
|
|
966
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformResult:interface"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"kind": "Content",
|
|
970
|
+
"text": ", "
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"kind": "Reference",
|
|
974
|
+
"text": "Result",
|
|
975
|
+
"canonicalReference": "@empathyco/x-adapter-platform!Result:interface"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"kind": "Content",
|
|
979
|
+
"text": ">"
|
|
980
|
+
}
|
|
981
|
+
],
|
|
982
|
+
"fileUrlPath": "dist/types/schemas/models/browse-result.schema.d.ts",
|
|
983
|
+
"isReadonly": true,
|
|
984
|
+
"releaseTag": "Public",
|
|
985
|
+
"name": "browseResultSchema",
|
|
986
|
+
"variableTypeTokenRange": {
|
|
987
|
+
"startIndex": 1,
|
|
988
|
+
"endIndex": 8
|
|
989
|
+
}
|
|
990
|
+
},
|
|
941
991
|
{
|
|
942
992
|
"kind": "Variable",
|
|
943
993
|
"canonicalReference": "@empathyco/x-adapter-platform!experienceControlsEndpointAdapter:var",
|
|
@@ -4044,7 +4094,7 @@
|
|
|
4044
4094
|
},
|
|
4045
4095
|
{
|
|
4046
4096
|
"kind": "Content",
|
|
4047
|
-
"text": "'value' | 'hierarchical' | 'range' | 'editable-range'"
|
|
4097
|
+
"text": "'value' | 'hierarchical' | 'range' | 'editable-range' | 'boolean'"
|
|
4048
4098
|
},
|
|
4049
4099
|
{
|
|
4050
4100
|
"kind": "Content",
|
|
@@ -6794,6 +6844,87 @@
|
|
|
6794
6844
|
"endIndex": 2
|
|
6795
6845
|
}
|
|
6796
6846
|
},
|
|
6847
|
+
{
|
|
6848
|
+
"kind": "PropertySignature",
|
|
6849
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#browseAdd2Cart:member",
|
|
6850
|
+
"docComment": "",
|
|
6851
|
+
"excerptTokens": [
|
|
6852
|
+
{
|
|
6853
|
+
"kind": "Content",
|
|
6854
|
+
"text": "browseAdd2Cart: "
|
|
6855
|
+
},
|
|
6856
|
+
{
|
|
6857
|
+
"kind": "Content",
|
|
6858
|
+
"text": "string"
|
|
6859
|
+
},
|
|
6860
|
+
{
|
|
6861
|
+
"kind": "Content",
|
|
6862
|
+
"text": ";"
|
|
6863
|
+
}
|
|
6864
|
+
],
|
|
6865
|
+
"isReadonly": false,
|
|
6866
|
+
"isOptional": false,
|
|
6867
|
+
"releaseTag": "Public",
|
|
6868
|
+
"name": "browseAdd2Cart",
|
|
6869
|
+
"propertyTypeTokenRange": {
|
|
6870
|
+
"startIndex": 1,
|
|
6871
|
+
"endIndex": 2
|
|
6872
|
+
}
|
|
6873
|
+
},
|
|
6874
|
+
{
|
|
6875
|
+
"kind": "PropertySignature",
|
|
6876
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#browseCheckout:member",
|
|
6877
|
+
"docComment": "",
|
|
6878
|
+
"excerptTokens": [
|
|
6879
|
+
{
|
|
6880
|
+
"kind": "Content",
|
|
6881
|
+
"text": "browseCheckout: "
|
|
6882
|
+
},
|
|
6883
|
+
{
|
|
6884
|
+
"kind": "Content",
|
|
6885
|
+
"text": "string"
|
|
6886
|
+
},
|
|
6887
|
+
{
|
|
6888
|
+
"kind": "Content",
|
|
6889
|
+
"text": ";"
|
|
6890
|
+
}
|
|
6891
|
+
],
|
|
6892
|
+
"isReadonly": false,
|
|
6893
|
+
"isOptional": false,
|
|
6894
|
+
"releaseTag": "Public",
|
|
6895
|
+
"name": "browseCheckout",
|
|
6896
|
+
"propertyTypeTokenRange": {
|
|
6897
|
+
"startIndex": 1,
|
|
6898
|
+
"endIndex": 2
|
|
6899
|
+
}
|
|
6900
|
+
},
|
|
6901
|
+
{
|
|
6902
|
+
"kind": "PropertySignature",
|
|
6903
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#browseProduct:member",
|
|
6904
|
+
"docComment": "",
|
|
6905
|
+
"excerptTokens": [
|
|
6906
|
+
{
|
|
6907
|
+
"kind": "Content",
|
|
6908
|
+
"text": "browseProduct: "
|
|
6909
|
+
},
|
|
6910
|
+
{
|
|
6911
|
+
"kind": "Content",
|
|
6912
|
+
"text": "string"
|
|
6913
|
+
},
|
|
6914
|
+
{
|
|
6915
|
+
"kind": "Content",
|
|
6916
|
+
"text": ";"
|
|
6917
|
+
}
|
|
6918
|
+
],
|
|
6919
|
+
"isReadonly": false,
|
|
6920
|
+
"isOptional": false,
|
|
6921
|
+
"releaseTag": "Public",
|
|
6922
|
+
"name": "browseProduct",
|
|
6923
|
+
"propertyTypeTokenRange": {
|
|
6924
|
+
"startIndex": 1,
|
|
6925
|
+
"endIndex": 2
|
|
6926
|
+
}
|
|
6927
|
+
},
|
|
6797
6928
|
{
|
|
6798
6929
|
"kind": "PropertySignature",
|
|
6799
6930
|
"canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#checkout:member",
|
|
@@ -6848,6 +6979,33 @@
|
|
|
6848
6979
|
"endIndex": 2
|
|
6849
6980
|
}
|
|
6850
6981
|
},
|
|
6982
|
+
{
|
|
6983
|
+
"kind": "PropertySignature",
|
|
6984
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#displayBrowseProduct:member",
|
|
6985
|
+
"docComment": "",
|
|
6986
|
+
"excerptTokens": [
|
|
6987
|
+
{
|
|
6988
|
+
"kind": "Content",
|
|
6989
|
+
"text": "displayBrowseProduct: "
|
|
6990
|
+
},
|
|
6991
|
+
{
|
|
6992
|
+
"kind": "Content",
|
|
6993
|
+
"text": "string"
|
|
6994
|
+
},
|
|
6995
|
+
{
|
|
6996
|
+
"kind": "Content",
|
|
6997
|
+
"text": ";"
|
|
6998
|
+
}
|
|
6999
|
+
],
|
|
7000
|
+
"isReadonly": false,
|
|
7001
|
+
"isOptional": false,
|
|
7002
|
+
"releaseTag": "Public",
|
|
7003
|
+
"name": "displayBrowseProduct",
|
|
7004
|
+
"propertyTypeTokenRange": {
|
|
7005
|
+
"startIndex": 1,
|
|
7006
|
+
"endIndex": 2
|
|
7007
|
+
}
|
|
7008
|
+
},
|
|
6851
7009
|
{
|
|
6852
7010
|
"kind": "PropertySignature",
|
|
6853
7011
|
"canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#displayClick:member",
|
|
@@ -92,6 +92,11 @@ export const browseResponseMapper: Mapper<PlatformBrowseResponse, BrowseResponse
|
|
|
92
92
|
// @public
|
|
93
93
|
export const browseResponseSchema: MutableSchema<PlatformBrowseResponse, BrowseResponse>;
|
|
94
94
|
|
|
95
|
+
// Warning: (ae-forgotten-export) The symbol "Result" needs to be exported by the entry point index.d.ts
|
|
96
|
+
//
|
|
97
|
+
// @public
|
|
98
|
+
export const browseResultSchema: MutableSchema<PlatformResult, Result>;
|
|
99
|
+
|
|
95
100
|
// Warning: (ae-forgotten-export) The symbol "ExperienceControlsRequest" needs to be exported by the entry point index.d.ts
|
|
96
101
|
// Warning: (ae-forgotten-export) The symbol "ExperienceControlsResponse" needs to be exported by the entry point index.d.ts
|
|
97
102
|
//
|
|
@@ -384,7 +389,7 @@ export interface PlatformFacetsResponse {
|
|
|
384
389
|
}
|
|
385
390
|
|
|
386
391
|
// @public
|
|
387
|
-
export type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range';
|
|
392
|
+
export type PlatformFacetType = 'value' | 'hierarchical' | 'range' | 'editable-range' | 'boolean';
|
|
388
393
|
|
|
389
394
|
// @public
|
|
390
395
|
export interface PlatformFilter {
|
|
@@ -697,10 +702,18 @@ export interface PlatformTagging {
|
|
|
697
702
|
// (undocumented)
|
|
698
703
|
add2cart: string;
|
|
699
704
|
// (undocumented)
|
|
705
|
+
browseAdd2Cart: string;
|
|
706
|
+
// (undocumented)
|
|
707
|
+
browseCheckout: string;
|
|
708
|
+
// (undocumented)
|
|
709
|
+
browseProduct: string;
|
|
710
|
+
// (undocumented)
|
|
700
711
|
checkout: string;
|
|
701
712
|
// (undocumented)
|
|
702
713
|
click: string;
|
|
703
714
|
// (undocumented)
|
|
715
|
+
displayBrowseProduct: string;
|
|
716
|
+
// (undocumented)
|
|
704
717
|
displayClick: string;
|
|
705
718
|
}
|
|
706
719
|
|
|
@@ -853,10 +866,6 @@ export const taggingEndpointAdapter: ExtendableEndpointAdapter<TaggingRequest, v
|
|
|
853
866
|
// @public
|
|
854
867
|
export const taggingRequestMapper: Mapper<TaggingRequest, any>;
|
|
855
868
|
|
|
856
|
-
// Warnings were encountered during analysis:
|
|
857
|
-
//
|
|
858
|
-
// dist/types/types/requests/ai/suggestions-search-request.model.d.ts:18:9 - (ae-forgotten-export) The symbol "Result" needs to be exported by the entry point index.d.ts
|
|
859
|
-
|
|
860
869
|
// (No @packageDocumentation comment for this package)
|
|
861
870
|
|
|
862
871
|
```
|