@empathyco/x-adapter-platform 1.0.0-alpha.67 → 1.0.0-alpha.69

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.
@@ -9,22 +9,21 @@ const url_utils_1 = require("../../mappers/url.utils");
9
9
  * @public
10
10
  */
11
11
  exports.resultSchema = (0, x_adapter_1.createMutableSchema)({
12
- id: 'id',
13
- images: ({ image }) => {
14
- return image ? [image] : [];
15
- },
16
- name: 'name',
17
- url: 'url',
12
+ id: '__id',
13
+ images: '__images',
14
+ name: '__name',
15
+ url: '__url',
18
16
  identifier: {
19
- value: 'id'
17
+ value: '__externalId'
20
18
  },
21
19
  rating: {
22
20
  value: () => null
23
21
  },
24
22
  price: {
25
- value: 'price',
26
- originalValue: 'price',
27
- hasDiscount: () => false
23
+ value: '__prices.current.value',
24
+ originalValue: ({ __prices: rawPrices }) => { var _a, _b; return (_b = (_a = rawPrices.previous) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : rawPrices.current.value; },
25
+ futureValue: ({ __prices: rawPrices }) => { var _a, _b; return (_b = (_a = rawPrices.future) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : rawPrices.current.value; },
26
+ hasDiscount: ({ __prices: rawPrices }) => { var _a, _b; return rawPrices.current.value < ((_b = (_a = rawPrices.previous) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : rawPrices.current.value); }
28
27
  },
29
28
  type: () => 'Default',
30
29
  modelName: () => 'Result',
@@ -1 +1 @@
1
- {"version":3,"file":"result.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/result.schema.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAE3D,uDAAgE;AAGhE;;;;GAIG;AACU,QAAA,YAAY,GAAG,IAAA,+BAAmB,EAAyB;IACtE,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACpB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,CAAC;IACD,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,UAAU,EAAE;QACV,KAAK,EAAE,IAAI;KACZ;IACD,MAAM,EAAE;QACN,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;KAClB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,aAAa,EAAE,OAAO;QACtB,WAAW,EAAE,GAAG,EAAE,CAAC,KAAK;KACzB;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,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,QAAQ,CAAC;YAC3D,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,QAAQ,CAAC;YAC3D,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,KAAK,CAAC;SACnD;KACF;CACF,CAAC,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { Result } from '@empathyco/x-types';\nimport { getTaggingInfoFromUrl } from '../../mappers/url.utils';\nimport { PlatformResult } from '../../types/models/result.model';\n\n/**\n * Default implementation for the ResultSchema.\n *\n * @public\n */\nexport const resultSchema = createMutableSchema<PlatformResult, Result>({\n id: 'id',\n images: ({ image }) => {\n return image ? [image] : [];\n },\n name: 'name',\n url: 'url',\n identifier: {\n value: 'id'\n },\n rating: {\n value: () => null\n },\n price: {\n value: 'price',\n originalValue: 'price',\n hasDiscount: () => false\n },\n type: () => 'Default',\n modelName: () => 'Result',\n isWishlisted: () => false,\n tagging: {\n $path: 'tagging',\n $subSchema: {\n add2cart: ({ add2cart }) => getTaggingInfoFromUrl(add2cart),\n checkout: ({ checkout }) => getTaggingInfoFromUrl(checkout),\n click: ({ click }) => getTaggingInfoFromUrl(click)\n }\n }\n});\n"]}
1
+ {"version":3,"file":"result.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/result.schema.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAE3D,uDAAgE;AAGhE;;;;GAIG;AACU,QAAA,YAAY,GAAG,IAAA,+BAAmB,EAAyB;IACtE,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,wBAAwB;QAC/B,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eACzC,OAAA,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAA,EAAA;QACtD,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eAAC,OAAA,MAAA,MAAA,SAAS,CAAC,MAAM,0CAAE,KAAK,mCAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAA,EAAA;QAC5F,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eACvC,OAAA,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,EAAA;KACnF;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,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,QAAQ,CAAC;YAC3D,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,QAAQ,CAAC;YAC3D,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAA,iCAAqB,EAAC,KAAK,CAAC;SACnD;KACF;CACF,CAAC,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { Result } from '@empathyco/x-types';\nimport { getTaggingInfoFromUrl } from '../../mappers/url.utils';\nimport { PlatformResult } from '../../types/models/result.model';\n\n/**\n * Default implementation for the ResultSchema.\n *\n * @public\n */\nexport const resultSchema = 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.current.value',\n originalValue: ({ __prices: rawPrices }) =>\n rawPrices.previous?.value ?? rawPrices.current.value,\n futureValue: ({ __prices: rawPrices }) => rawPrices.future?.value ?? rawPrices.current.value,\n hasDiscount: ({ __prices: rawPrices }) =>\n rawPrices.current.value < (rawPrices.previous?.value ?? rawPrices.current.value)\n },\n type: () => 'Default',\n modelName: () => 'Result',\n isWishlisted: () => false,\n tagging: {\n $path: 'tagging',\n $subSchema: {\n add2cart: ({ add2cart }) => getTaggingInfoFromUrl(add2cart),\n checkout: ({ checkout }) => getTaggingInfoFromUrl(checkout),\n click: ({ click }) => getTaggingInfoFromUrl(click)\n }\n }\n});\n"]}
@@ -21,7 +21,6 @@ exports.searchRequestSchema = (0, x_adapter_1.createMutableSchema)({
21
21
  /**
22
22
  * Converts the filters to the shape the Platform's API is expecting.
23
23
  *
24
- * @param filters.filters
25
24
  * @param filters - The filters from our internal request.
26
25
  * @example
27
26
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"search-request.schema.js","sourceRoot":"","sources":["../../../../src/schemas/requests/search-request.schema.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,gDAAyE;AACzE,gDAA4C;AAG5C;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,IAAA,+BAAmB,EAAuC;IAC3F,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,SAAS,UAAU,CAAC,EAAE,OAAO,EAAiB;IAC5C,OAAO,IAAA,gBAAM,EACX,OAAO,EACP,CAAC,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QAC3B,GAAG,WAAW;QACd,GAAG,OAAO;aACP,MAAM,CACL,MAAM,CAAC,EAAE,CACP,CAAC,IAAA,8BAAoB,EAAC,MAAM,CAAC;YAC7B,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAA,8BAAoB,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,CAAC,CACtF;aACA,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;KACvC,EACD,EAAc,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { isHierarchicalFilter, SearchRequest } from '@empathyco/x-types';\nimport { reduce } from '@empathyco/x-utils';\nimport { PlatformSearchRequest } from '../../types/requests/search-request.model';\n\n/**\n * Default implementation for the SearchRequestSchema.\n *\n * @public\n */\nexport const searchRequestSchema = createMutableSchema<SearchRequest, PlatformSearchRequest>({\n query: 'query',\n origin: 'origin',\n start: 'start',\n rows: 'rows',\n sort: 'sort',\n filter: mapFilters,\n extraParams: 'extraParams'\n});\n\n/**\n * Converts the filters to the shape the Platform's API is expecting.\n *\n * @param filters.filters\n * @param filters - The filters from our internal request.\n * @example\n * ```ts\n * const filters = {\n * offer: [\n * {\n * facetId: 'offer',\n * modelName: 'SimpleFilter',\n * id: 'price:[0 TO 10]',\n * selected: true,\n * label: 'In Offer'\n * } as SimpleFilter\n * ],\n * categoryPaths: [\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__be257cb26',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__fa5ef54f2',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * children: ['categoryIds:ffc61e1e9__be257cb26', 'categoryIds:ffc61e1e9__fa5ef54f2'],\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9',\n * label: 'Personal Care',\n * modelName: 'HierarchicalFilter',\n * parentId: null,\n * selected: true,\n * totalResults: 1\n * }]\n * };\n *\n * const mappedFilters = mapFilters({ filters });\n * // mappedFilters is [\n * // 'price:[0 TO 10]',\n * // 'categoryIds:ffc61e1e9__be257cb26',\n * // 'categoryIds:ffc61e1e9__fa5ef54f2'\n * // ];\n *\n * ```\n * @returns The filters ready for the API.\n */\nfunction mapFilters({ filters }: SearchRequest): string[] {\n return reduce(\n filters,\n (accumulator, _, filters) => [\n ...accumulator,\n ...filters\n .filter(\n filter =>\n !isHierarchicalFilter(filter) ||\n !filters.some(child => isHierarchicalFilter(child) && child.parentId === filter.id)\n )\n .map(filter => filter.id.toString())\n ],\n [] as string[]\n );\n}\n"]}
1
+ {"version":3,"file":"search-request.schema.js","sourceRoot":"","sources":["../../../../src/schemas/requests/search-request.schema.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,gDAAyE;AACzE,gDAA4C;AAG5C;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,IAAA,+BAAmB,EAAuC;IAC3F,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,SAAS,UAAU,CAAC,EAAE,OAAO,EAAiB;IAC5C,OAAO,IAAA,gBAAM,EACX,OAAO,EACP,CAAC,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QAC3B,GAAG,WAAW;QACd,GAAG,OAAO;aACP,MAAM,CACL,MAAM,CAAC,EAAE,CACP,CAAC,IAAA,8BAAoB,EAAC,MAAM,CAAC;YAC7B,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAA,8BAAoB,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,CAAC,CACtF;aACA,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;KACvC,EACD,EAAc,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { isHierarchicalFilter, SearchRequest } from '@empathyco/x-types';\nimport { reduce } from '@empathyco/x-utils';\nimport { PlatformSearchRequest } from '../../types/requests/search-request.model';\n\n/**\n * Default implementation for the SearchRequestSchema.\n *\n * @public\n */\nexport const searchRequestSchema = createMutableSchema<SearchRequest, PlatformSearchRequest>({\n query: 'query',\n origin: 'origin',\n start: 'start',\n rows: 'rows',\n sort: 'sort',\n filter: mapFilters,\n extraParams: 'extraParams'\n});\n\n/**\n * Converts the filters to the shape the Platform's API is expecting.\n *\n * @param filters - The filters from our internal request.\n * @example\n * ```ts\n * const filters = {\n * offer: [\n * {\n * facetId: 'offer',\n * modelName: 'SimpleFilter',\n * id: 'price:[0 TO 10]',\n * selected: true,\n * label: 'In Offer'\n * } as SimpleFilter\n * ],\n * categoryPaths: [\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__be257cb26',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__fa5ef54f2',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * children: ['categoryIds:ffc61e1e9__be257cb26', 'categoryIds:ffc61e1e9__fa5ef54f2'],\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9',\n * label: 'Personal Care',\n * modelName: 'HierarchicalFilter',\n * parentId: null,\n * selected: true,\n * totalResults: 1\n * }]\n * };\n *\n * const mappedFilters = mapFilters({ filters });\n * // mappedFilters is [\n * // 'price:[0 TO 10]',\n * // 'categoryIds:ffc61e1e9__be257cb26',\n * // 'categoryIds:ffc61e1e9__fa5ef54f2'\n * // ];\n *\n * ```\n * @returns The filters ready for the API.\n */\nfunction mapFilters({ filters }: SearchRequest): string[] {\n return reduce(\n filters,\n (accumulator, _, filters) => [\n ...accumulator,\n ...filters\n .filter(\n filter =>\n !isHierarchicalFilter(filter) ||\n !filters.some(child => isHierarchicalFilter(child) && child.parentId === filter.id)\n )\n .map(filter => filter.id.toString())\n ],\n [] as string[]\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"result.model.js","sourceRoot":"","sources":["../../../../src/types/models/result.model.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformTagging } from './tagging.model';\n\n/**\n * Result model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformResult {\n id: string;\n name: string;\n image: string;\n price: number;\n url: string;\n tagging: PlatformTagging;\n}\n"]}
1
+ {"version":3,"file":"result.model.js","sourceRoot":"","sources":["../../../../src/types/models/result.model.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformTagging } from './tagging.model';\n\n/**\n * Result model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformResult {\n // Unique document id. Not repeated in whole catalog.\n __id: string;\n // Customer id (SKU, MOCACO, etc.) Needed for SKU search.\n __externalId: string;\n // Title of the Result Card.\n __name: string;\n // Link to Product Description Page (PDP).\n __url: string;\n // An Array with all the images links.\n __images: string[];\n __prices: {\n // The current price of the result.\n current: {\n value: number;\n };\n // If there is a discount this is the previous price without discount.\n previous?: {\n value: number;\n };\n // Prewarming price.\n future?: {\n value: number;\n };\n };\n // Tagging links for the current Document.\n tagging: PlatformTagging;\n}\n"]}
@@ -6,22 +6,21 @@ import { getTaggingInfoFromUrl } from '../../mappers/url.utils';
6
6
  * @public
7
7
  */
8
8
  export const resultSchema = createMutableSchema({
9
- id: 'id',
10
- images: ({ image }) => {
11
- return image ? [image] : [];
12
- },
13
- name: 'name',
14
- url: 'url',
9
+ id: '__id',
10
+ images: '__images',
11
+ name: '__name',
12
+ url: '__url',
15
13
  identifier: {
16
- value: 'id'
14
+ value: '__externalId'
17
15
  },
18
16
  rating: {
19
17
  value: () => null
20
18
  },
21
19
  price: {
22
- value: 'price',
23
- originalValue: 'price',
24
- hasDiscount: () => false
20
+ value: '__prices.current.value',
21
+ originalValue: ({ __prices: rawPrices }) => { var _a, _b; return (_b = (_a = rawPrices.previous) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : rawPrices.current.value; },
22
+ futureValue: ({ __prices: rawPrices }) => { var _a, _b; return (_b = (_a = rawPrices.future) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : rawPrices.current.value; },
23
+ hasDiscount: ({ __prices: rawPrices }) => { var _a, _b; return rawPrices.current.value < ((_b = (_a = rawPrices.previous) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : rawPrices.current.value); }
25
24
  },
26
25
  type: () => 'Default',
27
26
  modelName: () => 'Result',
@@ -1 +1 @@
1
- {"version":3,"file":"result.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/result.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAyB;IACtE,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACpB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,CAAC;IACD,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,UAAU,EAAE;QACV,KAAK,EAAE,IAAI;KACZ;IACD,MAAM,EAAE;QACN,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;KAClB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,aAAa,EAAE,OAAO;QACtB,WAAW,EAAE,GAAG,EAAE,CAAC,KAAK;KACzB;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,QAAQ,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC;YAC3D,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC;YAC3D,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC;SACnD;KACF;CACF,CAAC,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { Result } from '@empathyco/x-types';\nimport { getTaggingInfoFromUrl } from '../../mappers/url.utils';\nimport { PlatformResult } from '../../types/models/result.model';\n\n/**\n * Default implementation for the ResultSchema.\n *\n * @public\n */\nexport const resultSchema = createMutableSchema<PlatformResult, Result>({\n id: 'id',\n images: ({ image }) => {\n return image ? [image] : [];\n },\n name: 'name',\n url: 'url',\n identifier: {\n value: 'id'\n },\n rating: {\n value: () => null\n },\n price: {\n value: 'price',\n originalValue: 'price',\n hasDiscount: () => false\n },\n type: () => 'Default',\n modelName: () => 'Result',\n isWishlisted: () => false,\n tagging: {\n $path: 'tagging',\n $subSchema: {\n add2cart: ({ add2cart }) => getTaggingInfoFromUrl(add2cart),\n checkout: ({ checkout }) => getTaggingInfoFromUrl(checkout),\n click: ({ click }) => getTaggingInfoFromUrl(click)\n }\n }\n});\n"]}
1
+ {"version":3,"file":"result.schema.js","sourceRoot":"","sources":["../../../../src/schemas/models/result.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAyB;IACtE,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,wBAAwB;QAC/B,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eACzC,OAAA,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAA,EAAA;QACtD,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eAAC,OAAA,MAAA,MAAA,SAAS,CAAC,MAAM,0CAAE,KAAK,mCAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAA,EAAA;QAC5F,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eACvC,OAAA,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,mCAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,EAAA;KACnF;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,QAAQ,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC;YAC3D,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC;YAC3D,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC;SACnD;KACF;CACF,CAAC,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { Result } from '@empathyco/x-types';\nimport { getTaggingInfoFromUrl } from '../../mappers/url.utils';\nimport { PlatformResult } from '../../types/models/result.model';\n\n/**\n * Default implementation for the ResultSchema.\n *\n * @public\n */\nexport const resultSchema = 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.current.value',\n originalValue: ({ __prices: rawPrices }) =>\n rawPrices.previous?.value ?? rawPrices.current.value,\n futureValue: ({ __prices: rawPrices }) => rawPrices.future?.value ?? rawPrices.current.value,\n hasDiscount: ({ __prices: rawPrices }) =>\n rawPrices.current.value < (rawPrices.previous?.value ?? rawPrices.current.value)\n },\n type: () => 'Default',\n modelName: () => 'Result',\n isWishlisted: () => false,\n tagging: {\n $path: 'tagging',\n $subSchema: {\n add2cart: ({ add2cart }) => getTaggingInfoFromUrl(add2cart),\n checkout: ({ checkout }) => getTaggingInfoFromUrl(checkout),\n click: ({ click }) => getTaggingInfoFromUrl(click)\n }\n }\n});\n"]}
@@ -18,7 +18,6 @@ export const searchRequestSchema = createMutableSchema({
18
18
  /**
19
19
  * Converts the filters to the shape the Platform's API is expecting.
20
20
  *
21
- * @param filters.filters
22
21
  * @param filters - The filters from our internal request.
23
22
  * @example
24
23
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"search-request.schema.js","sourceRoot":"","sources":["../../../../src/schemas/requests/search-request.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAiB,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAuC;IAC3F,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,SAAS,UAAU,CAAC,EAAE,OAAO,EAAiB;IAC5C,OAAO,MAAM,CACX,OAAO,EACP,CAAC,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QAC3B,GAAG,WAAW;QACd,GAAG,OAAO;aACP,MAAM,CACL,MAAM,CAAC,EAAE,CACP,CAAC,oBAAoB,CAAC,MAAM,CAAC;YAC7B,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,CAAC,CACtF;aACA,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;KACvC,EACD,EAAc,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { isHierarchicalFilter, SearchRequest } from '@empathyco/x-types';\nimport { reduce } from '@empathyco/x-utils';\nimport { PlatformSearchRequest } from '../../types/requests/search-request.model';\n\n/**\n * Default implementation for the SearchRequestSchema.\n *\n * @public\n */\nexport const searchRequestSchema = createMutableSchema<SearchRequest, PlatformSearchRequest>({\n query: 'query',\n origin: 'origin',\n start: 'start',\n rows: 'rows',\n sort: 'sort',\n filter: mapFilters,\n extraParams: 'extraParams'\n});\n\n/**\n * Converts the filters to the shape the Platform's API is expecting.\n *\n * @param filters.filters\n * @param filters - The filters from our internal request.\n * @example\n * ```ts\n * const filters = {\n * offer: [\n * {\n * facetId: 'offer',\n * modelName: 'SimpleFilter',\n * id: 'price:[0 TO 10]',\n * selected: true,\n * label: 'In Offer'\n * } as SimpleFilter\n * ],\n * categoryPaths: [\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__be257cb26',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__fa5ef54f2',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * children: ['categoryIds:ffc61e1e9__be257cb26', 'categoryIds:ffc61e1e9__fa5ef54f2'],\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9',\n * label: 'Personal Care',\n * modelName: 'HierarchicalFilter',\n * parentId: null,\n * selected: true,\n * totalResults: 1\n * }]\n * };\n *\n * const mappedFilters = mapFilters({ filters });\n * // mappedFilters is [\n * // 'price:[0 TO 10]',\n * // 'categoryIds:ffc61e1e9__be257cb26',\n * // 'categoryIds:ffc61e1e9__fa5ef54f2'\n * // ];\n *\n * ```\n * @returns The filters ready for the API.\n */\nfunction mapFilters({ filters }: SearchRequest): string[] {\n return reduce(\n filters,\n (accumulator, _, filters) => [\n ...accumulator,\n ...filters\n .filter(\n filter =>\n !isHierarchicalFilter(filter) ||\n !filters.some(child => isHierarchicalFilter(child) && child.parentId === filter.id)\n )\n .map(filter => filter.id.toString())\n ],\n [] as string[]\n );\n}\n"]}
1
+ {"version":3,"file":"search-request.schema.js","sourceRoot":"","sources":["../../../../src/schemas/requests/search-request.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAiB,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAuC;IAC3F,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,SAAS,UAAU,CAAC,EAAE,OAAO,EAAiB;IAC5C,OAAO,MAAM,CACX,OAAO,EACP,CAAC,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QAC3B,GAAG,WAAW;QACd,GAAG,OAAO;aACP,MAAM,CACL,MAAM,CAAC,EAAE,CACP,CAAC,oBAAoB,CAAC,MAAM,CAAC;YAC7B,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,CAAC,CACtF;aACA,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;KACvC,EACD,EAAc,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { createMutableSchema } from '@empathyco/x-adapter';\nimport { isHierarchicalFilter, SearchRequest } from '@empathyco/x-types';\nimport { reduce } from '@empathyco/x-utils';\nimport { PlatformSearchRequest } from '../../types/requests/search-request.model';\n\n/**\n * Default implementation for the SearchRequestSchema.\n *\n * @public\n */\nexport const searchRequestSchema = createMutableSchema<SearchRequest, PlatformSearchRequest>({\n query: 'query',\n origin: 'origin',\n start: 'start',\n rows: 'rows',\n sort: 'sort',\n filter: mapFilters,\n extraParams: 'extraParams'\n});\n\n/**\n * Converts the filters to the shape the Platform's API is expecting.\n *\n * @param filters - The filters from our internal request.\n * @example\n * ```ts\n * const filters = {\n * offer: [\n * {\n * facetId: 'offer',\n * modelName: 'SimpleFilter',\n * id: 'price:[0 TO 10]',\n * selected: true,\n * label: 'In Offer'\n * } as SimpleFilter\n * ],\n * categoryPaths: [\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__be257cb26',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__fa5ef54f2',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * children: ['categoryIds:ffc61e1e9__be257cb26', 'categoryIds:ffc61e1e9__fa5ef54f2'],\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9',\n * label: 'Personal Care',\n * modelName: 'HierarchicalFilter',\n * parentId: null,\n * selected: true,\n * totalResults: 1\n * }]\n * };\n *\n * const mappedFilters = mapFilters({ filters });\n * // mappedFilters is [\n * // 'price:[0 TO 10]',\n * // 'categoryIds:ffc61e1e9__be257cb26',\n * // 'categoryIds:ffc61e1e9__fa5ef54f2'\n * // ];\n *\n * ```\n * @returns The filters ready for the API.\n */\nfunction mapFilters({ filters }: SearchRequest): string[] {\n return reduce(\n filters,\n (accumulator, _, filters) => [\n ...accumulator,\n ...filters\n .filter(\n filter =>\n !isHierarchicalFilter(filter) ||\n !filters.some(child => isHierarchicalFilter(child) && child.parentId === filter.id)\n )\n .map(filter => filter.id.toString())\n ],\n [] as string[]\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"result.model.js","sourceRoot":"","sources":["../../../../src/types/models/result.model.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformTagging } from './tagging.model';\n\n/**\n * Result model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformResult {\n id: string;\n name: string;\n image: string;\n price: number;\n url: string;\n tagging: PlatformTagging;\n}\n"]}
1
+ {"version":3,"file":"result.model.js","sourceRoot":"","sources":["../../../../src/types/models/result.model.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformTagging } from './tagging.model';\n\n/**\n * Result model for the `platform` API.\n *\n * @public\n */\nexport interface PlatformResult {\n // Unique document id. Not repeated in whole catalog.\n __id: string;\n // Customer id (SKU, MOCACO, etc.) Needed for SKU search.\n __externalId: string;\n // Title of the Result Card.\n __name: string;\n // Link to Product Description Page (PDP).\n __url: string;\n // An Array with all the images links.\n __images: string[];\n __prices: {\n // The current price of the result.\n current: {\n value: number;\n };\n // If there is a discount this is the previous price without discount.\n previous?: {\n value: number;\n };\n // Prewarming price.\n future?: {\n value: number;\n };\n };\n // Tagging links for the current Document.\n tagging: PlatformTagging;\n}\n"]}
@@ -5,10 +5,21 @@ import { PlatformTagging } from './tagging.model';
5
5
  * @public
6
6
  */
7
7
  export interface PlatformResult {
8
- id: string;
9
- name: string;
10
- image: string;
11
- price: number;
12
- url: string;
8
+ __id: string;
9
+ __externalId: string;
10
+ __name: string;
11
+ __url: string;
12
+ __images: string[];
13
+ __prices: {
14
+ current: {
15
+ value: number;
16
+ };
17
+ previous?: {
18
+ value: number;
19
+ };
20
+ future?: {
21
+ value: number;
22
+ };
23
+ };
13
24
  tagging: PlatformTagging;
14
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-adapter-platform",
3
- "version": "1.0.0-alpha.67",
3
+ "version": "1.0.0-alpha.69",
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",
@@ -40,23 +40,23 @@
40
40
  "prepublishOnly": "pnpm run build"
41
41
  },
42
42
  "dependencies": {
43
- "@empathyco/x-adapter": "^8.0.0-alpha.26",
44
- "@empathyco/x-types": "^10.0.0-alpha.62",
45
- "@empathyco/x-utils": "^1.0.0-alpha.18",
46
- "tslib": "~2.4.1"
43
+ "@empathyco/x-adapter": "^8.0.0-alpha.27",
44
+ "@empathyco/x-types": "^10.0.0-alpha.64",
45
+ "@empathyco/x-utils": "^1.0.0-alpha.19",
46
+ "tslib": "~2.5.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@microsoft/api-documenter": "~7.21.3",
50
- "@microsoft/api-extractor": "~7.33.7",
51
- "@types/jest": "~27.0.3",
50
+ "@microsoft/api-extractor": "~7.34.0",
51
+ "@types/jest": "~27.5.0",
52
52
  "concurrently": "~7.6.0",
53
- "jest": "~27.3.1",
53
+ "jest": "~27.5.0",
54
54
  "rimraf": "~3.0.2",
55
- "ts-jest": "~27.0.7",
55
+ "ts-jest": "~27.1.0",
56
56
  "typescript": "~4.9.4"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "942eb74fc12fefd2d2543bea5070e705086a9f66"
61
+ "gitHead": "27865abfcfc501af5da632154c144353b6341a9e"
62
62
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.33.8"
8
+ "packageVersion": "7.34.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.33.8",
5
- "schemaVersion": 1010,
4
+ "toolVersion": "7.34.0",
5
+ "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
8
8
  "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
@@ -3456,12 +3456,12 @@
3456
3456
  "members": [
3457
3457
  {
3458
3458
  "kind": "PropertySignature",
3459
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#id:member",
3459
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#__externalId:member",
3460
3460
  "docComment": "",
3461
3461
  "excerptTokens": [
3462
3462
  {
3463
3463
  "kind": "Content",
3464
- "text": "id: "
3464
+ "text": "__externalId: "
3465
3465
  },
3466
3466
  {
3467
3467
  "kind": "Content",
@@ -3475,7 +3475,7 @@
3475
3475
  "isReadonly": false,
3476
3476
  "isOptional": false,
3477
3477
  "releaseTag": "Public",
3478
- "name": "id",
3478
+ "name": "__externalId",
3479
3479
  "propertyTypeTokenRange": {
3480
3480
  "startIndex": 1,
3481
3481
  "endIndex": 2
@@ -3483,12 +3483,12 @@
3483
3483
  },
3484
3484
  {
3485
3485
  "kind": "PropertySignature",
3486
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#image:member",
3486
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#__id:member",
3487
3487
  "docComment": "",
3488
3488
  "excerptTokens": [
3489
3489
  {
3490
3490
  "kind": "Content",
3491
- "text": "image: "
3491
+ "text": "__id: "
3492
3492
  },
3493
3493
  {
3494
3494
  "kind": "Content",
@@ -3502,7 +3502,7 @@
3502
3502
  "isReadonly": false,
3503
3503
  "isOptional": false,
3504
3504
  "releaseTag": "Public",
3505
- "name": "image",
3505
+ "name": "__id",
3506
3506
  "propertyTypeTokenRange": {
3507
3507
  "startIndex": 1,
3508
3508
  "endIndex": 2
@@ -3510,16 +3510,16 @@
3510
3510
  },
3511
3511
  {
3512
3512
  "kind": "PropertySignature",
3513
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#name:member",
3513
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#__images:member",
3514
3514
  "docComment": "",
3515
3515
  "excerptTokens": [
3516
3516
  {
3517
3517
  "kind": "Content",
3518
- "text": "name: "
3518
+ "text": "__images: "
3519
3519
  },
3520
3520
  {
3521
3521
  "kind": "Content",
3522
- "text": "string"
3522
+ "text": "string[]"
3523
3523
  },
3524
3524
  {
3525
3525
  "kind": "Content",
@@ -3529,7 +3529,7 @@
3529
3529
  "isReadonly": false,
3530
3530
  "isOptional": false,
3531
3531
  "releaseTag": "Public",
3532
- "name": "name",
3532
+ "name": "__images",
3533
3533
  "propertyTypeTokenRange": {
3534
3534
  "startIndex": 1,
3535
3535
  "endIndex": 2
@@ -3537,16 +3537,16 @@
3537
3537
  },
3538
3538
  {
3539
3539
  "kind": "PropertySignature",
3540
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#price:member",
3540
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#__name:member",
3541
3541
  "docComment": "",
3542
3542
  "excerptTokens": [
3543
3543
  {
3544
3544
  "kind": "Content",
3545
- "text": "price: "
3545
+ "text": "__name: "
3546
3546
  },
3547
3547
  {
3548
3548
  "kind": "Content",
3549
- "text": "number"
3549
+ "text": "string"
3550
3550
  },
3551
3551
  {
3552
3552
  "kind": "Content",
@@ -3556,7 +3556,7 @@
3556
3556
  "isReadonly": false,
3557
3557
  "isOptional": false,
3558
3558
  "releaseTag": "Public",
3559
- "name": "price",
3559
+ "name": "__name",
3560
3560
  "propertyTypeTokenRange": {
3561
3561
  "startIndex": 1,
3562
3562
  "endIndex": 2
@@ -3564,17 +3564,16 @@
3564
3564
  },
3565
3565
  {
3566
3566
  "kind": "PropertySignature",
3567
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#tagging:member",
3567
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#__prices:member",
3568
3568
  "docComment": "",
3569
3569
  "excerptTokens": [
3570
3570
  {
3571
3571
  "kind": "Content",
3572
- "text": "tagging: "
3572
+ "text": "__prices: "
3573
3573
  },
3574
3574
  {
3575
- "kind": "Reference",
3576
- "text": "PlatformTagging",
3577
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging:interface"
3575
+ "kind": "Content",
3576
+ "text": "{\n current: {\n value: number;\n };\n previous?: {\n value: number;\n };\n future?: {\n value: number;\n };\n }"
3578
3577
  },
3579
3578
  {
3580
3579
  "kind": "Content",
@@ -3584,7 +3583,7 @@
3584
3583
  "isReadonly": false,
3585
3584
  "isOptional": false,
3586
3585
  "releaseTag": "Public",
3587
- "name": "tagging",
3586
+ "name": "__prices",
3588
3587
  "propertyTypeTokenRange": {
3589
3588
  "startIndex": 1,
3590
3589
  "endIndex": 2
@@ -3592,12 +3591,12 @@
3592
3591
  },
3593
3592
  {
3594
3593
  "kind": "PropertySignature",
3595
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#url:member",
3594
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#__url:member",
3596
3595
  "docComment": "",
3597
3596
  "excerptTokens": [
3598
3597
  {
3599
3598
  "kind": "Content",
3600
- "text": "url: "
3599
+ "text": "__url: "
3601
3600
  },
3602
3601
  {
3603
3602
  "kind": "Content",
@@ -3611,7 +3610,35 @@
3611
3610
  "isReadonly": false,
3612
3611
  "isOptional": false,
3613
3612
  "releaseTag": "Public",
3614
- "name": "url",
3613
+ "name": "__url",
3614
+ "propertyTypeTokenRange": {
3615
+ "startIndex": 1,
3616
+ "endIndex": 2
3617
+ }
3618
+ },
3619
+ {
3620
+ "kind": "PropertySignature",
3621
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult#tagging:member",
3622
+ "docComment": "",
3623
+ "excerptTokens": [
3624
+ {
3625
+ "kind": "Content",
3626
+ "text": "tagging: "
3627
+ },
3628
+ {
3629
+ "kind": "Reference",
3630
+ "text": "PlatformTagging",
3631
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging:interface"
3632
+ },
3633
+ {
3634
+ "kind": "Content",
3635
+ "text": ";"
3636
+ }
3637
+ ],
3638
+ "isReadonly": false,
3639
+ "isOptional": false,
3640
+ "releaseTag": "Public",
3641
+ "name": "tagging",
3615
3642
  "propertyTypeTokenRange": {
3616
3643
  "startIndex": 1,
3617
3644
  "endIndex": 2
@@ -361,17 +361,29 @@ export interface PlatformRelatedTagsResponse {
361
361
  // @public
362
362
  export interface PlatformResult {
363
363
  // (undocumented)
364
- id: string;
364
+ __externalId: string;
365
365
  // (undocumented)
366
- image: string;
366
+ __id: string;
367
367
  // (undocumented)
368
- name: string;
368
+ __images: string[];
369
369
  // (undocumented)
370
- price: number;
370
+ __name: string;
371
371
  // (undocumented)
372
- tagging: PlatformTagging;
372
+ __prices: {
373
+ current: {
374
+ value: number;
375
+ };
376
+ previous?: {
377
+ value: number;
378
+ };
379
+ future?: {
380
+ value: number;
381
+ };
382
+ };
373
383
  // (undocumented)
374
- url: string;
384
+ __url: string;
385
+ // (undocumented)
386
+ tagging: PlatformTagging;
375
387
  }
376
388
 
377
389
  // Warning: (ae-forgotten-export) The symbol "PlatformFilterableRequest" needs to be exported by the entry point index.d.ts