@empathyco/x-adapter-platform 1.1.0-alpha.34 → 1.1.0-alpha.36

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.
Files changed (21) hide show
  1. package/dist/cjs/schemas/models/ai/suggestion-search.schema.js +4 -0
  2. package/dist/cjs/schemas/models/ai/suggestion-search.schema.js.map +1 -1
  3. package/dist/cjs/schemas/requests/ai/suggestions-request.schema.js +8 -7
  4. package/dist/cjs/schemas/requests/ai/suggestions-request.schema.js.map +1 -1
  5. package/dist/cjs/schemas/requests/ai/suggestions-search-request.schema.js +8 -7
  6. package/dist/cjs/schemas/requests/ai/suggestions-search-request.schema.js.map +1 -1
  7. package/dist/cjs/types/models/ai/suggestion-search.model.js.map +1 -1
  8. package/dist/cjs/types/responses/ai/suggestions-search-response.model.js.map +1 -1
  9. package/dist/esm/schemas/models/ai/suggestion-search.schema.js +4 -0
  10. package/dist/esm/schemas/models/ai/suggestion-search.schema.js.map +1 -1
  11. package/dist/esm/schemas/requests/ai/suggestions-request.schema.js +8 -7
  12. package/dist/esm/schemas/requests/ai/suggestions-request.schema.js.map +1 -1
  13. package/dist/esm/schemas/requests/ai/suggestions-search-request.schema.js +8 -7
  14. package/dist/esm/schemas/requests/ai/suggestions-search-request.schema.js.map +1 -1
  15. package/dist/esm/types/models/ai/suggestion-search.model.js.map +1 -1
  16. package/dist/esm/types/responses/ai/suggestions-search-response.model.js.map +1 -1
  17. package/dist/types/types/models/ai/suggestion-search.model.d.ts +3 -0
  18. package/dist/types/types/responses/ai/suggestions-search-response.model.d.ts +2 -6
  19. package/package.json +3 -3
  20. package/report/x-adapter-platform.api.json +31 -8
  21. package/report/x-adapter-platform.api.md +5 -5
@@ -2,6 +2,7 @@
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");
5
6
  const result_schema_1 = require("../result.schema");
6
7
  /**
7
8
  * Default implementation for the AiSuggestionSearchSchema.
@@ -14,5 +15,8 @@ exports.aiSuggestionSearchSchema = (0, x_adapter_1.createMutableSchema)({
14
15
  $subSchema: result_schema_1.resultSchema,
15
16
  },
16
17
  numFound: 'numFound',
18
+ tagging: ({ tagging }) => ({
19
+ query: (0, url_utils_1.getTaggingInfoFromUrl)(tagging.query),
20
+ }),
17
21
  });
18
22
  //# 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,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"]}
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,CAAC,CAAC;QACzB,KAAK,EAAE,IAAA,iCAAqB,EAAC,OAAO,CAAC,KAAK,CAAC;KAC5C,CAAC;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"]}
@@ -8,14 +8,15 @@ const x_adapter_1 = require("@empathyco/x-adapter");
8
8
  * @public
9
9
  */
