@empathyco/x-adapter-platform 1.12.0 → 2.0.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.
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.aiSuggestionSearchSchema = void 0;
4
4
  const x_adapter_1 = require("@empathyco/x-adapter");
5
- const url_utils_1 = require("../../../mappers/url.utils");
6
5
  const result_schema_1 = require("../result.schema");
7
6
  /**
8
7
  * Default implementation for the AiSuggestionSearchSchema.
@@ -15,11 +14,5 @@ exports.aiSuggestionSearchSchema = (0, x_adapter_1.createMutableSchema)({
15
14
  $subSchema: result_schema_1.resultSchema,
16
15
  },
17
16
  numFound: 'numFound',
18
- tagging: ({ tagging }) => {
19
- var _a;
20
- return ({
21
- query: (0, url_utils_1.getTaggingInfoFromUrl)((_a = tagging === null || tagging === void 0 ? void 0 : tagging.query) !== null && _a !== void 0 ? _a : ''),
22
- });
23
- },
24
17
  });
25
18
  //# sourceMappingURL=suggestion-search.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestion-search.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,0DAAkE;AAClE,oDAA+C;AAE/C;;;GAGG;AACU,QAAA,wBAAwB,GAAG,IAAA,+BAAmB,EAGzD;IACA,KAAK,EAAE,OAAO;IACd,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,4BAAY;KACzB;IACD,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;;QAAC,OAAA,CAAC;YACzB,KAAK,EAAE,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAC;SACnD,CAAC,CAAA;KAAA;CACH,CAAC,CAAA","sourcesContent":["import type { AiSuggestionSearch } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionSearch } from '../../../types/models/ai/suggestion-search.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getTaggingInfoFromUrl } from '../../../mappers/url.utils'\nimport { resultSchema } from '../result.schema'\n\n/**\n * Default implementation for the AiSuggestionSearchSchema.\n * @public\n */\nexport const aiSuggestionSearchSchema = createMutableSchema<\n PlatformAiSuggestionSearch,\n AiSuggestionSearch\n>({\n query: 'query',\n results: {\n $path: 'results',\n $subSchema: resultSchema,\n },\n numFound: 'numFound',\n tagging: ({ tagging }) => ({\n query: getTaggingInfoFromUrl(tagging?.query ?? ''),\n }),\n})\n"]}
1
+ {"version":3,"file":"suggestion-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestion-search.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,oDAA+C;AAE/C;;;GAGG;AACU,QAAA,wBAAwB,GAAG,IAAA,+BAAmB,EAGzD;IACA,KAAK,EAAE,OAAO;IACd,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,4BAAY;KACzB;IACD,QAAQ,EAAE,UAAU;CACrB,CAAC,CAAA","sourcesContent":["import type { AiSuggestionSearch } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionSearch } from '../../../types/models/ai/suggestion-search.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { resultSchema } from '../result.schema'\n\n/**\n * Default implementation for the AiSuggestionSearchSchema.\n * @public\n */\nexport const aiSuggestionSearchSchema = createMutableSchema<\n PlatformAiSuggestionSearch,\n AiSuggestionSearch\n>({\n query: 'query',\n results: {\n $path: 'results',\n $subSchema: resultSchema,\n },\n numFound: 'numFound',\n})\n"]}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.aiSuggestionsSearchSchema = void 0;
4
4
  const x_adapter_1 = require("@empathyco/x-adapter");
5
+ const url_utils_1 = require("../../../mappers/url.utils");
5
6
  const suggestion_search_schema_1 = require("./suggestion-search.schema");
