@empathyco/x-adapter-platform 1.4.3 → 1.6.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/endpoint-adapters/browse.endpoint-adapter.js +24 -0
- package/dist/cjs/endpoint-adapters/browse.endpoint-adapter.js.map +1 -0
- package/dist/cjs/endpoint-adapters/index.js +1 -0
- package/dist/cjs/endpoint-adapters/index.js.map +1 -1
- package/dist/cjs/mappers/requests/browse-request.mapper.js +12 -0
- package/dist/cjs/mappers/requests/browse-request.mapper.js.map +1 -0
- package/dist/cjs/mappers/requests/index.js +1 -0
- package/dist/cjs/mappers/requests/index.js.map +1 -1
- package/dist/cjs/mappers/responses/browse-response.mapper.js +12 -0
- package/dist/cjs/mappers/responses/browse-response.mapper.js.map +1 -0
- package/dist/cjs/mappers/responses/index.js +1 -0
- package/dist/cjs/mappers/responses/index.js.map +1 -1
- package/dist/cjs/schemas/models/facet.schema.js +1 -1
- package/dist/cjs/schemas/models/facet.schema.js.map +1 -1
- package/dist/cjs/schemas/requests/browse-request.schema.js +21 -0
- package/dist/cjs/schemas/requests/browse-request.schema.js.map +1 -0
- package/dist/cjs/schemas/requests/index.js +1 -0
- package/dist/cjs/schemas/requests/index.js.map +1 -1
- package/dist/cjs/schemas/responses/browse-response.schema.js +41 -0
- package/dist/cjs/schemas/responses/browse-response.schema.js.map +1 -0
- package/dist/cjs/schemas/responses/index.js +1 -0
- package/dist/cjs/schemas/responses/index.js.map +1 -1
- package/dist/cjs/types/models/facet.model.js.map +1 -1
- package/dist/cjs/types/requests/browse-request.model.js +3 -0
- package/dist/cjs/types/requests/browse-request.model.js.map +1 -0
- package/dist/cjs/types/requests/request.types.js.map +1 -1
- package/dist/cjs/types/responses/browse-response.model.js +3 -0
- package/dist/cjs/types/responses/browse-response.model.js.map +1 -0
- package/dist/esm/endpoint-adapters/browse.endpoint-adapter.js +21 -0
- package/dist/esm/endpoint-adapters/browse.endpoint-adapter.js.map +1 -0
- package/dist/esm/endpoint-adapters/index.js +1 -0
- package/dist/esm/endpoint-adapters/index.js.map +1 -1
- package/dist/esm/mappers/requests/browse-request.mapper.js +9 -0
- package/dist/esm/mappers/requests/browse-request.mapper.js.map +1 -0
- package/dist/esm/mappers/requests/index.js +1 -0
- package/dist/esm/mappers/requests/index.js.map +1 -1
- package/dist/esm/mappers/responses/browse-response.mapper.js +9 -0
- package/dist/esm/mappers/responses/browse-response.mapper.js.map +1 -0
- package/dist/esm/mappers/responses/index.js +1 -0
- package/dist/esm/mappers/responses/index.js.map +1 -1
- package/dist/esm/schemas/models/facet.schema.js +1 -1
- package/dist/esm/schemas/models/facet.schema.js.map +1 -1
- package/dist/esm/schemas/requests/browse-request.schema.js +18 -0
- package/dist/esm/schemas/requests/browse-request.schema.js.map +1 -0
- package/dist/esm/schemas/requests/index.js +1 -0
- package/dist/esm/schemas/requests/index.js.map +1 -1
- package/dist/esm/schemas/responses/browse-response.schema.js +38 -0
- package/dist/esm/schemas/responses/browse-response.schema.js.map +1 -0
- package/dist/esm/schemas/responses/index.js +1 -0
- package/dist/esm/schemas/responses/index.js.map +1 -1
- package/dist/esm/types/models/facet.model.js.map +1 -1
- package/dist/esm/types/requests/browse-request.model.js +2 -0
- package/dist/esm/types/requests/browse-request.model.js.map +1 -0
- package/dist/esm/types/requests/request.types.js.map +1 -1
- package/dist/esm/types/responses/browse-response.model.js +2 -0
- package/dist/esm/types/responses/browse-response.model.js.map +1 -0
- package/dist/types/endpoint-adapters/browse.endpoint-adapter.d.ts +7 -0
- package/dist/types/endpoint-adapters/index.d.ts +1 -0
- package/dist/types/mappers/requests/browse-request.mapper.d.ts +8 -0
- package/dist/types/mappers/requests/index.d.ts +1 -0
- package/dist/types/mappers/responses/browse-response.mapper.d.ts +8 -0
- package/dist/types/mappers/responses/index.d.ts +1 -0
- package/dist/types/schemas/requests/browse-request.schema.d.ts +8 -0
- package/dist/types/schemas/requests/index.d.ts +1 -0
- package/dist/types/schemas/responses/browse-response.schema.d.ts +8 -0
- package/dist/types/schemas/responses/index.d.ts +1 -0
- package/dist/types/types/models/facet.model.d.ts +1 -0
- package/dist/types/types/requests/browse-request.model.d.ts +8 -0
- package/dist/types/types/requests/request.types.d.ts +9 -0
- package/dist/types/types/responses/browse-response.model.d.ts +31 -0
- package/package.json +3 -3
- package/report/x-adapter-platform.api.json +277 -0
- package/report/x-adapter-platform.api.md +24 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browseEndpointAdapter = void 0;
|
|
4
|
+
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
|
+
const browse_request_mapper_1 = require("../mappers/requests/browse-request.mapper");
|
|
6
|
+
const browse_response_mapper_1 = require("../mappers/responses/browse-response.mapper");
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
/**
|
|
9
|
+
* Default adapter for the browse endpoint.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
exports.browseEndpointAdapter = (0, x_adapter_1.endpointAdapterFactory)({
|
|
14
|
+
endpoint: from => (0, x_adapter_1.interpolate)(`${(0, utils_1.getSearchServiceUrl)(from)}/query/{extraParams.instance}/browse`, from),
|
|
15
|
+
requestMapper: browse_request_mapper_1.browseRequestMapper,
|
|
16
|
+
responseMapper: browse_response_mapper_1.browseResponseMapper,
|
|
17
|
+
defaultRequestOptions: {
|
|
18
|
+
id: 'browse',
|
|
19
|
+
parameters: {
|
|
20
|
+
internal: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=browse.endpoint-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse.endpoint-adapter.js","sourceRoot":"","sources":["../../../src/endpoint-adapters/browse.endpoint-adapter.ts"],"names":[],"mappings":";;;AACA,oDAA0E;AAC1E,qFAA+E;AAC/E,wFAAkF;AAClF,mCAA6C;AAE7C;;;;GAIG;AACU,QAAA,qBAAqB,GAAG,IAAA,kCAAsB,EAAgC;IACzF,QAAQ,EAAE,IAAI,CAAC,EAAE,CACf,IAAA,uBAAW,EAAC,GAAG,IAAA,2BAAmB,EAAC,IAAI,CAAC,sCAAsC,EAAE,IAAI,CAAC;IACvF,aAAa,EAAE,2CAAmB;IAClC,cAAc,EAAE,6CAAoB;IACpC,qBAAqB,EAAE;QACrB,EAAE,EAAE,QAAQ;QACZ,UAAU,EAAE;YACV,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC,CAAA","sourcesContent":["import type { BrowseRequest, BrowseResponse } from '@empathyco/x-types'\nimport { endpointAdapterFactory, interpolate } from '@empathyco/x-adapter'\nimport { browseRequestMapper } from '../mappers/requests/browse-request.mapper'\nimport { browseResponseMapper } from '../mappers/responses/browse-response.mapper'\nimport { getSearchServiceUrl } from './utils'\n\n/**\n * Default adapter for the browse endpoint.\n *\n * @public\n */\nexport const browseEndpointAdapter = endpointAdapterFactory<BrowseRequest, BrowseResponse>({\n endpoint: from =>\n interpolate(`${getSearchServiceUrl(from)}/query/{extraParams.instance}/browse`, from),\n requestMapper: browseRequestMapper,\n responseMapper: browseResponseMapper,\n defaultRequestOptions: {\n id: 'browse',\n parameters: {\n internal: true,\n },\n },\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/suggestions-search.endpoint-adapter"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./ai/suggestions.endpoint-adapter"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./browse.endpoint-adapter"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./experience-controls.endpoint-adapter"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./facets.endpoint-adapter"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./identifier-results.endpoint-adapter"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/endpoint-adapters/index.ts"],"names":[],"mappings":";;;AAAA,mFAAwD;AACxD,4EAAiD;AACjD,iFAAsD;AACtD,oEAAyC;AACzC,gFAAqD;AACrD,0EAA+C;AAC/C,8EAAmD;AACnD,+EAAoD;AACpD,6EAAkD;AAClD,6EAAkD;AAClD,0EAA+C;AAC/C,oEAAyC;AACzC,8EAAmD;AACnD,qEAA0C","sourcesContent":["export * from './ai/suggestions-search.endpoint-adapter'\nexport * from './ai/suggestions.endpoint-adapter'\nexport * from './experience-controls.endpoint-adapter'\nexport * from './facets.endpoint-adapter'\nexport * from './identifier-results.endpoint-adapter'\nexport * from './next-queries.endpoint-adapter'\nexport * from './popular-searches.endpoint-adapter'\nexport * from './query-suggestions.endpoint-adapter'\nexport * from './recommendations.endpoint-adapter'\nexport * from './related-prompts.endpoint-adapter'\nexport * from './related-tags.endpoint-adapter'\nexport * from './search.endpoint-adapter'\nexport * from './semantic-queries.endpoint-adapter'\nexport * from './tagging.endpoint-adapter'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/endpoint-adapters/index.ts"],"names":[],"mappings":";;;AAAA,mFAAwD;AACxD,4EAAiD;AACjD,oEAAyC;AACzC,iFAAsD;AACtD,oEAAyC;AACzC,gFAAqD;AACrD,0EAA+C;AAC/C,8EAAmD;AACnD,+EAAoD;AACpD,6EAAkD;AAClD,6EAAkD;AAClD,0EAA+C;AAC/C,oEAAyC;AACzC,8EAAmD;AACnD,qEAA0C","sourcesContent":["export * from './ai/suggestions-search.endpoint-adapter'\nexport * from './ai/suggestions.endpoint-adapter'\nexport * from './browse.endpoint-adapter'\nexport * from './experience-controls.endpoint-adapter'\nexport * from './facets.endpoint-adapter'\nexport * from './identifier-results.endpoint-adapter'\nexport * from './next-queries.endpoint-adapter'\nexport * from './popular-searches.endpoint-adapter'\nexport * from './query-suggestions.endpoint-adapter'\nexport * from './recommendations.endpoint-adapter'\nexport * from './related-prompts.endpoint-adapter'\nexport * from './related-tags.endpoint-adapter'\nexport * from './search.endpoint-adapter'\nexport * from './semantic-queries.endpoint-adapter'\nexport * from './tagging.endpoint-adapter'\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browseRequestMapper = void 0;
|
|
4
|
+
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
|
+
const browse_request_schema_1 = require("../../schemas/requests/browse-request.schema");
|
|
6
|
+
/**
|
|
7
|
+
* Default implementation for the BrowseRequestMapper.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
exports.browseRequestMapper = (0, x_adapter_1.schemaMapperFactory)(browse_request_schema_1.browseRequestSchema);
|
|
12
|
+
//# sourceMappingURL=browse-request.mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-request.mapper.js","sourceRoot":"","sources":["../../../../src/mappers/requests/browse-request.mapper.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,wFAAkF;AAElF;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,IAAA,+BAAmB,EACpD,2CAAmB,CACpB,CAAA","sourcesContent":["import type { BrowseRequest } from '@empathyco/x-types'\nimport type { PlatformBrowseRequest } from '../../types/requests/browse-request.model'\nimport { schemaMapperFactory } from '@empathyco/x-adapter'\nimport { browseRequestSchema } from '../../schemas/requests/browse-request.schema'\n\n/**\n * Default implementation for the BrowseRequestMapper.\n *\n * @public\n */\nexport const browseRequestMapper = schemaMapperFactory<BrowseRequest, PlatformBrowseRequest>(\n browseRequestSchema,\n)\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./ai"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./browse-request.mapper"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./experience-controls-request.mapper"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./identifier-results-request.mapper"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./next-queries-request.mapper"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/requests/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,+EAAoD;AACpD,8EAAmD;AACnD,wEAA6C;AAC7C,4EAAiD;AACjD,6EAAkD;AAClD,2EAAgD;AAChD,2EAAgD;AAChD,wEAA6C;AAC7C,kEAAuC;AACvC,4EAAiD;AACjD,mEAAwC","sourcesContent":["export * from './ai'\nexport * from './experience-controls-request.mapper'\nexport * from './identifier-results-request.mapper'\nexport * from './next-queries-request.mapper'\nexport * from './popular-searches-request.mapper'\nexport * from './query-suggestions-request.mapper'\nexport * from './recommendations-request.mapper'\nexport * from './related-prompts-request.mapper'\nexport * from './related-tags-request.mapper'\nexport * from './search-request.mapper'\nexport * from './semantic-queries-request.mapper'\nexport * from './tagging-request.mapper'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/requests/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,kEAAuC;AACvC,+EAAoD;AACpD,8EAAmD;AACnD,wEAA6C;AAC7C,4EAAiD;AACjD,6EAAkD;AAClD,2EAAgD;AAChD,2EAAgD;AAChD,wEAA6C;AAC7C,kEAAuC;AACvC,4EAAiD;AACjD,mEAAwC","sourcesContent":["export * from './ai'\nexport * from './browse-request.mapper'\nexport * from './experience-controls-request.mapper'\nexport * from './identifier-results-request.mapper'\nexport * from './next-queries-request.mapper'\nexport * from './popular-searches-request.mapper'\nexport * from './query-suggestions-request.mapper'\nexport * from './recommendations-request.mapper'\nexport * from './related-prompts-request.mapper'\nexport * from './related-tags-request.mapper'\nexport * from './search-request.mapper'\nexport * from './semantic-queries-request.mapper'\nexport * from './tagging-request.mapper'\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browseResponseMapper = void 0;
|
|
4
|
+
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
|
+
const browse_response_schema_1 = require("../../schemas/responses/browse-response.schema");
|
|
6
|
+
/**
|
|
7
|
+
* Default implementation for the BrowseResponseMapper.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
exports.browseResponseMapper = (0, x_adapter_1.schemaMapperFactory)(browse_response_schema_1.browseResponseSchema);
|
|
12
|
+
//# sourceMappingURL=browse-response.mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-response.mapper.js","sourceRoot":"","sources":["../../../../src/mappers/responses/browse-response.mapper.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,2FAAqF;AAErF;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,IAAA,+BAAmB,EACrD,6CAAoB,CACrB,CAAA","sourcesContent":["import type { BrowseResponse } from '@empathyco/x-types'\nimport type { PlatformBrowseResponse } from '../../types/responses/browse-response.model'\nimport { schemaMapperFactory } from '@empathyco/x-adapter'\nimport { browseResponseSchema } from '../../schemas/responses/browse-response.schema'\n\n/**\n * Default implementation for the BrowseResponseMapper.\n *\n * @public\n */\nexport const browseResponseMapper = schemaMapperFactory<PlatformBrowseResponse, BrowseResponse>(\n browseResponseSchema,\n)\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./ai"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./browse-response.mapper"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./experience-controls-response.mapper"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./facets-response.mapper"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./identifier-results-response.mapper"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/responses/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,gFAAqD;AACrD,mEAAwC;AACxC,+EAAoD;AACpD,yEAA8C;AAC9C,6EAAkD;AAClD,8EAAmD;AACnD,4EAAiD;AACjD,4EAAiD;AACjD,yEAA8C;AAC9C,mEAAwC;AACxC,6EAAkD","sourcesContent":["export * from './ai'\nexport * from './experience-controls-response.mapper'\nexport * from './facets-response.mapper'\nexport * from './identifier-results-response.mapper'\nexport * from './next-queries-response.mapper'\nexport * from './popular-searches-response.mapper'\nexport * from './query-suggestions-response.mapper'\nexport * from './recommendations-response.mapper'\nexport * from './related-prompts-response.mapper'\nexport * from './related-tags-response.mapper'\nexport * from './search-response.mapper'\nexport * from './semantic-queries-response.mapper'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/responses/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,mEAAwC;AACxC,gFAAqD;AACrD,mEAAwC;AACxC,+EAAoD;AACpD,yEAA8C;AAC9C,6EAAkD;AAClD,8EAAmD;AACnD,4EAAiD;AACjD,4EAAiD;AACjD,yEAA8C;AAC9C,mEAAwC;AACxC,6EAAkD","sourcesContent":["export * from './ai'\nexport * from './browse-response.mapper'\nexport * from './experience-controls-response.mapper'\nexport * from './facets-response.mapper'\nexport * from './identifier-results-response.mapper'\nexport * from './next-queries-response.mapper'\nexport * from './popular-searches-response.mapper'\nexport * from './query-suggestions-response.mapper'\nexport * from './recommendations-response.mapper'\nexport * from './related-prompts-response.mapper'\nexport * from './related-tags-response.mapper'\nexport * from './search-response.mapper'\nexport * from './semantic-queries-response.mapper'\n"]}
|
|
@@ -10,7 +10,7 @@ const utils_1 = require("../facets/utils");
|
|
|
10
10
|
*/
|
|
11
11
|
exports.facetSchema = (0, x_adapter_1.createMutableSchema)({
|
|
12
12
|
id: 'facet',
|
|
13
|
-
label: '
|
|
13
|
+
label: 'label',
|
|
14
14
|
// eslint-disable-next-line ts/no-unsafe-return
|
|
15
15
|
modelName: ({ type }) => (0, utils_1.getFacetConfig)(type).modelName,
|
|
16
16
|
filters: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":";;;AAOA,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 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\n>({\n id: 'facet',\n label: '
|
|
1
|
+
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":";;;AAOA,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 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\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"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browseRequestSchema = void 0;
|
|
4
|
+
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
|
+
const filter_utils_1 = require("../../mappers/filter.utils");
|
|
6
|
+
/**
|
|
7
|
+
* Default implementation for the BrowseRequestSchema.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
exports.browseRequestSchema = (0, x_adapter_1.createMutableSchema)({
|
|
12
|
+
browseField: 'browseField',
|
|
13
|
+
browseValue: 'browseValue',
|
|
14
|
+
origin: 'origin',
|
|
15
|
+
start: 'start',
|
|
16
|
+
rows: 'rows',
|
|
17
|
+
sort: 'sort',
|
|
18
|
+
filter: ({ filters }) => (0, filter_utils_1.mapFilters)(filters),
|
|
19
|
+
extraParams: 'extraParams',
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=browse-request.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-request.schema.js","sourceRoot":"","sources":["../../../../src/schemas/requests/browse-request.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,6DAAuD;AAEvD;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,IAAA,+BAAmB,EAAuC;IAC3F,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAA,yBAAU,EAAC,OAAO,CAAC;IAC5C,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAA","sourcesContent":["import type { BrowseRequest } from '@empathyco/x-types'\nimport type { PlatformBrowseRequest } from '../../types/requests/browse-request.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { mapFilters } from '../../mappers/filter.utils'\n\n/**\n * Default implementation for the BrowseRequestSchema.\n *\n * @public\n */\nexport const browseRequestSchema = createMutableSchema<BrowseRequest, PlatformBrowseRequest>({\n browseField: 'browseField',\n browseValue: 'browseValue',\n origin: 'origin',\n start: 'start',\n rows: 'rows',\n sort: 'sort',\n filter: ({ filters }) => mapFilters(filters),\n extraParams: 'extraParams',\n})\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./ai"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./browse-request.schema"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./experience-controls-request.schema"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./facets-request.schema"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./identifier-results-request.schema"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/requests/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,+EAAoD;AACpD,kEAAuC;AACvC,8EAAmD;AACnD,wEAA6C;AAC7C,4EAAiD;AACjD,6EAAkD;AAClD,2EAAgD;AAChD,2EAAgD;AAChD,wEAA6C;AAC7C,kEAAuC;AACvC,4EAAiD","sourcesContent":["export * from './ai'\nexport * from './experience-controls-request.schema'\nexport * from './facets-request.schema'\nexport * from './identifier-results-request.schema'\nexport * from './next-queries-request.schema'\nexport * from './popular-searches-request.schema'\nexport * from './query-suggestions-request.schema'\nexport * from './recommendations-request.schema'\nexport * from './related-prompts-request.schema'\nexport * from './related-tags-request.schema'\nexport * from './search-request.schema'\nexport * from './semantic-queries-request.schema'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/requests/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,kEAAuC;AACvC,+EAAoD;AACpD,kEAAuC;AACvC,8EAAmD;AACnD,wEAA6C;AAC7C,4EAAiD;AACjD,6EAAkD;AAClD,2EAAgD;AAChD,2EAAgD;AAChD,wEAA6C;AAC7C,kEAAuC;AACvC,4EAAiD","sourcesContent":["export * from './ai'\nexport * from './browse-request.schema'\nexport * from './experience-controls-request.schema'\nexport * from './facets-request.schema'\nexport * from './identifier-results-request.schema'\nexport * from './next-queries-request.schema'\nexport * from './popular-searches-request.schema'\nexport * from './query-suggestions-request.schema'\nexport * from './recommendations-request.schema'\nexport * from './related-prompts-request.schema'\nexport * from './related-tags-request.schema'\nexport * from './search-request.schema'\nexport * from './semantic-queries-request.schema'\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browseResponseSchema = void 0;
|
|
4
|
+
const x_adapter_1 = require("@empathyco/x-adapter");
|
|
5
|
+
const url_utils_1 = require("../../mappers/url.utils");
|
|
6
|
+
const banner_schema_1 = require("../models/banner.schema");
|
|
7
|
+
const facet_schema_1 = require("../models/facet.schema");
|
|
8
|
+
const promoted_schema_1 = require("../models/promoted.schema");
|
|
9
|
+
const result_schema_1 = require("../models/result.schema");
|
|
10
|
+
const stats_schema_1 = require("../models/stats.schema");
|
|
11
|
+
/**
|
|
12
|
+
* Default implementation for the BrowseResponseSchema.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
exports.browseResponseSchema = (0, x_adapter_1.createMutableSchema)({
|
|
17
|
+
results: {
|
|
18
|
+
$path: 'catalog.content',
|
|
19
|
+
$subSchema: result_schema_1.resultSchema,
|
|
20
|
+
},
|
|
21
|
+
facets: {
|
|
22
|
+
$path: 'catalog.facets',
|
|
23
|
+
$subSchema: facet_schema_1.facetSchema,
|
|
24
|
+
},
|
|
25
|
+
totalResults: 'catalog.numFound',
|
|
26
|
+
banners: {
|
|
27
|
+
$path: 'banner.content',
|
|
28
|
+
$subSchema: banner_schema_1.bannerSchema,
|
|
29
|
+
},
|
|
30
|
+
promoteds: {
|
|
31
|
+
$path: 'promoted.content',
|
|
32
|
+
$subSchema: promoted_schema_1.promotedSchema,
|
|
33
|
+
},
|
|
34
|
+
stats: {
|
|
35
|
+
$path: 'catalog.stats',
|
|
36
|
+
$subSchema: stats_schema_1.statsSchema,
|
|
37
|
+
},
|
|
38
|
+
browseTagging: ({ catalog }) => { var _a; return (0, url_utils_1.getTaggingInfoFromUrl)((_a = catalog === null || catalog === void 0 ? void 0 : catalog.tagging) === null || _a === void 0 ? void 0 : _a.browseCategory); },
|
|
39
|
+
displayBrowseTagging: ({ catalog }) => { var _a; return (0, url_utils_1.getDisplayTaggingInfoFromUrl)((_a = catalog === null || catalog === void 0 ? void 0 : catalog.tagging) === null || _a === void 0 ? void 0 : _a.displayBrowseCategory); },
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=browse-response.schema.js.map
|
|
@@ -0,0 +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,2DAAsD;AACtD,yDAAoD;AAEpD;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,IAAA,+BAAmB,EAAyC;IAC9F,OAAO,EAAE;QACP,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE,4BAAY;KACzB;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 { facetSchema } from '../models/facet.schema'\nimport { promotedSchema } from '../models/promoted.schema'\nimport { resultSchema } from '../models/result.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: resultSchema,\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"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./ai"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./browse-response.schema"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./experience-controls-response.schema"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./identifier-results-response.schema"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./next-queries-response.schema"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/responses/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,gFAAqD;AACrD,+EAAoD;AACpD,yEAA8C;AAC9C,6EAAkD;AAClD,8EAAmD;AACnD,4EAAiD;AACjD,4EAAiD;AACjD,yEAA8C;AAC9C,mEAAwC;AACxC,6EAAkD","sourcesContent":["export * from './ai'\nexport * from './experience-controls-response.schema'\nexport * from './identifier-results-response.schema'\nexport * from './next-queries-response.schema'\nexport * from './popular-searches-response.schema'\nexport * from './query-suggestions-response.schema'\nexport * from './recommendations-response.schema'\nexport * from './related-prompts-response.schema'\nexport * from './related-tags-response.schema'\nexport * from './search-response.schema'\nexport * from './semantic-queries-response.schema'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/responses/index.ts"],"names":[],"mappings":";;;AAAA,+CAAoB;AACpB,mEAAwC;AACxC,gFAAqD;AACrD,+EAAoD;AACpD,yEAA8C;AAC9C,6EAAkD;AAClD,8EAAmD;AACnD,4EAAiD;AACjD,4EAAiD;AACjD,yEAA8C;AAC9C,mEAAwC;AACxC,6EAAkD","sourcesContent":["export * from './ai'\nexport * from './browse-response.schema'\nexport * from './experience-controls-response.schema'\nexport * from './identifier-results-response.schema'\nexport * from './next-queries-response.schema'\nexport * from './popular-searches-response.schema'\nexport * from './query-suggestions-response.schema'\nexport * from './recommendations-response.schema'\nexport * from './related-prompts-response.schema'\nexport * from './related-tags-response.schema'\nexport * from './search-response.schema'\nexport * from './semantic-queries-response.schema'\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 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'\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-request.model.js","sourceRoot":"","sources":["../../../../src/types/requests/browse-request.model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n PlatformBrowsableRequest,\n PlatformExtraParamsRequest,\n PlatformFilterableRequest,\n PlatformPageableRequest,\n PlatformSortableRequest,\n PlatformTrackableRequest,\n} from './request.types'\n\n/**\n * Request for the `browse` endpoint.\n *\n * @public\n */\nexport interface PlatformBrowseRequest\n extends\n PlatformBrowsableRequest,\n PlatformPageableRequest,\n PlatformFilterableRequest,\n PlatformTrackableRequest,\n PlatformSortableRequest,\n PlatformExtraParamsRequest {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.types.js","sourceRoot":"","sources":["../../../../src/types/requests/request.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interface for any `request` with `extra parameters`.\n *\n * @public\n */\nexport interface PlatformExtraParamsRequest {\n extraParams?: {\n [key: string]: unknown\n }\n}\n\n/**\n * Interface for any `request` with `pagination`.\n *\n * @public\n */\nexport interface PlatformPageableRequest {\n rows?: number\n start?: number\n}\n\n/**\n * Interface for any `request` with a `query` parameter.\n *\n * @public\n */\nexport interface PlatformQueryableRequest {\n query: string\n}\n\n/**\n * Interface for any `request` with `sorting`.\n *\n * @public\n */\nexport declare interface PlatformSortableRequest {\n sort?: string\n}\n\n/**\n * Interface for any `request` with `tagging`.\n *\n * @public\n */\nexport interface PlatformTrackableRequest {\n origin?: string\n}\n\n/**\n * Interface for any `request` with `filters`.\n *\n * @public\n */\nexport interface PlatformFilterableRequest {\n filter?: string[]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"request.types.js","sourceRoot":"","sources":["../../../../src/types/requests/request.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interface for any `request` with `extra parameters`.\n *\n * @public\n */\nexport interface PlatformExtraParamsRequest {\n extraParams?: {\n [key: string]: unknown\n }\n}\n\n/**\n * Interface for any `request` with `pagination`.\n *\n * @public\n */\nexport interface PlatformPageableRequest {\n rows?: number\n start?: number\n}\n\n/**\n * Interface for any `request` with a `query` parameter.\n *\n * @public\n */\nexport interface PlatformQueryableRequest {\n query: string\n}\n\n/**\n * Interface for any `request` with a `browseField` and `browseValue` parameters.\n *\n * @public\n */\nexport interface PlatformBrowsableRequest {\n browseField: string\n browseValue: string\n}\n\n/**\n * Interface for any `request` with `sorting`.\n *\n * @public\n */\nexport declare interface PlatformSortableRequest {\n sort?: string\n}\n\n/**\n * Interface for any `request` with `tagging`.\n *\n * @public\n */\nexport interface PlatformTrackableRequest {\n origin?: string\n}\n\n/**\n * Interface for any `request` with `filters`.\n *\n * @public\n */\nexport interface PlatformFilterableRequest {\n filter?: string[]\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-response.model.js","sourceRoot":"","sources":["../../../../src/types/responses/browse-response.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformFacet } from '../models/facet.model'\nimport type { PlatformBanner, PlatformPromoted } from '../models/index'\nimport type { PlatformResult } from '../models/result.model'\n\n/**\n * Response for the `browse` endpoint.\n *\n * @public\n */\nexport interface PlatformBrowseResponse {\n catalog: {\n content: PlatformResult[]\n facets: PlatformFacet[]\n numFound: number\n tagging: {\n browseCategory: string\n displayBrowseCategory: string\n }\n stats: {\n price: {\n min: number\n max: number\n }\n }\n }\n banner: {\n content: PlatformBanner[]\n }\n promoted: {\n content: PlatformPromoted[]\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { endpointAdapterFactory, interpolate } from '@empathyco/x-adapter';
|
|
2
|
+
import { browseRequestMapper } from '../mappers/requests/browse-request.mapper';
|
|
3
|
+
import { browseResponseMapper } from '../mappers/responses/browse-response.mapper';
|
|
4
|
+
import { getSearchServiceUrl } from './utils';
|
|
5
|
+
/**
|
|
6
|
+
* Default adapter for the browse endpoint.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export const browseEndpointAdapter = endpointAdapterFactory({
|
|
11
|
+
endpoint: from => interpolate(`${getSearchServiceUrl(from)}/query/{extraParams.instance}/browse`, from),
|
|
12
|
+
requestMapper: browseRequestMapper,
|
|
13
|
+
responseMapper: browseResponseMapper,
|
|
14
|
+
defaultRequestOptions: {
|
|
15
|
+
id: 'browse',
|
|
16
|
+
parameters: {
|
|
17
|
+
internal: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=browse.endpoint-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse.endpoint-adapter.js","sourceRoot":"","sources":["../../../src/endpoint-adapters/browse.endpoint-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAAsB,CAAgC;IACzF,QAAQ,EAAE,IAAI,CAAC,EAAE,CACf,WAAW,CAAC,GAAG,mBAAmB,CAAC,IAAI,CAAC,sCAAsC,EAAE,IAAI,CAAC;IACvF,aAAa,EAAE,mBAAmB;IAClC,cAAc,EAAE,oBAAoB;IACpC,qBAAqB,EAAE;QACrB,EAAE,EAAE,QAAQ;QACZ,UAAU,EAAE;YACV,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC,CAAA","sourcesContent":["import type { BrowseRequest, BrowseResponse } from '@empathyco/x-types'\nimport { endpointAdapterFactory, interpolate } from '@empathyco/x-adapter'\nimport { browseRequestMapper } from '../mappers/requests/browse-request.mapper'\nimport { browseResponseMapper } from '../mappers/responses/browse-response.mapper'\nimport { getSearchServiceUrl } from './utils'\n\n/**\n * Default adapter for the browse endpoint.\n *\n * @public\n */\nexport const browseEndpointAdapter = endpointAdapterFactory<BrowseRequest, BrowseResponse>({\n endpoint: from =>\n interpolate(`${getSearchServiceUrl(from)}/query/{extraParams.instance}/browse`, from),\n requestMapper: browseRequestMapper,\n responseMapper: browseResponseMapper,\n defaultRequestOptions: {\n id: 'browse',\n parameters: {\n internal: true,\n },\n },\n})\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './ai/suggestions-search.endpoint-adapter';
|
|
2
2
|
export * from './ai/suggestions.endpoint-adapter';
|
|
3
|
+
export * from './browse.endpoint-adapter';
|
|
3
4
|
export * from './experience-controls.endpoint-adapter';
|
|
4
5
|
export * from './facets.endpoint-adapter';
|
|
5
6
|
export * from './identifier-results.endpoint-adapter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/endpoint-adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAA;AACxD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,2BAA2B,CAAA;AACzC,cAAc,uCAAuC,CAAA;AACrD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qCAAqC,CAAA;AACnD,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,4BAA4B,CAAA","sourcesContent":["export * from './ai/suggestions-search.endpoint-adapter'\nexport * from './ai/suggestions.endpoint-adapter'\nexport * from './experience-controls.endpoint-adapter'\nexport * from './facets.endpoint-adapter'\nexport * from './identifier-results.endpoint-adapter'\nexport * from './next-queries.endpoint-adapter'\nexport * from './popular-searches.endpoint-adapter'\nexport * from './query-suggestions.endpoint-adapter'\nexport * from './recommendations.endpoint-adapter'\nexport * from './related-prompts.endpoint-adapter'\nexport * from './related-tags.endpoint-adapter'\nexport * from './search.endpoint-adapter'\nexport * from './semantic-queries.endpoint-adapter'\nexport * from './tagging.endpoint-adapter'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/endpoint-adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAA;AACxD,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,wCAAwC,CAAA;AACtD,cAAc,2BAA2B,CAAA;AACzC,cAAc,uCAAuC,CAAA;AACrD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qCAAqC,CAAA;AACnD,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,4BAA4B,CAAA","sourcesContent":["export * from './ai/suggestions-search.endpoint-adapter'\nexport * from './ai/suggestions.endpoint-adapter'\nexport * from './browse.endpoint-adapter'\nexport * from './experience-controls.endpoint-adapter'\nexport * from './facets.endpoint-adapter'\nexport * from './identifier-results.endpoint-adapter'\nexport * from './next-queries.endpoint-adapter'\nexport * from './popular-searches.endpoint-adapter'\nexport * from './query-suggestions.endpoint-adapter'\nexport * from './recommendations.endpoint-adapter'\nexport * from './related-prompts.endpoint-adapter'\nexport * from './related-tags.endpoint-adapter'\nexport * from './search.endpoint-adapter'\nexport * from './semantic-queries.endpoint-adapter'\nexport * from './tagging.endpoint-adapter'\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { schemaMapperFactory } from '@empathyco/x-adapter';
|
|
2
|
+
import { browseRequestSchema } from '../../schemas/requests/browse-request.schema';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseRequestMapper.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const browseRequestMapper = schemaMapperFactory(browseRequestSchema);
|
|
9
|
+
//# sourceMappingURL=browse-request.mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-request.mapper.js","sourceRoot":"","sources":["../../../../src/mappers/requests/browse-request.mapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAA;AAElF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CACpD,mBAAmB,CACpB,CAAA","sourcesContent":["import type { BrowseRequest } from '@empathyco/x-types'\nimport type { PlatformBrowseRequest } from '../../types/requests/browse-request.model'\nimport { schemaMapperFactory } from '@empathyco/x-adapter'\nimport { browseRequestSchema } from '../../schemas/requests/browse-request.schema'\n\n/**\n * Default implementation for the BrowseRequestMapper.\n *\n * @public\n */\nexport const browseRequestMapper = schemaMapperFactory<BrowseRequest, PlatformBrowseRequest>(\n browseRequestSchema,\n)\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/requests/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,sCAAsC,CAAA;AACpD,cAAc,qCAAqC,CAAA;AACnD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,mCAAmC,CAAA;AACjD,cAAc,0BAA0B,CAAA","sourcesContent":["export * from './ai'\nexport * from './experience-controls-request.mapper'\nexport * from './identifier-results-request.mapper'\nexport * from './next-queries-request.mapper'\nexport * from './popular-searches-request.mapper'\nexport * from './query-suggestions-request.mapper'\nexport * from './recommendations-request.mapper'\nexport * from './related-prompts-request.mapper'\nexport * from './related-tags-request.mapper'\nexport * from './search-request.mapper'\nexport * from './semantic-queries-request.mapper'\nexport * from './tagging-request.mapper'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/requests/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,yBAAyB,CAAA;AACvC,cAAc,sCAAsC,CAAA;AACpD,cAAc,qCAAqC,CAAA;AACnD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,mCAAmC,CAAA;AACjD,cAAc,0BAA0B,CAAA","sourcesContent":["export * from './ai'\nexport * from './browse-request.mapper'\nexport * from './experience-controls-request.mapper'\nexport * from './identifier-results-request.mapper'\nexport * from './next-queries-request.mapper'\nexport * from './popular-searches-request.mapper'\nexport * from './query-suggestions-request.mapper'\nexport * from './recommendations-request.mapper'\nexport * from './related-prompts-request.mapper'\nexport * from './related-tags-request.mapper'\nexport * from './search-request.mapper'\nexport * from './semantic-queries-request.mapper'\nexport * from './tagging-request.mapper'\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { schemaMapperFactory } from '@empathyco/x-adapter';
|
|
2
|
+
import { browseResponseSchema } from '../../schemas/responses/browse-response.schema';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseResponseMapper.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const browseResponseMapper = schemaMapperFactory(browseResponseSchema);
|
|
9
|
+
//# sourceMappingURL=browse-response.mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-response.mapper.js","sourceRoot":"","sources":["../../../../src/mappers/responses/browse-response.mapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAA;AAErF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,oBAAoB,CACrB,CAAA","sourcesContent":["import type { BrowseResponse } from '@empathyco/x-types'\nimport type { PlatformBrowseResponse } from '../../types/responses/browse-response.model'\nimport { schemaMapperFactory } from '@empathyco/x-adapter'\nimport { browseResponseSchema } from '../../schemas/responses/browse-response.schema'\n\n/**\n * Default implementation for the BrowseResponseMapper.\n *\n * @public\n */\nexport const browseResponseMapper = schemaMapperFactory<PlatformBrowseResponse, BrowseResponse>(\n browseResponseSchema,\n)\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/responses/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,uCAAuC,CAAA;AACrD,cAAc,0BAA0B,CAAA;AACxC,cAAc,sCAAsC,CAAA;AACpD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,oCAAoC,CAAA","sourcesContent":["export * from './ai'\nexport * from './experience-controls-response.mapper'\nexport * from './facets-response.mapper'\nexport * from './identifier-results-response.mapper'\nexport * from './next-queries-response.mapper'\nexport * from './popular-searches-response.mapper'\nexport * from './query-suggestions-response.mapper'\nexport * from './recommendations-response.mapper'\nexport * from './related-prompts-response.mapper'\nexport * from './related-tags-response.mapper'\nexport * from './search-response.mapper'\nexport * from './semantic-queries-response.mapper'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mappers/responses/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,0BAA0B,CAAA;AACxC,cAAc,uCAAuC,CAAA;AACrD,cAAc,0BAA0B,CAAA;AACxC,cAAc,sCAAsC,CAAA;AACpD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,oCAAoC,CAAA","sourcesContent":["export * from './ai'\nexport * from './browse-response.mapper'\nexport * from './experience-controls-response.mapper'\nexport * from './facets-response.mapper'\nexport * from './identifier-results-response.mapper'\nexport * from './next-queries-response.mapper'\nexport * from './popular-searches-response.mapper'\nexport * from './query-suggestions-response.mapper'\nexport * from './recommendations-response.mapper'\nexport * from './related-prompts-response.mapper'\nexport * from './related-tags-response.mapper'\nexport * from './search-response.mapper'\nexport * from './semantic-queries-response.mapper'\n"]}
|
|
@@ -7,7 +7,7 @@ import { getFacetConfig } from '../facets/utils';
|
|
|
7
7
|
*/
|
|
8
8
|
export const facetSchema = createMutableSchema({
|
|
9
9
|
id: 'facet',
|
|
10
|
-
label: '
|
|
10
|
+
label: 'label',
|
|
11
11
|
// eslint-disable-next-line ts/no-unsafe-return
|
|
12
12
|
modelName: ({ type }) => getFacetConfig(type).modelName,
|
|
13
13
|
filters: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":"AAOA,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 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\n>({\n id: 'facet',\n label: '
|
|
1
|
+
{"version":3,"file":"facet.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/facet.schema.ts"],"names":[],"mappings":"AAOA,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 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\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"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createMutableSchema } from '@empathyco/x-adapter';
|
|
2
|
+
import { mapFilters } from '../../mappers/filter.utils';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseRequestSchema.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const browseRequestSchema = createMutableSchema({
|
|
9
|
+
browseField: 'browseField',
|
|
10
|
+
browseValue: 'browseValue',
|
|
11
|
+
origin: 'origin',
|
|
12
|
+
start: 'start',
|
|
13
|
+
rows: 'rows',
|
|
14
|
+
sort: 'sort',
|
|
15
|
+
filter: ({ filters }) => mapFilters(filters),
|
|
16
|
+
extraParams: 'extraParams',
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=browse-request.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-request.schema.js","sourceRoot":"","sources":["../../../../src/schemas/requests/browse-request.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAuC;IAC3F,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IAC5C,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAA","sourcesContent":["import type { BrowseRequest } from '@empathyco/x-types'\nimport type { PlatformBrowseRequest } from '../../types/requests/browse-request.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { mapFilters } from '../../mappers/filter.utils'\n\n/**\n * Default implementation for the BrowseRequestSchema.\n *\n * @public\n */\nexport const browseRequestSchema = createMutableSchema<BrowseRequest, PlatformBrowseRequest>({\n browseField: 'browseField',\n browseValue: 'browseValue',\n origin: 'origin',\n start: 'start',\n rows: 'rows',\n sort: 'sort',\n filter: ({ filters }) => mapFilters(filters),\n extraParams: 'extraParams',\n})\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/requests/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,sCAAsC,CAAA;AACpD,cAAc,yBAAyB,CAAA;AACvC,cAAc,qCAAqC,CAAA;AACnD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,mCAAmC,CAAA","sourcesContent":["export * from './ai'\nexport * from './experience-controls-request.schema'\nexport * from './facets-request.schema'\nexport * from './identifier-results-request.schema'\nexport * from './next-queries-request.schema'\nexport * from './popular-searches-request.schema'\nexport * from './query-suggestions-request.schema'\nexport * from './recommendations-request.schema'\nexport * from './related-prompts-request.schema'\nexport * from './related-tags-request.schema'\nexport * from './search-request.schema'\nexport * from './semantic-queries-request.schema'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/requests/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,yBAAyB,CAAA;AACvC,cAAc,sCAAsC,CAAA;AACpD,cAAc,yBAAyB,CAAA;AACvC,cAAc,qCAAqC,CAAA;AACnD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,mCAAmC,CAAA","sourcesContent":["export * from './ai'\nexport * from './browse-request.schema'\nexport * from './experience-controls-request.schema'\nexport * from './facets-request.schema'\nexport * from './identifier-results-request.schema'\nexport * from './next-queries-request.schema'\nexport * from './popular-searches-request.schema'\nexport * from './query-suggestions-request.schema'\nexport * from './recommendations-request.schema'\nexport * from './related-prompts-request.schema'\nexport * from './related-tags-request.schema'\nexport * from './search-request.schema'\nexport * from './semantic-queries-request.schema'\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createMutableSchema } from '@empathyco/x-adapter';
|
|
2
|
+
import { getDisplayTaggingInfoFromUrl, getTaggingInfoFromUrl } from '../../mappers/url.utils';
|
|
3
|
+
import { bannerSchema } from '../models/banner.schema';
|
|
4
|
+
import { facetSchema } from '../models/facet.schema';
|
|
5
|
+
import { promotedSchema } from '../models/promoted.schema';
|
|
6
|
+
import { resultSchema } from '../models/result.schema';
|
|
7
|
+
import { statsSchema } from '../models/stats.schema';
|
|
8
|
+
/**
|
|
9
|
+
* Default implementation for the BrowseResponseSchema.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export const browseResponseSchema = createMutableSchema({
|
|
14
|
+
results: {
|
|
15
|
+
$path: 'catalog.content',
|
|
16
|
+
$subSchema: resultSchema,
|
|
17
|
+
},
|
|
18
|
+
facets: {
|
|
19
|
+
$path: 'catalog.facets',
|
|
20
|
+
$subSchema: facetSchema,
|
|
21
|
+
},
|
|
22
|
+
totalResults: 'catalog.numFound',
|
|
23
|
+
banners: {
|
|
24
|
+
$path: 'banner.content',
|
|
25
|
+
$subSchema: bannerSchema,
|
|
26
|
+
},
|
|
27
|
+
promoteds: {
|
|
28
|
+
$path: 'promoted.content',
|
|
29
|
+
$subSchema: promotedSchema,
|
|
30
|
+
},
|
|
31
|
+
stats: {
|
|
32
|
+
$path: 'catalog.stats',
|
|
33
|
+
$subSchema: statsSchema,
|
|
34
|
+
},
|
|
35
|
+
browseTagging: ({ catalog }) => { var _a; return getTaggingInfoFromUrl((_a = catalog === null || catalog === void 0 ? void 0 : catalog.tagging) === null || _a === void 0 ? void 0 : _a.browseCategory); },
|
|
36
|
+
displayBrowseTagging: ({ catalog }) => { var _a; return getDisplayTaggingInfoFromUrl((_a = catalog === null || catalog === void 0 ? void 0 : catalog.tagging) === null || _a === void 0 ? void 0 : _a.displayBrowseCategory); },
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=browse-response.schema.js.map
|
|
@@ -0,0 +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,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,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,YAAY;KACzB;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 { facetSchema } from '../models/facet.schema'\nimport { promotedSchema } from '../models/promoted.schema'\nimport { resultSchema } from '../models/result.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: resultSchema,\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":"index.js","sourceRoot":"","sources":["../../../../src/schemas/responses/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,uCAAuC,CAAA;AACrD,cAAc,sCAAsC,CAAA;AACpD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,oCAAoC,CAAA","sourcesContent":["export * from './ai'\nexport * from './experience-controls-response.schema'\nexport * from './identifier-results-response.schema'\nexport * from './next-queries-response.schema'\nexport * from './popular-searches-response.schema'\nexport * from './query-suggestions-response.schema'\nexport * from './recommendations-response.schema'\nexport * from './related-prompts-response.schema'\nexport * from './related-tags-response.schema'\nexport * from './search-response.schema'\nexport * from './semantic-queries-response.schema'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/responses/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,0BAA0B,CAAA;AACxC,cAAc,uCAAuC,CAAA;AACrD,cAAc,sCAAsC,CAAA;AACpD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,oCAAoC,CAAA","sourcesContent":["export * from './ai'\nexport * from './browse-response.schema'\nexport * from './experience-controls-response.schema'\nexport * from './identifier-results-response.schema'\nexport * from './next-queries-response.schema'\nexport * from './popular-searches-response.schema'\nexport * from './query-suggestions-response.schema'\nexport * from './recommendations-response.schema'\nexport * from './related-prompts-response.schema'\nexport * from './related-tags-response.schema'\nexport * from './search-response.schema'\nexport * from './semantic-queries-response.schema'\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 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'\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-request.model.js","sourceRoot":"","sources":["../../../../src/types/requests/browse-request.model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n PlatformBrowsableRequest,\n PlatformExtraParamsRequest,\n PlatformFilterableRequest,\n PlatformPageableRequest,\n PlatformSortableRequest,\n PlatformTrackableRequest,\n} from './request.types'\n\n/**\n * Request for the `browse` endpoint.\n *\n * @public\n */\nexport interface PlatformBrowseRequest\n extends\n PlatformBrowsableRequest,\n PlatformPageableRequest,\n PlatformFilterableRequest,\n PlatformTrackableRequest,\n PlatformSortableRequest,\n PlatformExtraParamsRequest {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.types.js","sourceRoot":"","sources":["../../../../src/types/requests/request.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interface for any `request` with `extra parameters`.\n *\n * @public\n */\nexport interface PlatformExtraParamsRequest {\n extraParams?: {\n [key: string]: unknown\n }\n}\n\n/**\n * Interface for any `request` with `pagination`.\n *\n * @public\n */\nexport interface PlatformPageableRequest {\n rows?: number\n start?: number\n}\n\n/**\n * Interface for any `request` with a `query` parameter.\n *\n * @public\n */\nexport interface PlatformQueryableRequest {\n query: string\n}\n\n/**\n * Interface for any `request` with `sorting`.\n *\n * @public\n */\nexport declare interface PlatformSortableRequest {\n sort?: string\n}\n\n/**\n * Interface for any `request` with `tagging`.\n *\n * @public\n */\nexport interface PlatformTrackableRequest {\n origin?: string\n}\n\n/**\n * Interface for any `request` with `filters`.\n *\n * @public\n */\nexport interface PlatformFilterableRequest {\n filter?: string[]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"request.types.js","sourceRoot":"","sources":["../../../../src/types/requests/request.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interface for any `request` with `extra parameters`.\n *\n * @public\n */\nexport interface PlatformExtraParamsRequest {\n extraParams?: {\n [key: string]: unknown\n }\n}\n\n/**\n * Interface for any `request` with `pagination`.\n *\n * @public\n */\nexport interface PlatformPageableRequest {\n rows?: number\n start?: number\n}\n\n/**\n * Interface for any `request` with a `query` parameter.\n *\n * @public\n */\nexport interface PlatformQueryableRequest {\n query: string\n}\n\n/**\n * Interface for any `request` with a `browseField` and `browseValue` parameters.\n *\n * @public\n */\nexport interface PlatformBrowsableRequest {\n browseField: string\n browseValue: string\n}\n\n/**\n * Interface for any `request` with `sorting`.\n *\n * @public\n */\nexport declare interface PlatformSortableRequest {\n sort?: string\n}\n\n/**\n * Interface for any `request` with `tagging`.\n *\n * @public\n */\nexport interface PlatformTrackableRequest {\n origin?: string\n}\n\n/**\n * Interface for any `request` with `filters`.\n *\n * @public\n */\nexport interface PlatformFilterableRequest {\n filter?: string[]\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browse-response.model.js","sourceRoot":"","sources":["../../../../src/types/responses/browse-response.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformFacet } from '../models/facet.model'\nimport type { PlatformBanner, PlatformPromoted } from '../models/index'\nimport type { PlatformResult } from '../models/result.model'\n\n/**\n * Response for the `browse` endpoint.\n *\n * @public\n */\nexport interface PlatformBrowseResponse {\n catalog: {\n content: PlatformResult[]\n facets: PlatformFacet[]\n numFound: number\n tagging: {\n browseCategory: string\n displayBrowseCategory: string\n }\n stats: {\n price: {\n min: number\n max: number\n }\n }\n }\n banner: {\n content: PlatformBanner[]\n }\n promoted: {\n content: PlatformPromoted[]\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BrowseRequest, BrowseResponse } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Default adapter for the browse endpoint.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const browseEndpointAdapter: import("@empathyco/x-adapter").ExtendableEndpointAdapter<BrowseRequest, BrowseResponse>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './ai/suggestions-search.endpoint-adapter';
|
|
2
2
|
export * from './ai/suggestions.endpoint-adapter';
|
|
3
|
+
export * from './browse.endpoint-adapter';
|
|
3
4
|
export * from './experience-controls.endpoint-adapter';
|
|
4
5
|
export * from './facets.endpoint-adapter';
|
|
5
6
|
export * from './identifier-results.endpoint-adapter';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BrowseRequest } from '@empathyco/x-types';
|
|
2
|
+
import type { PlatformBrowseRequest } from '../../types/requests/browse-request.model';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseRequestMapper.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const browseRequestMapper: import("@empathyco/x-adapter").Mapper<BrowseRequest, PlatformBrowseRequest>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BrowseResponse } from '@empathyco/x-types';
|
|
2
|
+
import type { PlatformBrowseResponse } from '../../types/responses/browse-response.model';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseResponseMapper.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const browseResponseMapper: import("@empathyco/x-adapter").Mapper<PlatformBrowseResponse, BrowseResponse>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BrowseRequest } from '@empathyco/x-types';
|
|
2
|
+
import type { PlatformBrowseRequest } from '../../types/requests/browse-request.model';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseRequestSchema.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const browseRequestSchema: import("@empathyco/x-adapter").MutableSchema<BrowseRequest, PlatformBrowseRequest>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BrowseResponse } from '@empathyco/x-types';
|
|
2
|
+
import type { PlatformBrowseResponse } from '../../types/responses/browse-response.model';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for the BrowseResponseSchema.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const browseResponseSchema: import("@empathyco/x-adapter").MutableSchema<PlatformBrowseResponse, BrowseResponse>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PlatformBrowsableRequest, PlatformExtraParamsRequest, PlatformFilterableRequest, PlatformPageableRequest, PlatformSortableRequest, PlatformTrackableRequest } from './request.types';
|
|
2
|
+
/**
|
|
3
|
+
* Request for the `browse` endpoint.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface PlatformBrowseRequest extends PlatformBrowsableRequest, PlatformPageableRequest, PlatformFilterableRequest, PlatformTrackableRequest, PlatformSortableRequest, PlatformExtraParamsRequest {
|
|
8
|
+
}
|
|
@@ -25,6 +25,15 @@ export interface PlatformPageableRequest {
|
|
|
25
25
|
export interface PlatformQueryableRequest {
|
|
26
26
|
query: string;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Interface for any `request` with a `browseField` and `browseValue` parameters.
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export interface PlatformBrowsableRequest {
|
|
34
|
+
browseField: string;
|
|
35
|
+
browseValue: string;
|
|
36
|
+
}
|
|
28
37
|
/**
|
|
29
38
|
* Interface for any `request` with `sorting`.
|
|
30
39
|
*
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { PlatformFacet } from '../models/facet.model';
|
|
2
|
+
import type { PlatformBanner, PlatformPromoted } from '../models/index';
|
|
3
|
+
import type { PlatformResult } from '../models/result.model';
|
|
4
|
+
/**
|
|
5
|
+
* Response for the `browse` endpoint.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface PlatformBrowseResponse {
|
|
10
|
+
catalog: {
|
|
11
|
+
content: PlatformResult[];
|
|
12
|
+
facets: PlatformFacet[];
|
|
13
|
+
numFound: number;
|
|
14
|
+
tagging: {
|
|
15
|
+
browseCategory: string;
|
|
16
|
+
displayBrowseCategory: string;
|
|
17
|
+
};
|
|
18
|
+
stats: {
|
|
19
|
+
price: {
|
|
20
|
+
min: number;
|
|
21
|
+
max: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
banner: {
|
|
26
|
+
content: PlatformBanner[];
|
|
27
|
+
};
|
|
28
|
+
promoted: {
|
|
29
|
+
content: PlatformPromoted[];
|
|
30
|
+
};
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-adapter-platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.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.7",
|
|
51
|
-
"@empathyco/x-types": "10.
|
|
51
|
+
"@empathyco/x-types": "10.4.0",
|
|
52
52
|
"@empathyco/x-utils": "1.0.8"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "1bdeec4a4a6d392d6d4cad689edb034641f2912f"
|
|
66
66
|
}
|
|
@@ -688,6 +688,256 @@
|
|
|
688
688
|
"endIndex": 8
|
|
689
689
|
}
|
|
690
690
|
},
|
|
691
|
+
{
|
|
692
|
+
"kind": "Variable",
|
|
693
|
+
"canonicalReference": "@empathyco/x-adapter-platform!browseEndpointAdapter:var",
|
|
694
|
+
"docComment": "/**\n * Default adapter for the browse endpoint.\n *\n * @public\n */\n",
|
|
695
|
+
"excerptTokens": [
|
|
696
|
+
{
|
|
697
|
+
"kind": "Content",
|
|
698
|
+
"text": "browseEndpointAdapter: "
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"kind": "Content",
|
|
702
|
+
"text": "import(\"@empathyco/x-adapter\")."
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"kind": "Reference",
|
|
706
|
+
"text": "ExtendableEndpointAdapter",
|
|
707
|
+
"canonicalReference": "@empathyco/x-adapter!ExtendableEndpointAdapter:interface"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"kind": "Content",
|
|
711
|
+
"text": "<"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"kind": "Reference",
|
|
715
|
+
"text": "BrowseRequest",
|
|
716
|
+
"canonicalReference": "@empathyco/x-adapter-platform!BrowseRequest:interface"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"kind": "Content",
|
|
720
|
+
"text": ", "
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"kind": "Reference",
|
|
724
|
+
"text": "BrowseResponse",
|
|
725
|
+
"canonicalReference": "@empathyco/x-adapter-platform!BrowseResponse:interface"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"kind": "Content",
|
|
729
|
+
"text": ">"
|
|
730
|
+
}
|
|
731
|
+
],
|
|
732
|
+
"fileUrlPath": "dist/types/endpoint-adapters/browse.endpoint-adapter.d.ts",
|
|
733
|
+
"isReadonly": true,
|
|
734
|
+
"releaseTag": "Public",
|
|
735
|
+
"name": "browseEndpointAdapter",
|
|
736
|
+
"variableTypeTokenRange": {
|
|
737
|
+
"startIndex": 1,
|
|
738
|
+
"endIndex": 8
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"kind": "Variable",
|
|
743
|
+
"canonicalReference": "@empathyco/x-adapter-platform!browseRequestMapper:var",
|
|
744
|
+
"docComment": "/**\n * Default implementation for the BrowseRequestMapper.\n *\n * @public\n */\n",
|
|
745
|
+
"excerptTokens": [
|
|
746
|
+
{
|
|
747
|
+
"kind": "Content",
|
|
748
|
+
"text": "browseRequestMapper: "
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"kind": "Content",
|
|
752
|
+
"text": "import(\"@empathyco/x-adapter\")."
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"kind": "Reference",
|
|
756
|
+
"text": "Mapper",
|
|
757
|
+
"canonicalReference": "@empathyco/x-adapter!Mapper:type"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"kind": "Content",
|
|
761
|
+
"text": "<"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"kind": "Reference",
|
|
765
|
+
"text": "BrowseRequest",
|
|
766
|
+
"canonicalReference": "@empathyco/x-adapter-platform!BrowseRequest:interface"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"kind": "Content",
|
|
770
|
+
"text": ", "
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"kind": "Reference",
|
|
774
|
+
"text": "PlatformBrowseRequest",
|
|
775
|
+
"canonicalReference": "@empathyco/x-adapter-platform!~PlatformBrowseRequest:interface"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"kind": "Content",
|
|
779
|
+
"text": ">"
|
|
780
|
+
}
|
|
781
|
+
],
|
|
782
|
+
"fileUrlPath": "dist/types/mappers/requests/browse-request.mapper.d.ts",
|
|
783
|
+
"isReadonly": true,
|
|
784
|
+
"releaseTag": "Public",
|
|
785
|
+
"name": "browseRequestMapper",
|
|
786
|
+
"variableTypeTokenRange": {
|
|
787
|
+
"startIndex": 1,
|
|
788
|
+
"endIndex": 8
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"kind": "Variable",
|
|
793
|
+
"canonicalReference": "@empathyco/x-adapter-platform!browseRequestSchema:var",
|
|
794
|
+
"docComment": "/**\n * Default implementation for the BrowseRequestSchema.\n *\n * @public\n */\n",
|
|
795
|
+
"excerptTokens": [
|
|
796
|
+
{
|
|
797
|
+
"kind": "Content",
|
|
798
|
+
"text": "browseRequestSchema: "
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"kind": "Content",
|
|
802
|
+
"text": "import(\"@empathyco/x-adapter\")."
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"kind": "Reference",
|
|
806
|
+
"text": "MutableSchema",
|
|
807
|
+
"canonicalReference": "@empathyco/x-adapter!MutableSchema:type"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"kind": "Content",
|
|
811
|
+
"text": "<"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"kind": "Reference",
|
|
815
|
+
"text": "BrowseRequest",
|
|
816
|
+
"canonicalReference": "@empathyco/x-adapter-platform!BrowseRequest:interface"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"kind": "Content",
|
|
820
|
+
"text": ", "
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"kind": "Reference",
|
|
824
|
+
"text": "PlatformBrowseRequest",
|
|
825
|
+
"canonicalReference": "@empathyco/x-adapter-platform!~PlatformBrowseRequest:interface"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"kind": "Content",
|
|
829
|
+
"text": ">"
|
|
830
|
+
}
|
|
831
|
+
],
|
|
832
|
+
"fileUrlPath": "dist/types/schemas/requests/browse-request.schema.d.ts",
|
|
833
|
+
"isReadonly": true,
|
|
834
|
+
"releaseTag": "Public",
|
|
835
|
+
"name": "browseRequestSchema",
|
|
836
|
+
"variableTypeTokenRange": {
|
|
837
|
+
"startIndex": 1,
|
|
838
|
+
"endIndex": 8
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"kind": "Variable",
|
|
843
|
+
"canonicalReference": "@empathyco/x-adapter-platform!browseResponseMapper:var",
|
|
844
|
+
"docComment": "/**\n * Default implementation for the BrowseResponseMapper.\n *\n * @public\n */\n",
|
|
845
|
+
"excerptTokens": [
|
|
846
|
+
{
|
|
847
|
+
"kind": "Content",
|
|
848
|
+
"text": "browseResponseMapper: "
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"kind": "Content",
|
|
852
|
+
"text": "import(\"@empathyco/x-adapter\")."
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"kind": "Reference",
|
|
856
|
+
"text": "Mapper",
|
|
857
|
+
"canonicalReference": "@empathyco/x-adapter!Mapper:type"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"kind": "Content",
|
|
861
|
+
"text": "<"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"kind": "Reference",
|
|
865
|
+
"text": "PlatformBrowseResponse",
|
|
866
|
+
"canonicalReference": "@empathyco/x-adapter-platform!~PlatformBrowseResponse:interface"
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"kind": "Content",
|
|
870
|
+
"text": ", "
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"kind": "Reference",
|
|
874
|
+
"text": "BrowseResponse",
|
|
875
|
+
"canonicalReference": "@empathyco/x-adapter-platform!BrowseResponse:interface"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"kind": "Content",
|
|
879
|
+
"text": ">"
|
|
880
|
+
}
|
|
881
|
+
],
|
|
882
|
+
"fileUrlPath": "dist/types/mappers/responses/browse-response.mapper.d.ts",
|
|
883
|
+
"isReadonly": true,
|
|
884
|
+
"releaseTag": "Public",
|
|
885
|
+
"name": "browseResponseMapper",
|
|
886
|
+
"variableTypeTokenRange": {
|
|
887
|
+
"startIndex": 1,
|
|
888
|
+
"endIndex": 8
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"kind": "Variable",
|
|
893
|
+
"canonicalReference": "@empathyco/x-adapter-platform!browseResponseSchema:var",
|
|
894
|
+
"docComment": "/**\n * Default implementation for the BrowseResponseSchema.\n *\n * @public\n */\n",
|
|
895
|
+
"excerptTokens": [
|
|
896
|
+
{
|
|
897
|
+
"kind": "Content",
|
|
898
|
+
"text": "browseResponseSchema: "
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
"kind": "Content",
|
|
902
|
+
"text": "import(\"@empathyco/x-adapter\")."
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"kind": "Reference",
|
|
906
|
+
"text": "MutableSchema",
|
|
907
|
+
"canonicalReference": "@empathyco/x-adapter!MutableSchema:type"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"kind": "Content",
|
|
911
|
+
"text": "<"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"kind": "Reference",
|
|
915
|
+
"text": "PlatformBrowseResponse",
|
|
916
|
+
"canonicalReference": "@empathyco/x-adapter-platform!~PlatformBrowseResponse:interface"
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"kind": "Content",
|
|
920
|
+
"text": ", "
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"kind": "Reference",
|
|
924
|
+
"text": "BrowseResponse",
|
|
925
|
+
"canonicalReference": "@empathyco/x-adapter-platform!BrowseResponse:interface"
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"kind": "Content",
|
|
929
|
+
"text": ">"
|
|
930
|
+
}
|
|
931
|
+
],
|
|
932
|
+
"fileUrlPath": "dist/types/schemas/responses/browse-response.schema.d.ts",
|
|
933
|
+
"isReadonly": true,
|
|
934
|
+
"releaseTag": "Public",
|
|
935
|
+
"name": "browseResponseSchema",
|
|
936
|
+
"variableTypeTokenRange": {
|
|
937
|
+
"startIndex": 1,
|
|
938
|
+
"endIndex": 8
|
|
939
|
+
}
|
|
940
|
+
},
|
|
691
941
|
{
|
|
692
942
|
"kind": "Variable",
|
|
693
943
|
"canonicalReference": "@empathyco/x-adapter-platform!experienceControlsEndpointAdapter:var",
|
|
@@ -3569,6 +3819,33 @@
|
|
|
3569
3819
|
"endIndex": 2
|
|
3570
3820
|
}
|
|
3571
3821
|
},
|
|
3822
|
+
{
|
|
3823
|
+
"kind": "PropertySignature",
|
|
3824
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformFacet#label:member",
|
|
3825
|
+
"docComment": "",
|
|
3826
|
+
"excerptTokens": [
|
|
3827
|
+
{
|
|
3828
|
+
"kind": "Content",
|
|
3829
|
+
"text": "label: "
|
|
3830
|
+
},
|
|
3831
|
+
{
|
|
3832
|
+
"kind": "Content",
|
|
3833
|
+
"text": "string"
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
"kind": "Content",
|
|
3837
|
+
"text": ";"
|
|
3838
|
+
}
|
|
3839
|
+
],
|
|
3840
|
+
"isReadonly": false,
|
|
3841
|
+
"isOptional": false,
|
|
3842
|
+
"releaseTag": "Public",
|
|
3843
|
+
"name": "label",
|
|
3844
|
+
"propertyTypeTokenRange": {
|
|
3845
|
+
"startIndex": 1,
|
|
3846
|
+
"endIndex": 2
|
|
3847
|
+
}
|
|
3848
|
+
},
|
|
3572
3849
|
{
|
|
3573
3850
|
"kind": "PropertySignature",
|
|
3574
3851
|
"canonicalReference": "@empathyco/x-adapter-platform!PlatformFacet#type:member",
|
|
@@ -70,6 +70,28 @@ export const aiSuggestionsSearchSchema: MutableSchema<PlatformAiSuggestionsSearc
|
|
|
70
70
|
// @public
|
|
71
71
|
export const bannerSchema: MutableSchema<PlatformBanner, Banner>;
|
|
72
72
|
|
|
73
|
+
// Warning: (ae-forgotten-export) The symbol "BrowseRequest" needs to be exported by the entry point index.d.ts
|
|
74
|
+
// Warning: (ae-forgotten-export) The symbol "BrowseResponse" needs to be exported by the entry point index.d.ts
|
|
75
|
+
//
|
|
76
|
+
// @public
|
|
77
|
+
export const browseEndpointAdapter: ExtendableEndpointAdapter<BrowseRequest, BrowseResponse>;
|
|
78
|
+
|
|
79
|
+
// Warning: (ae-forgotten-export) The symbol "PlatformBrowseRequest" needs to be exported by the entry point index.d.ts
|
|
80
|
+
//
|
|
81
|
+
// @public
|
|
82
|
+
export const browseRequestMapper: Mapper<BrowseRequest, PlatformBrowseRequest>;
|
|
83
|
+
|
|
84
|
+
// @public
|
|
85
|
+
export const browseRequestSchema: MutableSchema<BrowseRequest, PlatformBrowseRequest>;
|
|
86
|
+
|
|
87
|
+
// Warning: (ae-forgotten-export) The symbol "PlatformBrowseResponse" needs to be exported by the entry point index.d.ts
|
|
88
|
+
//
|
|
89
|
+
// @public
|
|
90
|
+
export const browseResponseMapper: Mapper<PlatformBrowseResponse, BrowseResponse>;
|
|
91
|
+
|
|
92
|
+
// @public
|
|
93
|
+
export const browseResponseSchema: MutableSchema<PlatformBrowseResponse, BrowseResponse>;
|
|
94
|
+
|
|
73
95
|
// Warning: (ae-forgotten-export) The symbol "ExperienceControlsRequest" needs to be exported by the entry point index.d.ts
|
|
74
96
|
// Warning: (ae-forgotten-export) The symbol "ExperienceControlsResponse" needs to be exported by the entry point index.d.ts
|
|
75
97
|
//
|
|
@@ -338,6 +360,8 @@ export interface PlatformFacet {
|
|
|
338
360
|
// (undocumented)
|
|
339
361
|
facet: string;
|
|
340
362
|
// (undocumented)
|
|
363
|
+
label: string;
|
|
364
|
+
// (undocumented)
|
|
341
365
|
type: PlatformFacetType;
|
|
342
366
|
// (undocumented)
|
|
343
367
|
values: PlatformFilter[];
|