10
10
  exports.aiSuggestionsRequestSchema = (0, x_adapter_1.createMutableSchema)({
11
- context: ({ query, extraParams }) => {
12
- var _a;
13
- return ({
11
+ context: ({ query, extraParams, origin }) => {
12
+ var _a, _b;
13
+ const { lang, instance, ...restExtraParams } = extraParams !== null && extraParams !== void 0 ? extraParams : {};
14
+ return {
14
15
  query,
15
- lang: (_a = extraParams === null || extraParams === void 0 ? void 0 : extraParams.lang) !== null && _a !== void 0 ? _a : '',
16
- instance: extraParams === null || extraParams === void 0 ? void 0 : extraParams.instance,
17
- filters: extraParams === null || extraParams === void 0 ? void 0 : extraParams.filters,
18
- });
16
+ lang: (_a = lang) !== null && _a !== void 0 ? _a : '',
17
+ instance: (_b = instance) !== null && _b !== void 0 ? _b : '',
18
+ filters: { ...restExtraParams, origin },
19
+ };
19
20
  },
20
21
  });
21
22
  //# sourceMappingURL=suggestions-request.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-request.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAE1D;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,IAAA,+BAAmB,EAG3D;IACA,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE;;QAAC,OAAA,CAAC;YACpC,KAAK;YACL,IAAI,EAAE,MAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAA2B,mCAAI,EAAE;YACrD,QAAQ,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAA8B;YACrD,OAAO,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAA8C;SACrE,CAAC,CAAA;KAAA;CACH,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the aiSuggestionsRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsRequestSchema = createMutableSchema<\n AiSuggestionsRequest,\n PlatformAiSuggestionsRequest\n>({\n context: ({ query, extraParams }) => ({\n query,\n lang: (extraParams?.lang as string | undefined) ?? '',\n instance: extraParams?.instance as string | undefined,\n filters: extraParams?.filters as Record<string, unknown> | undefined,\n }),\n})\n"]}
1
+ {"version":3,"file":"suggestions-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-request.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAE1D;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,IAAA,+BAAmB,EAG3D;IACA,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE;;QAC1C,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAA;QAEhE,OAAO;YACL,KAAK;YACL,IAAI,EAAE,MAAC,IAA2B,mCAAI,EAAE;YACxC,QAAQ,EAAE,MAAC,QAA+B,mCAAI,EAAE;YAChD,OAAO,EAAE,EAAE,GAAG,eAAe,EAAE,MAAM,EAAE;SACxC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the aiSuggestionsRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsRequestSchema = createMutableSchema<\n AiSuggestionsRequest,\n PlatformAiSuggestionsRequest\n>({\n context: ({ query, extraParams, origin }) => {\n const { lang, instance, ...restExtraParams } = extraParams ?? {}\n\n return {\n query,\n lang: (lang as string | undefined) ?? '',\n instance: (instance as string | undefined) ?? '',\n filters: { ...restExtraParams, origin },\n }\n },\n})\n"]}
@@ -8,13 +8,14 @@ const x_adapter_1 = require("@empathyco/x-adapter");
8
8
  * @public
9
9
  */