6
7
  /**
7
8
  * Default implementation for the AIOverviewSuggestionsSearchSchema.
@@ -12,5 +13,13 @@ exports.aiSuggestionsSearchSchema = (0, x_adapter_1.createMutableSchema)({
12
13
  $path: 'items',
13
14
  $subSchema: suggestion_search_schema_1.aiSuggestionSearchSchema,
14
15
  },
16
+ suggestionsTagging: {
17
+ query: ({ tagging }) => { var _a; return (0, url_utils_1.getTaggingInfoFromUrl)((_a = tagging === null || tagging === void 0 ? void 0 : tagging.query) !== null && _a !== void 0 ? _a : ''); },
18
+ add2cart: ({ tagging }) => { var _a; return (0, url_utils_1.getTaggingInfoFromUrl)((_a = tagging === null || tagging === void 0 ? void 0 : tagging.add2cart) !== null && _a !== void 0 ? _a : ''); },
19
+ click: ({ tagging }) => { var _a; return (0, url_utils_1.getTaggingInfoFromUrl)((_a = tagging === null || tagging === void 0 ? void 0 : tagging.click) !== null && _a !== void 0 ? _a : ''); },
20
+ display: ({ tagging }) => { var _a; return (0, url_utils_1.getTaggingInfoFromUrl)((_a = tagging === null || tagging === void 0 ? void 0 : tagging.display) !== null && _a !== void 0 ? _a : ''); },
21
+ displayClick: ({ tagging }) => { var _a; return (0, url_utils_1.getTaggingInfoFromUrl)((_a = tagging === null || tagging === void 0 ? void 0 : tagging.displayClick) !== null && _a !== void 0 ? _a : ''); },
22
+ checkout: ({ tagging }) => { var _a; return (0, url_utils_1.getTaggingInfoFromUrl)((_a = tagging === null || tagging === void 0 ? void 0 : tagging.checkout) !== null && _a !== void 0 ? _a : ''); },
23
+ },
15
24
  });
16
25
  //# sourceMappingURL=suggestions-search.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestions-search.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,yEAAqE;AAErE;;;GAGG;AACU,QAAA,yBAAyB,GAAG,IAAA,+BAAmB,EAG1D;IACA,WAAW,EAAE;QACX,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,mDAAwB;KACrC;CACF,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchResponse } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchResponse } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { aiSuggestionSearchSchema } from './suggestion-search.schema'\n\n/**\n * Default implementation for the AIOverviewSuggestionsSearchSchema.\n * @public\n */\nexport const aiSuggestionsSearchSchema = createMutableSchema<\n PlatformAiSuggestionsSearchResponse,\n AiSuggestionsSearchResponse\n>({\n suggestions: {\n $path: 'items',\n $subSchema: aiSuggestionSearchSchema,\n },\n})\n"]}