10
10
  exports.aiSuggestionsSearchRequestSchema = (0, x_adapter_1.createMutableSchema)({
11
- context: ({ extraParams }) => {
12
- var _a;
13
- return ({
14
- lang: (_a = extraParams === null || extraParams === void 0 ? void 0 : extraParams.lang) !== null && _a !== void 0 ? _a : '',
15
- instance: extraParams === null || extraParams === void 0 ? void 0 : extraParams.instance,
16
- filters: extraParams === null || extraParams === void 0 ? void 0 : extraParams.filters,
17
- });
11
+ context: ({ extraParams, origin }) => {
12
+ var _a, _b;
13
+ const { lang, instance, ...restExtraParams } = extraParams !== null && extraParams !== void 0 ? extraParams : {};
14
+ return {
15
+ lang: (_a = lang) !== null && _a !== void 0 ? _a : '',
16
+ instance: (_b = instance) !== null && _b !== void 0 ? _b : '',
17
+ filters: { ...restExtraParams, origin },
18
+ };
18
19
  },
19
20
  queries: 'queries',
20
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-search-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-search-request.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAE1D;;;;GAIG;AACU,QAAA,gCAAgC,GAAG,IAAA,+BAAmB,EAGjE;IACA,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;;QAAC,OAAA,CAAC;YAC7B,IAAI,EAAE,MAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAA2B,mCAAI,EAAE;YACrD,QAAQ,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAA8B;YACrD,OAAO,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAA8C;SACrE,CAAC,CAAA;KAAA;IACF,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the AiOverviewSuggestionsSearchRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsSearchRequestSchema = createMutableSchema<\n AiSuggestionsSearchRequest,\n PlatformAiSuggestionsSearchRequest\n>({\n context: ({ extraParams }) => ({\n lang: (extraParams?.lang as string | undefined) ?? '',\n instance: extraParams?.instance as string | undefined,\n filters: extraParams?.filters as Record<string, unknown> | undefined,\n }),\n queries: 'queries',\n})\n"]}
1
+ {"version":3,"file":"suggestions-search-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-search-request.schema.ts"],"names":[],"mappings":";;;AAEA,oDAA0D;AAE1D;;;;GAIG;AACU,QAAA,gCAAgC,GAAG,IAAA,+BAAmB,EAGjE;IACA,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE;;QACnC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAA;QAEhE,OAAO;YACL,IAAI,EAAE,MAAC,IAA2B,mCAAI,EAAE;YACxC,QAAQ,EAAE,MAAC,QAA+B,mCAAI,EAAE;YAChD,OAAO,EAAE,EAAE,GAAG,eAAe,EAAE,MAAM,EAAE;SACxC,CAAA;IACH,CAAC;IACD,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the AiOverviewSuggestionsSearchRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsSearchRequestSchema = createMutableSchema<\n AiSuggestionsSearchRequest,\n PlatformAiSuggestionsSearchRequest\n>({\n context: ({ extraParams, origin }) => {\n const { lang, instance, ...restExtraParams } = extraParams ?? {}\n\n return {\n lang: (lang as string | undefined) ?? '',\n instance: (instance as string | undefined) ?? '',\n filters: { ...restExtraParams, origin },\n }\n },\n queries: 'queries',\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}\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 tagging: { query: 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 { PlatformResult } from '../../models/result.model'\n\n/**\n * Response for the `AI suggestions search` endpoint.\n *\n * @public\n */\nexport interface PlatformAiSuggestionsSearchResponse {\n items: {\n query: string\n results: PlatformResult[]\n numFound: number\n }[]\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 { 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,4 +1,5 @@
1
1
  import { createMutableSchema } from '@empathyco/x-adapter';
2
+ import { getTaggingInfoFromUrl } from '../../../mappers/url.utils';
2
3
  import { resultSchema } from '../result.schema';
3
4
  /**
4
5
  * Default implementation for the AiSuggestionSearchSchema.
@@ -11,5 +12,8 @@ export const aiSuggestionSearchSchema = createMutableSchema({
11
12
  $subSchema: resultSchema,
12
13
  },
13
14
  numFound: 'numFound',
15
+ tagging: ({ tagging }) => ({
16
+ query: getTaggingInfoFromUrl(tagging.query),
17
+ }),
14
18
  });
15
19
  //# 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,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
+ {"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,CAAC,CAAC;QACzB,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC;KAC5C,CAAC;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"]}
@@ -5,14 +5,15 @@ import { createMutableSchema } from '@empathyco/x-adapter';
5
5
  * @public
6
6
  */
7
7
  export const aiSuggestionsRequestSchema = createMutableSchema({
8
- context: ({ query, extraParams }) => {
9
- var _a;
10
- return ({
8
+ context: ({ query, extraParams, origin }) => {
9
+ var _a, _b;
10
+ const { lang, instance, ...restExtraParams } = extraParams !== null && extraParams !== void 0 ? extraParams : {};
11
+ return {
11
12
  query,
12
- lang: (_a = extraParams === null || extraParams === void 0 ? void 0 : extraParams.lang) !== null && _a !== void 0 ? _a : '',
13
- instance: extraParams === null || extraParams === void 0 ? void 0 : extraParams.instance,
14
- filters: extraParams === null || extraParams === void 0 ? void 0 : extraParams.filters,
15
- });
13
+ lang: (_a = lang) !== null && _a !== void 0 ? _a : '',
14
+ instance: (_b = instance) !== null && _b !== void 0 ? _b : '',
15
+ filters: { ...restExtraParams, origin },
16
+ };
16
17
  },
17
18
  });
18
19
  //# sourceMappingURL=suggestions-request.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-request.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAG3D;IACA,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE;;QAAC,OAAA,CAAC;YACpC,KAAK;YACL,IAAI,EAAE,MAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAA2B,mCAAI,EAAE;YACrD,QAAQ,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAA8B;YACrD,OAAO,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAA8C;SACrE,CAAC,CAAA;KAAA;CACH,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the aiSuggestionsRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsRequestSchema = createMutableSchema<\n AiSuggestionsRequest,\n PlatformAiSuggestionsRequest\n>({\n context: ({ query, extraParams }) => ({\n query,\n lang: (extraParams?.lang as string | undefined) ?? '',\n instance: extraParams?.instance as string | undefined,\n filters: extraParams?.filters as Record<string, unknown> | undefined,\n }),\n})\n"]}
1
+ {"version":3,"file":"suggestions-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-request.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAG3D;IACA,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE;;QAC1C,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAA;QAEhE,OAAO;YACL,KAAK;YACL,IAAI,EAAE,MAAC,IAA2B,mCAAI,EAAE;YACxC,QAAQ,EAAE,MAAC,QAA+B,mCAAI,EAAE;YAChD,OAAO,EAAE,EAAE,GAAG,eAAe,EAAE,MAAM,EAAE;SACxC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the aiSuggestionsRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsRequestSchema = createMutableSchema<\n AiSuggestionsRequest,\n PlatformAiSuggestionsRequest\n>({\n context: ({ query, extraParams, origin }) => {\n const { lang, instance, ...restExtraParams } = extraParams ?? {}\n\n return {\n query,\n lang: (lang as string | undefined) ?? '',\n instance: (instance as string | undefined) ?? '',\n filters: { ...restExtraParams, origin },\n }\n },\n})\n"]}
@@ -5,13 +5,14 @@ import { createMutableSchema } from '@empathyco/x-adapter';
5
5
  * @public
6
6
  */
7
7
  export const aiSuggestionsSearchRequestSchema = createMutableSchema({
8
- context: ({ extraParams }) => {
9
- var _a;
10
- return ({
11
- lang: (_a = extraParams === null || extraParams === void 0 ? void 0 : extraParams.lang) !== null && _a !== void 0 ? _a : '',
12
- instance: extraParams === null || extraParams === void 0 ? void 0 : extraParams.instance,
13
- filters: extraParams === null || extraParams === void 0 ? void 0 : extraParams.filters,
14
- });
8
+ context: ({ extraParams, origin }) => {
9
+ var _a, _b;
10
+ const { lang, instance, ...restExtraParams } = extraParams !== null && extraParams !== void 0 ? extraParams : {};
11
+ return {
12
+ lang: (_a = lang) !== null && _a !== void 0 ? _a : '',
13
+ instance: (_b = instance) !== null && _b !== void 0 ? _b : '',
14
+ filters: { ...restExtraParams, origin },
15
+ };
15
16
  },
16
17
  queries: 'queries',
17
18
  });
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-search-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-search-request.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAGjE;IACA,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;;QAAC,OAAA,CAAC;YAC7B,IAAI,EAAE,MAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAA2B,mCAAI,EAAE;YACrD,QAAQ,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAA8B;YACrD,OAAO,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAA8C;SACrE,CAAC,CAAA;KAAA;IACF,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the AiOverviewSuggestionsSearchRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsSearchRequestSchema = createMutableSchema<\n AiSuggestionsSearchRequest,\n PlatformAiSuggestionsSearchRequest\n>({\n context: ({ extraParams }) => ({\n lang: (extraParams?.lang as string | undefined) ?? '',\n instance: extraParams?.instance as string | undefined,\n filters: extraParams?.filters as Record<string, unknown> | undefined,\n }),\n queries: 'queries',\n})\n"]}
1
+ {"version":3,"file":"suggestions-search-request.schema.js","sourceRoot":"","sources":["../../../../../src/schemas/requests/ai/suggestions-search-request.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAGjE;IACA,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE;;QACnC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAA;QAEhE,OAAO;YACL,IAAI,EAAE,MAAC,IAA2B,mCAAI,EAAE;YACxC,QAAQ,EAAE,MAAC,QAA+B,mCAAI,EAAE;YAChD,OAAO,EAAE,EAAE,GAAG,eAAe,EAAE,MAAM,EAAE;SACxC,CAAA;IACH,CAAC;IACD,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA","sourcesContent":["import type { AiSuggestionsSearchRequest } from '@empathyco/x-types'\nimport type { PlatformAiSuggestionsSearchRequest } from '../../../types'\nimport { createMutableSchema } from '@empathyco/x-adapter'\n\n/**\n * Default implementation for the AiOverviewSuggestionsSearchRequestSchema.\n *\n * @public\n */\nexport const aiSuggestionsSearchRequestSchema = createMutableSchema<\n AiSuggestionsSearchRequest,\n PlatformAiSuggestionsSearchRequest\n>({\n context: ({ extraParams, origin }) => {\n const { lang, instance, ...restExtraParams } = extraParams ?? {}\n\n return {\n lang: (lang as string | undefined) ?? '',\n instance: (instance as string | undefined) ?? '',\n filters: { ...restExtraParams, origin },\n }\n },\n queries: 'queries',\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}\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 tagging: { query: 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 { PlatformResult } from '../../models/result.model'\n\n/**\n * Response for the `AI suggestions search` endpoint.\n *\n * @public\n */\nexport interface PlatformAiSuggestionsSearchResponse {\n items: {\n query: string\n results: PlatformResult[]\n numFound: number\n }[]\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 { 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"]}
@@ -7,4 +7,7 @@ export interface PlatformAiSuggestionSearch {
7
7
  query: string;
8
8
  results: PlatformResult[];
9
9
  numFound: number;
10
+ tagging: {
11
+ query: string;
12
+ };
10
13
  }
@@ -1,13 +1,9 @@
1
- import type { PlatformResult } from '../../models/result.model';
1
+ import type { PlatformAiSuggestionSearch } from '../../models/ai/suggestion-search.model';
2
2
  /**
3
3
  * Response for the `AI suggestions search` endpoint.
4
4
  *
5
5
  * @public
6
6
  */
7
7
  export interface PlatformAiSuggestionsSearchResponse {
8
- items: {
9
- query: string;
10
- results: PlatformResult[];
11
- numFound: number;
12
- }[];
8
+ items: PlatformAiSuggestionSearch[];
13
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-adapter-platform",
3
- "version": "1.1.0-alpha.34",
3
+ "version": "1.1.0-alpha.36",
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",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@empathyco/x-adapter": "^8.1.0-alpha.9",
49
- "@empathyco/x-types": "^10.1.0-alpha.27",
49
+ "@empathyco/x-types": "^10.1.0-alpha.29",
50
50
  "@empathyco/x-utils": "^1.0.3-alpha.8",
51
51
  "tslib": "~2.6.0"
52
52
  },
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "8a4f6a832cd1b7c851c1afc596c95abc62a324c4"
66
+ "gitHead": "df6d870b0ddca55abaa2821a016ec899a0695c92"
67
67
  }
@@ -3589,6 +3589,33 @@
3589
3589
  "startIndex": 1,
3590
3590
  "endIndex": 3
3591
3591
  }
3592
+ },
3593
+ {
3594
+ "kind": "PropertySignature",
3595
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearch#tagging:member",
3596
+ "docComment": "",
3597
+ "excerptTokens": [
3598
+ {
3599
+ "kind": "Content",
3600
+ "text": "tagging: "
3601
+ },
3602
+ {
3603
+ "kind": "Content",
3604
+ "text": "{\n query: string;\n }"
3605
+ },
3606
+ {
3607
+ "kind": "Content",
3608
+ "text": ";"
3609
+ }
3610
+ ],
3611
+ "isReadonly": false,
3612
+ "isOptional": false,
3613
+ "releaseTag": "Public",
3614
+ "name": "tagging",
3615
+ "propertyTypeTokenRange": {
3616
+ "startIndex": 1,
3617
+ "endIndex": 2
3618
+ }
3592
3619
  }
3593
3620
  ],
3594
3621
  "extendsTokenRanges": []
@@ -3752,18 +3779,14 @@
3752
3779
  "kind": "Content",
3753
3780
  "text": "items: "
3754
3781
  },
3755
- {
3756
- "kind": "Content",
3757
- "text": "{\n query: string;\n results: "
3758
- },
3759
3782
  {
3760
3783
  "kind": "Reference",
3761
- "text": "PlatformResult",
3762
- "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult:interface"
3784
+ "text": "PlatformAiSuggestionSearch",
3785
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearch:interface"
3763
3786
  },
3764
3787
  {
3765
3788
  "kind": "Content",
3766
- "text": "[];\n numFound: number;\n }[]"
3789
+ "text": "[]"
3767
3790
  },
3768
3791
  {
3769
3792
  "kind": "Content",
@@ -3776,7 +3799,7 @@
3776
3799
  "name": "items",
3777
3800
  "propertyTypeTokenRange": {
3778
3801
  "startIndex": 1,
3779
- "endIndex": 4
3802
+ "endIndex": 3
3780
3803
  }
3781
3804
  }
3782
3805
  ],
@@ -309,6 +309,10 @@ export interface PlatformAiSuggestionSearch {
309
309
  query: string;
310
310
  // (undocumented)
311
311
  results: PlatformResult[];
312
+ // (undocumented)
313
+ tagging: {
314
+ query: string;
315
+ };
312
316
  }
313
317
 
314
318
  // @public
@@ -340,11 +344,7 @@ export interface PlatformAiSuggestionsSearchRequest {
340
344
  // @public
341
345
  export interface PlatformAiSuggestionsSearchResponse {
342
346
  // (undocumented)
343
- items: {
344
- query: string;
345
- results: PlatformResult[];
346
- numFound: number;
347
- }[];
347
+ items: PlatformAiSuggestionSearch[];
348
348
  }
349
349
 
350
350
  // @public