1
+ {"version":3,"file":"suggestions-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestions-search.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAC1D,0DAAkE;AAClE,yEAAqE;AAErE;;;GAGG;AACU,QAAA,yBAAyB,GAAG,IAAA,+BAAmB,EAG1D;IACA,WAAW,EAAE;QACX,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,mDAAwB;KACrC;IACD,kBAAkB,EAAE;QAClB,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAC,CAAA,EAAA;QACnE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,EAAE,CAAC,CAAA,EAAA;QACzE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAC,CAAA,EAAA;QACnE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,EAAE,CAAC,CAAA,EAAA;QACvE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,mCAAI,EAAE,CAAC,CAAA,EAAA;QACjF,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,IAAA,iCAAqB,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,EAAE,CAAC,CAAA,EAAA;KAC1E;CACF,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchResponse } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchResponse } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getTaggingInfoFromUrl } from '../../../mappers/url.utils'\nimport { aiSuggestionSearchSchema } from './suggestion-search.schema'\n\n/**\n * Default implementation for the AIOverviewSuggestionsSearchSchema.\n * @public\n */\nexport const aiSuggestionsSearchSchema = createMutableSchema<\n PlatformAiSuggestionsSearchResponse,\n AiSuggestionsSearchResponse\n>({\n suggestions: {\n $path: 'items',\n $subSchema: aiSuggestionSearchSchema,\n },\n suggestionsTagging: {\n query: ({ tagging }) => getTaggingInfoFromUrl(tagging?.query ?? ''),\n add2cart: ({ tagging }) => getTaggingInfoFromUrl(tagging?.add2cart ?? ''),\n click: ({ tagging }) => getTaggingInfoFromUrl(tagging?.click ?? ''),\n display: ({ tagging }) => getTaggingInfoFromUrl(tagging?.display ?? ''),\n displayClick: ({ tagging }) => getTaggingInfoFromUrl(tagging?.displayClick ?? ''),\n checkout: ({ tagging }) => getTaggingInfoFromUrl(tagging?.checkout ?? ''),\n },\n})\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion-search.model.js","sourceRoot":"","sources":["../../../../../src/types/models/ai/suggestion-search.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformResult } from '../result.model'\n\n/**\n * Each platform suggestion search is a query and the platform results of that query.\n * @public\n */\nexport interface PlatformAiSuggestionSearch {\n query: string\n results: PlatformResult[]\n numFound: number\n tagging?: { query: string }\n}\n"]}
1
+ {"version":3,"file":"suggestion-search.model.js","sourceRoot":"","sources":["../../../../../src/types/models/ai/suggestion-search.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformResult } from '../result.model'\n\n/**\n * Each platform suggestion search is a query and the platform results of that query.\n * @public\n */\nexport interface PlatformAiSuggestionSearch {\n query: string\n results: PlatformResult[]\n numFound: number\n}\n\nexport interface PlatformAiSuggestionSearchTagging {\n query: string\n add2cart: string\n click: string\n display: string\n displayClick: string\n checkout: string\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-search-response.model.js","sourceRoot":"","sources":["../../../../../src/types/responses/ai/suggestions-search-response.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformAiSuggestionSearch } from '../../models/ai/suggestion-search.model'\n\n/**\n * Response for the `AI suggestions search` endpoint.\n *\n * @public\n */\nexport interface PlatformAiSuggestionsSearchResponse {\n items: PlatformAiSuggestionSearch[]\n}\n"]}
1
+ {"version":3,"file":"suggestions-search-response.model.js","sourceRoot":"","sources":["../../../../../src/types/responses/ai/suggestions-search-response.model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n PlatformAiSuggestionSearch,\n PlatformAiSuggestionSearchTagging,\n} from '../../models/ai/suggestion-search.model'\n\n/**\n * Response for the `AI suggestions search` endpoint.\n *\n * @public\n */\nexport interface PlatformAiSuggestionsSearchResponse {\n items: PlatformAiSuggestionSearch[]\n tagging: PlatformAiSuggestionSearchTagging\n}\n"]}
@@ -1,5 +1,4 @@
1
1
  import { createMutableSchema } from '@empathyco/x-adapter';
2
- import { getTaggingInfoFromUrl } from '../../../mappers/url.utils';
3
2
  import { resultSchema } from '../result.schema';
4
3
  /**
5
4
  * Default implementation for the AiSuggestionSearchSchema.
@@ -12,11 +11,5 @@ export const aiSuggestionSearchSchema = createMutableSchema({
12
11
  $subSchema: resultSchema,
13
12
  },
14
13
  numFound: 'numFound',
15
- tagging: ({ tagging }) => {
16
- var _a;
17
- return ({
18
- query: getTaggingInfoFromUrl((_a = tagging === null || tagging === void 0 ? void 0 : tagging.query) !== null && _a !== void 0 ? _a : ''),
19
- });
20
- },
21
14
  });
22
15
  //# sourceMappingURL=suggestion-search.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestion-search.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAGzD;IACA,KAAK,EAAE,OAAO;IACd,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,YAAY;KACzB;IACD,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;;QAAC,OAAA,CAAC;YACzB,KAAK,EAAE,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAC;SACnD,CAAC,CAAA;KAAA;CACH,CAAC,CAAA","sourcesContent":["import type { AiSuggestionSearch } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionSearch } from '../../../types/models/ai/suggestion-search.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getTaggingInfoFromUrl } from '../../../mappers/url.utils'\nimport { resultSchema } from '../result.schema'\n\n/**\n * Default implementation for the AiSuggestionSearchSchema.\n * @public\n */\nexport const aiSuggestionSearchSchema = createMutableSchema<\n PlatformAiSuggestionSearch,\n AiSuggestionSearch\n>({\n query: 'query',\n results: {\n $path: 'results',\n $subSchema: resultSchema,\n },\n numFound: 'numFound',\n tagging: ({ tagging }) => ({\n query: getTaggingInfoFromUrl(tagging?.query ?? ''),\n }),\n})\n"]}
1
+ {"version":3,"file":"suggestion-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestion-search.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAGzD;IACA,KAAK,EAAE,OAAO;IACd,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,YAAY;KACzB;IACD,QAAQ,EAAE,UAAU;CACrB,CAAC,CAAA","sourcesContent":["import type { AiSuggestionSearch } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionSearch } from '../../../types/models/ai/suggestion-search.model'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { resultSchema } from '../result.schema'\n\n/**\n * Default implementation for the AiSuggestionSearchSchema.\n * @public\n */\nexport const aiSuggestionSearchSchema = createMutableSchema<\n PlatformAiSuggestionSearch,\n AiSuggestionSearch\n>({\n query: 'query',\n results: {\n $path: 'results',\n $subSchema: resultSchema,\n },\n numFound: 'numFound',\n})\n"]}
@@ -1,4 +1,5 @@
1
1
  import { createMutableSchema } from '@empathyco/x-adapter';
2
+ import { getTaggingInfoFromUrl } from '../../../mappers/url.utils';
2
3
  import { aiSuggestionSearchSchema } from './suggestion-search.schema';
3
4
  /**
4
5
  * Default implementation for the AIOverviewSuggestionsSearchSchema.
@@ -9,5 +10,13 @@ export const aiSuggestionsSearchSchema = createMutableSchema({
9
10
  $path: 'items',
10
11
  $subSchema: aiSuggestionSearchSchema,
11
12
  },
13
+ suggestionsTagging: {
14
+ query: ({ tagging }) => { var _a; return getTaggingInfoFromUrl((_a = tagging === null || tagging === void 0 ? void 0 : tagging.query) !== null && _a !== void 0 ? _a : ''); },
15
+ add2cart: ({ tagging }) => { var _a; return getTaggingInfoFromUrl((_a = tagging === null || tagging === void 0 ? void 0 : tagging.add2cart) !== null && _a !== void 0 ? _a : ''); },
16
+ click: ({ tagging }) => { var _a; return getTaggingInfoFromUrl((_a = tagging === null || tagging === void 0 ? void 0 : tagging.click) !== null && _a !== void 0 ? _a : ''); },
17
+ display: ({ tagging }) => { var _a; return getTaggingInfoFromUrl((_a = tagging === null || tagging === void 0 ? void 0 : tagging.display) !== null && _a !== void 0 ? _a : ''); },
18
+ displayClick: ({ tagging }) => { var _a; return getTaggingInfoFromUrl((_a = tagging === null || tagging === void 0 ? void 0 : tagging.displayClick) !== null && _a !== void 0 ? _a : ''); },
19
+ checkout: ({ tagging }) => { var _a; return getTaggingInfoFromUrl((_a = tagging === null || tagging === void 0 ? void 0 : tagging.checkout) !== null && _a !== void 0 ? _a : ''); },
20
+ },
12
21
  });
13
22
  //# sourceMappingURL=suggestions-search.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestions-search.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAG1D;IACA,WAAW,EAAE;QACX,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,wBAAwB;KACrC;CACF,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchResponse } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchResponse } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { aiSuggestionSearchSchema } from './suggestion-search.schema'\n\n/**\n * Default implementation for the AIOverviewSuggestionsSearchSchema.\n * @public\n */\nexport const aiSuggestionsSearchSchema = createMutableSchema<\n PlatformAiSuggestionsSearchResponse,\n AiSuggestionsSearchResponse\n>({\n suggestions: {\n $path: 'items',\n $subSchema: aiSuggestionSearchSchema,\n },\n})\n"]}
1
+ {"version":3,"file":"suggestions-search.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/models/ai/suggestions-search.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAG1D;IACA,WAAW,EAAE;QACX,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,wBAAwB;KACrC;IACD,kBAAkB,EAAE;QAClB,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAC,CAAA,EAAA;QACnE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,EAAE,CAAC,CAAA,EAAA;QACzE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAC,CAAA,EAAA;QACnE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,EAAE,CAAC,CAAA,EAAA;QACvE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,mCAAI,EAAE,CAAC,CAAA,EAAA;QACjF,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,WAAC,OAAA,qBAAqB,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,EAAE,CAAC,CAAA,EAAA;KAC1E;CACF,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchResponse } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchResponse } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\nimport { getTaggingInfoFromUrl } from '../../../mappers/url.utils'\nimport { aiSuggestionSearchSchema } from './suggestion-search.schema'\n\n/**\n * Default implementation for the AIOverviewSuggestionsSearchSchema.\n * @public\n */\nexport const aiSuggestionsSearchSchema = createMutableSchema<\n PlatformAiSuggestionsSearchResponse,\n AiSuggestionsSearchResponse\n>({\n suggestions: {\n $path: 'items',\n $subSchema: aiSuggestionSearchSchema,\n },\n suggestionsTagging: {\n query: ({ tagging }) => getTaggingInfoFromUrl(tagging?.query ?? ''),\n add2cart: ({ tagging }) => getTaggingInfoFromUrl(tagging?.add2cart ?? ''),\n click: ({ tagging }) => getTaggingInfoFromUrl(tagging?.click ?? ''),\n display: ({ tagging }) => getTaggingInfoFromUrl(tagging?.display ?? ''),\n displayClick: ({ tagging }) => getTaggingInfoFromUrl(tagging?.displayClick ?? ''),\n checkout: ({ tagging }) => getTaggingInfoFromUrl(tagging?.checkout ?? ''),\n },\n})\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion-search.model.js","sourceRoot":"","sources":["../../../../../src/types/models/ai/suggestion-search.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformResult } from '../result.model'\n\n/**\n * Each platform suggestion search is a query and the platform results of that query.\n * @public\n */\nexport interface PlatformAiSuggestionSearch {\n query: string\n results: PlatformResult[]\n numFound: number\n tagging?: { query: string }\n}\n"]}
1
+ {"version":3,"file":"suggestion-search.model.js","sourceRoot":"","sources":["../../../../../src/types/models/ai/suggestion-search.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformResult } from '../result.model'\n\n/**\n * Each platform suggestion search is a query and the platform results of that query.\n * @public\n */\nexport interface PlatformAiSuggestionSearch {\n query: string\n results: PlatformResult[]\n numFound: number\n}\n\nexport interface PlatformAiSuggestionSearchTagging {\n query: string\n add2cart: string\n click: string\n display: string\n displayClick: string\n checkout: string\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-search-response.model.js","sourceRoot":"","sources":["../../../../../src/types/responses/ai/suggestions-search-response.model.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlatformAiSuggestionSearch } from '../../models/ai/suggestion-search.model'\n\n/**\n * Response for the `AI suggestions search` endpoint.\n *\n * @public\n */\nexport interface PlatformAiSuggestionsSearchResponse {\n items: PlatformAiSuggestionSearch[]\n}\n"]}
1
+ {"version":3,"file":"suggestions-search-response.model.js","sourceRoot":"","sources":["../../../../../src/types/responses/ai/suggestions-search-response.model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n PlatformAiSuggestionSearch,\n PlatformAiSuggestionSearchTagging,\n} from '../../models/ai/suggestion-search.model'\n\n/**\n * Response for the `AI suggestions search` endpoint.\n *\n * @public\n */\nexport interface PlatformAiSuggestionsSearchResponse {\n items: PlatformAiSuggestionSearch[]\n tagging: PlatformAiSuggestionSearchTagging\n}\n"]}
@@ -7,7 +7,12 @@ export interface PlatformAiSuggestionSearch {
7
7
  query: string;
8
8
  results: PlatformResult[];
9
9
  numFound: number;
10
- tagging?: {
11
- query: string;
12
- };
10
+ }
11
+ export interface PlatformAiSuggestionSearchTagging {
12
+ query: string;
13
+ add2cart: string;
14
+ click: string;
15
+ display: string;
16
+ displayClick: string;
17
+ checkout: string;
13
18
  }
@@ -1,4 +1,4 @@
1
- import type { PlatformAiSuggestionSearch } from '../../models/ai/suggestion-search.model';
1
+ import type { PlatformAiSuggestionSearch, PlatformAiSuggestionSearchTagging } from '../../models/ai/suggestion-search.model';
2
2
  /**
3
3
  * Response for the `AI suggestions search` endpoint.
4
4
  *
@@ -6,4 +6,5 @@ import type { PlatformAiSuggestionSearch } from '../../models/ai/suggestion-sear
6
6
  */
7
7
  export interface PlatformAiSuggestionsSearchResponse {
8
8
  items: PlatformAiSuggestionSearch[];
9
+ tagging: PlatformAiSuggestionSearchTagging;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-adapter-platform",
3
- "version": "1.12.0",
3
+ "version": "2.0.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",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@empathyco/x-adapter": "8.2.0",
52
- "@empathyco/x-types": "10.11.0",
52
+ "@empathyco/x-types": "11.0.0",
53
53
  "@empathyco/x-utils": "1.1.0"
54
54
  },
55
55
  "devDependencies": {
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "f895c84e579714c8f285ad7c235fdbb828622903"
66
+ "gitHead": "806036d1d7b7e5dd5fb939259f1cdb5123aa3e7a"
67
67
  }
@@ -3347,19 +3347,64 @@
3347
3347
  "startIndex": 1,
3348
3348
  "endIndex": 3
3349
3349
  }
3350
+ }
3351
+ ],
3352
+ "extendsTokenRanges": []
3353
+ },
3354
+ {
3355
+ "kind": "Interface",
3356
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging:interface",
3357
+ "docComment": "",
3358
+ "excerptTokens": [
3359
+ {
3360
+ "kind": "Content",
3361
+ "text": "export interface PlatformAiSuggestionSearchTagging "
3362
+ }
3363
+ ],
3364
+ "fileUrlPath": "dist/types/types/models/ai/suggestion-search.model.d.ts",
3365
+ "releaseTag": "Public",
3366
+ "name": "PlatformAiSuggestionSearchTagging",
3367
+ "preserveMemberOrder": false,
3368
+ "members": [
3369
+ {
3370
+ "kind": "PropertySignature",
3371
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging#add2cart:member",
3372
+ "docComment": "",
3373
+ "excerptTokens": [
3374
+ {
3375
+ "kind": "Content",
3376
+ "text": "add2cart: "
3377
+ },
3378
+ {
3379
+ "kind": "Content",
3380
+ "text": "string"
3381
+ },
3382
+ {
3383
+ "kind": "Content",
3384
+ "text": ";"
3385
+ }
3386
+ ],
3387
+ "isReadonly": false,
3388
+ "isOptional": false,
3389
+ "releaseTag": "Public",
3390
+ "name": "add2cart",
3391
+ "propertyTypeTokenRange": {
3392
+ "startIndex": 1,
3393
+ "endIndex": 2
3394
+ }
3350
3395
  },
3351
3396
  {
3352
3397
  "kind": "PropertySignature",
3353
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearch#tagging:member",
3398
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging#checkout:member",
3354
3399
  "docComment": "",
3355
3400
  "excerptTokens": [
3356
3401
  {
3357
3402
  "kind": "Content",
3358
- "text": "tagging?: "
3403
+ "text": "checkout: "
3359
3404
  },
3360
3405
  {
3361
3406
  "kind": "Content",
3362
- "text": "{\n query: string;\n }"
3407
+ "text": "string"
3363
3408
  },
3364
3409
  {
3365
3410
  "kind": "Content",
@@ -3367,9 +3412,117 @@
3367
3412
  }
3368
3413
  ],
3369
3414
  "isReadonly": false,
3370
- "isOptional": true,
3415
+ "isOptional": false,
3371
3416
  "releaseTag": "Public",
3372
- "name": "tagging",
3417
+ "name": "checkout",
3418
+ "propertyTypeTokenRange": {
3419
+ "startIndex": 1,
3420
+ "endIndex": 2
3421
+ }
3422
+ },
3423
+ {
3424
+ "kind": "PropertySignature",
3425
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging#click:member",
3426
+ "docComment": "",
3427
+ "excerptTokens": [
3428
+ {
3429
+ "kind": "Content",
3430
+ "text": "click: "
3431
+ },
3432
+ {
3433
+ "kind": "Content",
3434
+ "text": "string"
3435
+ },
3436
+ {
3437
+ "kind": "Content",
3438
+ "text": ";"
3439
+ }
3440
+ ],
3441
+ "isReadonly": false,
3442
+ "isOptional": false,
3443
+ "releaseTag": "Public",
3444
+ "name": "click",
3445
+ "propertyTypeTokenRange": {
3446
+ "startIndex": 1,
3447
+ "endIndex": 2
3448
+ }
3449
+ },
3450
+ {
3451
+ "kind": "PropertySignature",
3452
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging#display:member",
3453
+ "docComment": "",
3454
+ "excerptTokens": [
3455
+ {
3456
+ "kind": "Content",
3457
+ "text": "display: "
3458
+ },
3459
+ {
3460
+ "kind": "Content",
3461
+ "text": "string"
3462
+ },
3463
+ {
3464
+ "kind": "Content",
3465
+ "text": ";"
3466
+ }
3467
+ ],
3468
+ "isReadonly": false,
3469
+ "isOptional": false,
3470
+ "releaseTag": "Public",
3471
+ "name": "display",
3472
+ "propertyTypeTokenRange": {
3473
+ "startIndex": 1,
3474
+ "endIndex": 2
3475
+ }
3476
+ },
3477
+ {
3478
+ "kind": "PropertySignature",
3479
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging#displayClick:member",
3480
+ "docComment": "",
3481
+ "excerptTokens": [
3482
+ {
3483
+ "kind": "Content",
3484
+ "text": "displayClick: "
3485
+ },
3486
+ {
3487
+ "kind": "Content",
3488
+ "text": "string"
3489
+ },
3490
+ {
3491
+ "kind": "Content",
3492
+ "text": ";"
3493
+ }
3494
+ ],
3495
+ "isReadonly": false,
3496
+ "isOptional": false,
3497
+ "releaseTag": "Public",
3498
+ "name": "displayClick",
3499
+ "propertyTypeTokenRange": {
3500
+ "startIndex": 1,
3501
+ "endIndex": 2
3502
+ }
3503
+ },
3504
+ {
3505
+ "kind": "PropertySignature",
3506
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging#query:member",
3507
+ "docComment": "",
3508
+ "excerptTokens": [
3509
+ {
3510
+ "kind": "Content",
3511
+ "text": "query: "
3512
+ },
3513
+ {
3514
+ "kind": "Content",
3515
+ "text": "string"
3516
+ },
3517
+ {
3518
+ "kind": "Content",
3519
+ "text": ";"
3520
+ }
3521
+ ],
3522
+ "isReadonly": false,
3523
+ "isOptional": false,
3524
+ "releaseTag": "Public",
3525
+ "name": "query",
3373
3526
  "propertyTypeTokenRange": {
3374
3527
  "startIndex": 1,
3375
3528
  "endIndex": 2
@@ -3595,6 +3748,34 @@
3595
3748
  "startIndex": 1,
3596
3749
  "endIndex": 3
3597
3750
  }
3751
+ },
3752
+ {
3753
+ "kind": "PropertySignature",
3754
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionsSearchResponse#tagging:member",
3755
+ "docComment": "",
3756
+ "excerptTokens": [
3757
+ {
3758
+ "kind": "Content",
3759
+ "text": "tagging: "
3760
+ },
3761
+ {
3762
+ "kind": "Reference",
3763
+ "text": "PlatformAiSuggestionSearchTagging",
3764
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearchTagging:interface"
3765
+ },
3766
+ {
3767
+ "kind": "Content",
3768
+ "text": ";"
3769
+ }
3770
+ ],
3771
+ "isReadonly": false,
3772
+ "isOptional": false,
3773
+ "releaseTag": "Public",
3774
+ "name": "tagging",
3775
+ "propertyTypeTokenRange": {
3776
+ "startIndex": 1,
3777
+ "endIndex": 2
3778
+ }
3598
3779
  }
3599
3780
  ],
3600
3781
  "extendsTokenRanges": []
@@ -292,10 +292,22 @@ export interface PlatformAiSuggestionSearch {
292
292
  query: string;
293
293
  // (undocumented)
294
294
  results: PlatformResult[];
295
+ }
296
+
297
+ // @public (undocumented)
298
+ export interface PlatformAiSuggestionSearchTagging {
295
299
  // (undocumented)
296
- tagging?: {
297
- query: string;
298
- };
300
+ add2cart: string;
301
+ // (undocumented)
302
+ checkout: string;
303
+ // (undocumented)
304
+ click: string;
305
+ // (undocumented)
306
+ display: string;
307
+ // (undocumented)
308
+ displayClick: string;
309
+ // (undocumented)
310
+ query: string;
299
311
  }
300
312
 
301
313
  // @public
@@ -332,6 +344,8 @@ export interface PlatformAiSuggestionsSearchRequest {
332
344
  export interface PlatformAiSuggestionsSearchResponse {
333
345
  // (undocumented)
334
346
  items: PlatformAiSuggestionSearch[];
347
+ // (undocumented)
348
+ tagging: PlatformAiSuggestionSearchTagging;
335
349
  }
336
350
 
337
351
  // @public