@wix/auto_sdk_igor_document-search 1.0.0 → 1.0.2

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 (50) hide show
  1. package/build/cjs/index.d.ts +38 -158
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +201 -1
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +10 -7
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +54 -0
  11. package/build/cjs/schemas.js +115 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +38 -158
  14. package/build/es/index.mjs +18 -0
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +201 -1
  17. package/build/es/index.typings.mjs +18 -0
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +10 -7
  20. package/build/es/meta.mjs +18 -0
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +54 -0
  23. package/build/es/schemas.mjs +75 -0
  24. package/build/es/schemas.mjs.map +1 -0
  25. package/build/internal/cjs/index.d.ts +7 -10
  26. package/build/internal/cjs/index.js +18 -0
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +25 -20
  29. package/build/internal/cjs/index.typings.js +18 -0
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +8 -6
  32. package/build/internal/cjs/meta.js +18 -0
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +54 -0
  35. package/build/internal/cjs/schemas.js +115 -0
  36. package/build/internal/cjs/schemas.js.map +1 -0
  37. package/build/internal/es/index.d.mts +7 -10
  38. package/build/internal/es/index.mjs +18 -0
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +25 -20
  41. package/build/internal/es/index.typings.mjs +18 -0
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +8 -6
  44. package/build/internal/es/meta.mjs +18 -0
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +54 -0
  47. package/build/internal/es/schemas.mjs +75 -0
  48. package/build/internal/es/schemas.mjs.map +1 -0
  49. package/package.json +11 -5
  50. package/schemas/package.json +3 -0
@@ -0,0 +1,54 @@
1
+ import * as z from 'zod';
2
+
3
+ declare const SearchDocumentsRequest: z.ZodObject<{
4
+ searchTerm: z.ZodString;
5
+ options: z.ZodOptional<z.ZodObject<{
6
+ maximumResults: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
7
+ documentType: z.ZodOptional<z.ZodEnum<{
8
+ DOCUMENT_TYPE_UNSPECIFIED: "DOCUMENT_TYPE_UNSPECIFIED";
9
+ VELO: "VELO";
10
+ SDK: "SDK";
11
+ REST: "REST";
12
+ WDS: "WDS";
13
+ BUILD_APPS: "BUILD_APPS";
14
+ WIX_HEADLESS: "WIX_HEADLESS";
15
+ CLI: "CLI";
16
+ BUSINESS_SOLUTIONS: "BUSINESS_SOLUTIONS";
17
+ }>>;
18
+ linesInEachResult: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
19
+ }, z.core.$strip>>;
20
+ }, z.core.$strip>;
21
+ declare const SearchDocumentsResponse: z.ZodObject<{
22
+ results: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
+ _id: z.ZodOptional<z.ZodString>;
24
+ _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
25
+ title: z.ZodOptional<z.ZodString>;
26
+ content: z.ZodOptional<z.ZodString>;
27
+ url: z.ZodOptional<z.ZodString>;
28
+ relevanceScore: z.ZodOptional<z.ZodNumber>;
29
+ kbName: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strip>>>;
31
+ }, z.core.$strip>;
32
+ declare const SearchDocumentsMarkdownRequest: z.ZodObject<{
33
+ searchTerm: z.ZodString;
34
+ options: z.ZodOptional<z.ZodObject<{
35
+ documentType: z.ZodOptional<z.ZodEnum<{
36
+ DOCUMENT_TYPE_UNSPECIFIED: "DOCUMENT_TYPE_UNSPECIFIED";
37
+ VELO: "VELO";
38
+ SDK: "SDK";
39
+ REST: "REST";
40
+ WDS: "WDS";
41
+ BUILD_APPS: "BUILD_APPS";
42
+ WIX_HEADLESS: "WIX_HEADLESS";
43
+ CLI: "CLI";
44
+ BUSINESS_SOLUTIONS: "BUSINESS_SOLUTIONS";
45
+ }>>;
46
+ maximumResults: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
47
+ linesInEachResult: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>;
50
+ declare const SearchDocumentsMarkdownResponse: z.ZodObject<{
51
+ content: z.ZodOptional<z.ZodString>;
52
+ }, z.core.$strip>;
53
+
54
+ export { SearchDocumentsMarkdownRequest, SearchDocumentsMarkdownResponse, SearchDocumentsRequest, SearchDocumentsResponse };
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // schemas.ts
31
+ var schemas_exports = {};
32
+ __export(schemas_exports, {
33
+ SearchDocumentsMarkdownRequest: () => SearchDocumentsMarkdownRequest,
34
+ SearchDocumentsMarkdownResponse: () => SearchDocumentsMarkdownResponse,
35
+ SearchDocumentsRequest: () => SearchDocumentsRequest,
36
+ SearchDocumentsResponse: () => SearchDocumentsResponse
37
+ });
38
+ module.exports = __toCommonJS(schemas_exports);
39
+
40
+ // src/igor-v1-document-entry-document-search.schemas.ts
41
+ var z = __toESM(require("zod"));
42
+ var SearchDocumentsRequest = z.object({
43
+ searchTerm: z.string().describe("The search term to look up in the documentation.").min(1).max(500),
44
+ options: z.object({
45
+ maximumResults: z.number().int().describe(
46
+ "The maximum number of results to return. Defaults to 15. Valid range: [1, 20]."
47
+ ).min(1).max(20).optional().nullable(),
48
+ documentType: z.enum([
49
+ "DOCUMENT_TYPE_UNSPECIFIED",
50
+ "VELO",
51
+ "SDK",
52
+ "REST",
53
+ "WDS",
54
+ "BUILD_APPS",
55
+ "WIX_HEADLESS",
56
+ "CLI",
57
+ "BUSINESS_SOLUTIONS"
58
+ ]).optional(),
59
+ linesInEachResult: z.number().int().describe(
60
+ 'Maximum number of lines to include per result content. Defaults to 20.\nMethod results use section-aware truncation; article results are truncated\nat this line count. A "Read more here: <url>" hint is appended when content\nis truncated.'
61
+ ).min(1).max(200).optional().nullable()
62
+ }).optional()
63
+ });
64
+ var SearchDocumentsResponse = z.object({
65
+ results: z.array(
66
+ z.object({
67
+ _id: z.string().describe("The unique identifier for this documentation entry.").max(500).optional(),
68
+ _updatedDate: z.date().describe("The date the document was last updated.").optional().nullable(),
69
+ title: z.string().describe("The title of the documentation entry.").max(1e3).optional(),
70
+ content: z.string().describe("The full text content of the documentation entry.").max(1e5).optional(),
71
+ url: z.string().describe("The direct URL to the documentation page for this entry.").max(2e3).optional(),
72
+ relevanceScore: z.number().describe(
73
+ "The relevance score in the range [0, 1]. Higher means more relevant."
74
+ ).optional(),
75
+ kbName: z.string().describe(
76
+ 'The knowledge base this entry was retrieved from (e.g. "REST_METHODS_KB_ID").'
77
+ ).max(100).optional()
78
+ })
79
+ ).max(100).optional()
80
+ });
81
+ var SearchDocumentsMarkdownRequest = z.object({
82
+ searchTerm: z.string().describe("The search term to look up in the documentation.").min(1).max(500),
83
+ options: z.object({
84
+ documentType: z.enum([
85
+ "DOCUMENT_TYPE_UNSPECIFIED",
86
+ "VELO",
87
+ "SDK",
88
+ "REST",
89
+ "WDS",
90
+ "BUILD_APPS",
91
+ "WIX_HEADLESS",
92
+ "CLI",
93
+ "BUSINESS_SOLUTIONS"
94
+ ]).optional(),
95
+ maximumResults: z.number().int().describe(
96
+ "The maximum number of results to return. Defaults to 15. Valid range: [1, 20]."
97
+ ).min(1).max(20).optional().nullable(),
98
+ linesInEachResult: z.number().int().describe(
99
+ 'Maximum number of lines to include per result. Defaults to 20. Method\nresults use section-aware truncation; article results are truncated at this\nline count. A "Read more here: <url>" hint is appended when content is\ntruncated.'
100
+ ).min(1).max(200).optional().nullable()
101
+ }).optional()
102
+ });
103
+ var SearchDocumentsMarkdownResponse = z.object({
104
+ content: z.string().describe(
105
+ "The search results as a single markdown document. Method results are interleaved\nwith article results. Results are separated by a line of equal signs."
106
+ ).max(5e5).optional()
107
+ });
108
+ // Annotate the CommonJS export names for ESM import in node:
109
+ 0 && (module.exports = {
110
+ SearchDocumentsMarkdownRequest,
111
+ SearchDocumentsMarkdownResponse,
112
+ SearchDocumentsRequest,
113
+ SearchDocumentsResponse
114
+ });
115
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../schemas.ts","../../../src/igor-v1-document-entry-document-search.schemas.ts"],"sourcesContent":["export * from './src/igor-v1-document-entry-document-search.schemas.js';\n","import * as z from 'zod';\n\nexport const SearchDocumentsRequest = z.object({\n searchTerm: z\n .string()\n .describe('The search term to look up in the documentation.')\n .min(1)\n .max(500),\n options: z\n .object({\n maximumResults: z\n .number()\n .int()\n .describe(\n 'The maximum number of results to return. Defaults to 15. Valid range: [1, 20].'\n )\n .min(1)\n .max(20)\n .optional()\n .nullable(),\n documentType: z\n .enum([\n 'DOCUMENT_TYPE_UNSPECIFIED',\n 'VELO',\n 'SDK',\n 'REST',\n 'WDS',\n 'BUILD_APPS',\n 'WIX_HEADLESS',\n 'CLI',\n 'BUSINESS_SOLUTIONS',\n ])\n .optional(),\n linesInEachResult: z\n .number()\n .int()\n .describe(\n 'Maximum number of lines to include per result content. Defaults to 20.\\nMethod results use section-aware truncation; article results are truncated\\nat this line count. A \"Read more here: <url>\" hint is appended when content\\nis truncated.'\n )\n .min(1)\n .max(200)\n .optional()\n .nullable(),\n })\n .optional(),\n});\nexport const SearchDocumentsResponse = z.object({\n results: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('The unique identifier for this documentation entry.')\n .max(500)\n .optional(),\n _updatedDate: z\n .date()\n .describe('The date the document was last updated.')\n .optional()\n .nullable(),\n title: z\n .string()\n .describe('The title of the documentation entry.')\n .max(1000)\n .optional(),\n content: z\n .string()\n .describe('The full text content of the documentation entry.')\n .max(100000)\n .optional(),\n url: z\n .string()\n .describe('The direct URL to the documentation page for this entry.')\n .max(2000)\n .optional(),\n relevanceScore: z\n .number()\n .describe(\n 'The relevance score in the range [0, 1]. Higher means more relevant.'\n )\n .optional(),\n kbName: z\n .string()\n .describe(\n 'The knowledge base this entry was retrieved from (e.g. \"REST_METHODS_KB_ID\").'\n )\n .max(100)\n .optional(),\n })\n )\n .max(100)\n .optional(),\n});\nexport const SearchDocumentsMarkdownRequest = z.object({\n searchTerm: z\n .string()\n .describe('The search term to look up in the documentation.')\n .min(1)\n .max(500),\n options: z\n .object({\n documentType: z\n .enum([\n 'DOCUMENT_TYPE_UNSPECIFIED',\n 'VELO',\n 'SDK',\n 'REST',\n 'WDS',\n 'BUILD_APPS',\n 'WIX_HEADLESS',\n 'CLI',\n 'BUSINESS_SOLUTIONS',\n ])\n .optional(),\n maximumResults: z\n .number()\n .int()\n .describe(\n 'The maximum number of results to return. Defaults to 15. Valid range: [1, 20].'\n )\n .min(1)\n .max(20)\n .optional()\n .nullable(),\n linesInEachResult: z\n .number()\n .int()\n .describe(\n 'Maximum number of lines to include per result. Defaults to 20. Method\\nresults use section-aware truncation; article results are truncated at this\\nline count. A \"Read more here: <url>\" hint is appended when content is\\ntruncated.'\n )\n .min(1)\n .max(200)\n .optional()\n .nullable(),\n })\n .optional(),\n});\nexport const SearchDocumentsMarkdownResponse = z.object({\n content: z\n .string()\n .describe(\n 'The search results as a single markdown document. Method results are interleaved\\nwith article results. Results are separated by a line of equal signs.'\n )\n .max(500000)\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,yBAA2B,SAAO;AAAA,EAC7C,YACG,SAAO,EACP,SAAS,kDAAkD,EAC3D,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACV,SACG,SAAO;AAAA,IACN,gBACG,SAAO,EACP,IAAI,EACJ;AAAA,MACC;AAAA,IACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS,EACT,SAAS;AAAA,IACZ,cACG,OAAK;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,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ACC;AAAA,IACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,kCAAoC,SAAO;AAAA,EACtD,SACG,SAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,IAAI,GAAM,EACV,SAAS;AACd,CAAC;","names":[]}
@@ -2,7 +2,6 @@ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@
2
2
  import { SearchDocumentsOptions, SearchDocumentsResponse, SearchDocumentsMarkdownOptions, SearchDocumentsMarkdownResponse } from './index.typings.mjs';
3
3
  export { DocumentEntry, DocumentType, DocumentTypeWithLiterals, SearchDocumentsMarkdownRequest, SearchDocumentsRequest } from './index.typings.mjs';
4
4
 
5
- /** @internal */
6
5
  declare function searchDocuments$1(httpClient: HttpClient): SearchDocumentsSignature;
7
6
  interface SearchDocumentsSignature {
8
7
  /**
@@ -10,14 +9,14 @@ interface SearchDocumentsSignature {
10
9
  *
11
10
  * Returns a ranked list of matching documentation entries ordered by relevance
12
11
  * score descending. Method results include kb_name to identify the source
13
- * knowledge base. Use lines_in_each_result to get truncated snippets with
14
- * contextual "read more" hints instead of full content.
12
+ * knowledge base. Each result is truncated to lines_in_each_result lines
13
+ * (defaults to 20) with contextual "read more" hints; pass a larger value
14
+ * for more content per result.
15
15
  * @param - The search term to look up in the documentation.
16
16
  * @returns The result of a SearchDocuments call.
17
17
  */
18
18
  (searchTerm: string, options?: SearchDocumentsOptions): Promise<NonNullablePaths<SearchDocumentsResponse, `results` | `results.${number}._id` | `results.${number}.title` | `results.${number}.content` | `results.${number}.url` | `results.${number}.relevanceScore` | `results.${number}.kbName`, 4>>;
19
19
  }
20
- /** @internal */
21
20
  declare function searchDocumentsMarkdown$1(httpClient: HttpClient): SearchDocumentsMarkdownSignature;
22
21
  interface SearchDocumentsMarkdownSignature {
23
22
  /**
@@ -25,19 +24,17 @@ interface SearchDocumentsMarkdownSignature {
25
24
  * ready to be passed directly to an LLM.
26
25
  *
27
26
  * Method results are interleaved 2-by-2 with article results so both types
28
- * always appear. When lines_in_each_result is set, each result is truncated
29
- * with a contextual hint (method results get a schema read hint; article
30
- * results get a "read the full article" hint). Results are separated by a
31
- * line of equal signs.
27
+ * always appear. Each result is truncated to lines_in_each_result lines
28
+ * (defaults to 20) with a contextual hint (method results get a schema read
29
+ * hint; article results get a "read the full article" hint). Results are
30
+ * separated by a line of equal signs.
32
31
  * @param - The search term to look up in the documentation.
33
32
  * @returns The result of a SearchDocumentsMarkdown call.
34
33
  */
35
34
  (searchTerm: string, options?: SearchDocumentsMarkdownOptions): Promise<NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>>;
36
35
  }
37
36
 
38
- /** @internal */
39
37
  declare const searchDocuments: MaybeContext<BuildRESTFunction<typeof searchDocuments$1> & typeof searchDocuments$1>;
40
- /** @internal */
41
38
  declare const searchDocumentsMarkdown: MaybeContext<BuildRESTFunction<typeof searchDocumentsMarkdown$1> & typeof searchDocumentsMarkdown$1>;
42
39
 
43
40
  export { SearchDocumentsMarkdownOptions, SearchDocumentsMarkdownResponse, SearchDocumentsOptions, SearchDocumentsResponse, searchDocuments, searchDocumentsMarkdown };
@@ -17,6 +17,24 @@ function resolveWixIgorV1DocumentSearchServiceUrl(opts) {
17
17
  srcPath: "/mcp-docs-search/v1",
18
18
  destPath: ""
19
19
  }
20
+ ],
21
+ "bo._base_domain_": [
22
+ {
23
+ srcPath: "/mcp-docs-search/v1",
24
+ destPath: ""
25
+ }
26
+ ],
27
+ "wixbo.ai": [
28
+ {
29
+ srcPath: "/mcp-docs-search/v1",
30
+ destPath: ""
31
+ }
32
+ ],
33
+ "wix-bo.com": [
34
+ {
35
+ srcPath: "/mcp-docs-search/v1",
36
+ destPath: ""
37
+ }
20
38
  ]
21
39
  };
22
40
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/igor-v1-document-entry-document-search.universal.ts","../../../src/igor-v1-document-entry-document-search.http.ts","../../../src/igor-v1-document-entry-document-search.public.ts","../../../src/igor-v1-document-entry-document-search.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIgorV1DocumentEntry from './igor-v1-document-entry-document-search.http.js';\n\n/** A Wix documentation entry returned as a search result. */\nexport interface DocumentEntry {\n /**\n * The unique identifier for this documentation entry.\n * @maxLength 500\n */\n _id?: string;\n /** The date the document was last updated. */\n _updatedDate?: Date | null;\n /**\n * The title of the documentation entry.\n * @maxLength 1000\n */\n title?: string;\n /**\n * The full text content of the documentation entry.\n * @maxLength 100000\n */\n content?: string;\n /**\n * The direct URL to the documentation page for this entry.\n * @maxLength 2000\n */\n url?: string;\n /** The relevance score in the range [0, 1]. Higher means more relevant. */\n relevanceScore?: number;\n /**\n * The knowledge base this entry was retrieved from (e.g. \"REST_METHODS_KB_ID\").\n * @maxLength 100\n */\n kbName?: string;\n}\n\n/** The parameters for a SearchDocuments call. */\nexport interface SearchDocumentsRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The type of Wix documentation to search. */\nexport enum DocumentType {\n /** Default value. Must not be used. */\n DOCUMENT_TYPE_UNSPECIFIED = 'DOCUMENT_TYPE_UNSPECIFIED',\n /** Velo JavaScript APIs for Wix sites. */\n VELO = 'VELO',\n /** Wix JavaScript SDK for headless and external applications. */\n SDK = 'SDK',\n /** Wix REST APIs. */\n REST = 'REST',\n /** Wix Design System documentation. */\n WDS = 'WDS',\n /** Documentation for building Wix apps. */\n BUILD_APPS = 'BUILD_APPS',\n /** Wix Headless documentation for external and headless applications. */\n WIX_HEADLESS = 'WIX_HEADLESS',\n /** Wix CLI documentation. */\n CLI = 'CLI',\n /** Wix business solutions and workflow documentation. */\n BUSINESS_SOLUTIONS = 'BUSINESS_SOLUTIONS',\n}\n\n/** @enumType */\nexport type DocumentTypeWithLiterals =\n | DocumentType\n | 'DOCUMENT_TYPE_UNSPECIFIED'\n | 'VELO'\n | 'SDK'\n | 'REST'\n | 'WDS'\n | 'BUILD_APPS'\n | 'WIX_HEADLESS'\n | 'CLI'\n | 'BUSINESS_SOLUTIONS';\n\n/** The result of a SearchDocuments call. */\nexport interface SearchDocumentsResponse {\n /**\n * The ranked list of matching documentation entries, ordered by relevance score descending.\n * @maxSize 100\n */\n results?: DocumentEntry[];\n}\n\n/** The parameters for a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The result of a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownResponse {\n /**\n * The search results as a single markdown document. Method results are interleaved\n * with article results. Results are separated by a line of equal signs.\n * @maxLength 500000\n */\n content?: string;\n}\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Use lines_in_each_result to get truncated snippets with\n * contextual \"read more\" hints instead of full content.\n * @param searchTerm - The search term to look up in the documentation.\n * @internal\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents\n * @returns The result of a SearchDocuments call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocuments\n */\nexport async function searchDocuments(\n searchTerm: string,\n options?: SearchDocumentsOptions\n): Promise<\n NonNullablePaths<\n SearchDocumentsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.title`\n | `results.${number}.content`\n | `results.${number}.url`\n | `results.${number}.relevanceScore`\n | `results.${number}.kbName`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n maximumResults: options?.maximumResults,\n documentType: options?.documentType,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts = ambassadorWixIgorV1DocumentEntry.searchDocuments(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n maximumResults: '$[1].maximumResults',\n documentType: '$[1].documentType',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsOptions {\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. When lines_in_each_result is set, each result is truncated\n * with a contextual hint (method results get a schema read hint; article\n * results get a \"read the full article\" hint). Results are separated by a\n * line of equal signs.\n * @param searchTerm - The search term to look up in the documentation.\n * @internal\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents_markdown\n * @returns The result of a SearchDocumentsMarkdown call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown\n */\nexport async function searchDocumentsMarkdown(\n searchTerm: string,\n options?: SearchDocumentsMarkdownOptions\n): Promise<NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n documentType: options?.documentType,\n maximumResults: options?.maximumResults,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts =\n ambassadorWixIgorV1DocumentEntry.searchDocumentsMarkdown(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n documentType: '$[1].documentType',\n maximumResults: '$[1].maximumResults',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsMarkdownOptions {\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIgorV1DocumentSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_igor_document-search';\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Use lines_in_each_result to get truncated snippets with\n * contextual \"read more\" hints instead of full content.\n */\nexport function searchDocuments(payload: object): RequestOptionsFactory<any> {\n function __searchDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.relevanceScore' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchDocuments;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. When lines_in_each_result is set, each result is truncated\n * with a contextual hint (method results get a schema read hint; article\n * results get a \"read the full article\" hint). Results are separated by a\n * line of equal signs.\n */\nexport function searchDocumentsMarkdown(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchDocumentsMarkdown({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search/markdown',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __searchDocumentsMarkdown;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SearchDocumentsMarkdownOptions,\n SearchDocumentsMarkdownResponse,\n SearchDocumentsOptions,\n SearchDocumentsResponse,\n searchDocuments as universalSearchDocuments,\n searchDocumentsMarkdown as universalSearchDocumentsMarkdown,\n} from './igor-v1-document-entry-document-search.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/igor' };\n\n/** @internal */\nexport function searchDocuments(\n httpClient: HttpClient\n): SearchDocumentsSignature {\n return (searchTerm: string, options?: SearchDocumentsOptions) =>\n universalSearchDocuments(\n searchTerm,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchDocumentsSignature {\n /**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Use lines_in_each_result to get truncated snippets with\n * contextual \"read more\" hints instead of full content.\n * @param - The search term to look up in the documentation.\n * @returns The result of a SearchDocuments call.\n */\n (searchTerm: string, options?: SearchDocumentsOptions): Promise<\n NonNullablePaths<\n SearchDocumentsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.title`\n | `results.${number}.content`\n | `results.${number}.url`\n | `results.${number}.relevanceScore`\n | `results.${number}.kbName`,\n 4\n >\n >;\n}\n\n/** @internal */\nexport function searchDocumentsMarkdown(\n httpClient: HttpClient\n): SearchDocumentsMarkdownSignature {\n return (searchTerm: string, options?: SearchDocumentsMarkdownOptions) =>\n universalSearchDocumentsMarkdown(\n searchTerm,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchDocumentsMarkdownSignature {\n /**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. When lines_in_each_result is set, each result is truncated\n * with a contextual hint (method results get a schema read hint; article\n * results get a \"read the full article\" hint). Results are separated by a\n * line of equal signs.\n * @param - The search term to look up in the documentation.\n * @returns The result of a SearchDocumentsMarkdown call.\n */\n (searchTerm: string, options?: SearchDocumentsMarkdownOptions): Promise<\n NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>\n >;\n}\n\nexport {\n DocumentEntry,\n DocumentType,\n SearchDocumentsMarkdownOptions,\n SearchDocumentsMarkdownRequest,\n SearchDocumentsMarkdownResponse,\n SearchDocumentsOptions,\n SearchDocumentsRequest,\n SearchDocumentsResponse,\n} from './igor-v1-document-entry-document-search.universal.js';\n","import {\n searchDocuments as publicSearchDocuments,\n searchDocumentsMarkdown as publicSearchDocumentsMarkdown,\n} from './igor-v1-document-entry-document-search.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\n/** @internal */\nexport const searchDocuments: MaybeContext<\n BuildRESTFunction<typeof publicSearchDocuments> & typeof publicSearchDocuments\n> = /*#__PURE__*/ createRESTModule(publicSearchDocuments);\n/** @internal */\nexport const searchDocumentsMarkdown: MaybeContext<\n BuildRESTFunction<typeof publicSearchDocumentsMarkdown> &\n typeof publicSearchDocumentsMarkdown\n> = /*#__PURE__*/ createRESTModule(publicSearchDocumentsMarkdown);\n\nexport { DocumentType } from './igor-v1-document-entry-document-search.universal.js';\nexport {\n DocumentEntry,\n SearchDocumentsRequest,\n SearchDocumentsResponse,\n SearchDocumentsMarkdownRequest,\n SearchDocumentsMarkdownResponse,\n SearchDocumentsOptions,\n SearchDocumentsMarkdownOptions,\n} from './igor-v1-document-entry-document-search.universal.js';\nexport { DocumentTypeWithLiterals } from './igor-v1-document-entry-document-search.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,yCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAUd,SAAS,gBAAgB,SAA6C;AAC3E,WAAS,kBAAkB,EAAE,KAAK,GAAQ;AACxC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,yCAAyC;AAAA,QAC5C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MAC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YAC1BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA6BO,SAASC,yBACd,YACkC;AAClC,SAAO,CAAC,YAAoB,YAC1BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC1DA,SAAS,wBAAwB;AAI1B,IAAMC,mBAEK,iCAAiBA,gBAAqB;AAEjD,IAAMC,2BAGK,iCAAiBA,wBAA6B;","names":["payload","DocumentType","searchDocuments","searchDocumentsMarkdown","searchDocuments","searchDocumentsMarkdown","searchDocuments","searchDocumentsMarkdown"]}
1
+ {"version":3,"sources":["../../../src/igor-v1-document-entry-document-search.universal.ts","../../../src/igor-v1-document-entry-document-search.http.ts","../../../src/igor-v1-document-entry-document-search.public.ts","../../../src/igor-v1-document-entry-document-search.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIgorV1DocumentEntry from './igor-v1-document-entry-document-search.http.js';\n\n/** A Wix documentation entry returned as a search result. */\nexport interface DocumentEntry {\n /**\n * The unique identifier for this documentation entry.\n * @maxLength 500\n */\n _id?: string;\n /** The date the document was last updated. */\n _updatedDate?: Date | null;\n /**\n * The title of the documentation entry.\n * @maxLength 1000\n */\n title?: string;\n /**\n * The full text content of the documentation entry.\n * @maxLength 100000\n */\n content?: string;\n /**\n * The direct URL to the documentation page for this entry.\n * @maxLength 2000\n */\n url?: string;\n /** The relevance score in the range [0, 1]. Higher means more relevant. */\n relevanceScore?: number;\n /**\n * The knowledge base this entry was retrieved from (e.g. \"REST_METHODS_KB_ID\").\n * @maxLength 100\n */\n kbName?: string;\n}\n\n/** The parameters for a SearchDocuments call. */\nexport interface SearchDocumentsRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. Defaults to 20.\n * Method results use section-aware truncation; article results are truncated\n * at this line count. A \"Read more here: <url>\" hint is appended when content\n * is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The type of Wix documentation to search. */\nexport enum DocumentType {\n /** Default value. Must not be used. */\n DOCUMENT_TYPE_UNSPECIFIED = 'DOCUMENT_TYPE_UNSPECIFIED',\n /** Velo JavaScript APIs for Wix sites. */\n VELO = 'VELO',\n /** Wix JavaScript SDK for headless and external applications. */\n SDK = 'SDK',\n /** Wix REST APIs. */\n REST = 'REST',\n /** Wix Design System documentation. */\n WDS = 'WDS',\n /** Documentation for building Wix apps. */\n BUILD_APPS = 'BUILD_APPS',\n /** Wix Headless documentation for external and headless applications. */\n WIX_HEADLESS = 'WIX_HEADLESS',\n /** Wix CLI documentation. */\n CLI = 'CLI',\n /** Wix business solutions and workflow documentation. */\n BUSINESS_SOLUTIONS = 'BUSINESS_SOLUTIONS',\n}\n\n/** @enumType */\nexport type DocumentTypeWithLiterals =\n | DocumentType\n | 'DOCUMENT_TYPE_UNSPECIFIED'\n | 'VELO'\n | 'SDK'\n | 'REST'\n | 'WDS'\n | 'BUILD_APPS'\n | 'WIX_HEADLESS'\n | 'CLI'\n | 'BUSINESS_SOLUTIONS';\n\n/** The result of a SearchDocuments call. */\nexport interface SearchDocumentsResponse {\n /**\n * The ranked list of matching documentation entries, ordered by relevance score descending.\n * @maxSize 100\n */\n results?: DocumentEntry[];\n}\n\n/** The parameters for a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. Defaults to 20. Method\n * results use section-aware truncation; article results are truncated at this\n * line count. A \"Read more here: <url>\" hint is appended when content is\n * truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The result of a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownResponse {\n /**\n * The search results as a single markdown document. Method results are interleaved\n * with article results. Results are separated by a line of equal signs.\n * @maxLength 500000\n */\n content?: string;\n}\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with contextual \"read more\" hints; pass a larger value\n * for more content per result.\n * @param searchTerm - The search term to look up in the documentation.\n * @public\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents\n * @returns The result of a SearchDocuments call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocuments\n */\nexport async function searchDocuments(\n searchTerm: string,\n options?: SearchDocumentsOptions\n): Promise<\n NonNullablePaths<\n SearchDocumentsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.title`\n | `results.${number}.content`\n | `results.${number}.url`\n | `results.${number}.relevanceScore`\n | `results.${number}.kbName`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n maximumResults: options?.maximumResults,\n documentType: options?.documentType,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts = ambassadorWixIgorV1DocumentEntry.searchDocuments(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n maximumResults: '$[1].maximumResults',\n documentType: '$[1].documentType',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsOptions {\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. Defaults to 20.\n * Method results use section-aware truncation; article results are truncated\n * at this line count. A \"Read more here: <url>\" hint is appended when content\n * is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with a contextual hint (method results get a schema read\n * hint; article results get a \"read the full article\" hint). Results are\n * separated by a line of equal signs.\n * @param searchTerm - The search term to look up in the documentation.\n * @public\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents_markdown\n * @returns The result of a SearchDocumentsMarkdown call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown\n */\nexport async function searchDocumentsMarkdown(\n searchTerm: string,\n options?: SearchDocumentsMarkdownOptions\n): Promise<NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n documentType: options?.documentType,\n maximumResults: options?.maximumResults,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts =\n ambassadorWixIgorV1DocumentEntry.searchDocumentsMarkdown(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n documentType: '$[1].documentType',\n maximumResults: '$[1].maximumResults',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsMarkdownOptions {\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. Defaults to 20. Method\n * results use section-aware truncation; article results are truncated at this\n * line count. A \"Read more here: <url>\" hint is appended when content is\n * truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIgorV1DocumentSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_igor_document-search';\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with contextual \"read more\" hints; pass a larger value\n * for more content per result.\n */\nexport function searchDocuments(payload: object): RequestOptionsFactory<any> {\n function __searchDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.relevanceScore' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchDocuments;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with a contextual hint (method results get a schema read\n * hint; article results get a \"read the full article\" hint). Results are\n * separated by a line of equal signs.\n */\nexport function searchDocumentsMarkdown(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchDocumentsMarkdown({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search/markdown',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __searchDocumentsMarkdown;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SearchDocumentsMarkdownOptions,\n SearchDocumentsMarkdownResponse,\n SearchDocumentsOptions,\n SearchDocumentsResponse,\n searchDocuments as universalSearchDocuments,\n searchDocumentsMarkdown as universalSearchDocumentsMarkdown,\n} from './igor-v1-document-entry-document-search.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/igor' };\n\nexport function searchDocuments(\n httpClient: HttpClient\n): SearchDocumentsSignature {\n return (searchTerm: string, options?: SearchDocumentsOptions) =>\n universalSearchDocuments(\n searchTerm,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchDocumentsSignature {\n /**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with contextual \"read more\" hints; pass a larger value\n * for more content per result.\n * @param - The search term to look up in the documentation.\n * @returns The result of a SearchDocuments call.\n */\n (searchTerm: string, options?: SearchDocumentsOptions): Promise<\n NonNullablePaths<\n SearchDocumentsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.title`\n | `results.${number}.content`\n | `results.${number}.url`\n | `results.${number}.relevanceScore`\n | `results.${number}.kbName`,\n 4\n >\n >;\n}\n\nexport function searchDocumentsMarkdown(\n httpClient: HttpClient\n): SearchDocumentsMarkdownSignature {\n return (searchTerm: string, options?: SearchDocumentsMarkdownOptions) =>\n universalSearchDocumentsMarkdown(\n searchTerm,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchDocumentsMarkdownSignature {\n /**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with a contextual hint (method results get a schema read\n * hint; article results get a \"read the full article\" hint). Results are\n * separated by a line of equal signs.\n * @param - The search term to look up in the documentation.\n * @returns The result of a SearchDocumentsMarkdown call.\n */\n (searchTerm: string, options?: SearchDocumentsMarkdownOptions): Promise<\n NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>\n >;\n}\n\nexport {\n DocumentEntry,\n DocumentType,\n SearchDocumentsMarkdownOptions,\n SearchDocumentsMarkdownRequest,\n SearchDocumentsMarkdownResponse,\n SearchDocumentsOptions,\n SearchDocumentsRequest,\n SearchDocumentsResponse,\n} from './igor-v1-document-entry-document-search.universal.js';\n","import {\n searchDocuments as publicSearchDocuments,\n searchDocumentsMarkdown as publicSearchDocumentsMarkdown,\n} from './igor-v1-document-entry-document-search.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const searchDocuments: MaybeContext<\n BuildRESTFunction<typeof publicSearchDocuments> & typeof publicSearchDocuments\n> = /*#__PURE__*/ createRESTModule(publicSearchDocuments);\nexport const searchDocumentsMarkdown: MaybeContext<\n BuildRESTFunction<typeof publicSearchDocumentsMarkdown> &\n typeof publicSearchDocumentsMarkdown\n> = /*#__PURE__*/ createRESTModule(publicSearchDocumentsMarkdown);\n\nexport { DocumentType } from './igor-v1-document-entry-document-search.universal.js';\nexport {\n DocumentEntry,\n SearchDocumentsRequest,\n SearchDocumentsResponse,\n SearchDocumentsMarkdownRequest,\n SearchDocumentsMarkdownResponse,\n SearchDocumentsOptions,\n SearchDocumentsMarkdownOptions,\n} from './igor-v1-document-entry-document-search.universal.js';\nexport { DocumentTypeWithLiterals } from './igor-v1-document-entry-document-search.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,yCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAWd,SAAS,gBAAgB,SAA6C;AAC3E,WAAS,kBAAkB,EAAE,KAAK,GAAQ;AACxC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,yCAAyC;AAAA,QAC5C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,MACN,mBAAmB,CAACA,aAClB,eAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAAA,QACzC;AAAA,QACA;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAAA,Q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AEK,iCAAiBA,gBAAqB;AACjD,IAAMC,2BAGK,iCAAiBA,wBAA6B;","names":["payload","DocumentType","searchDocuments","searchDocumentsMarkdown","searchDocuments","searchDocumentsMarkdown","searchDocuments","searchDocumentsMarkdown"]}
@@ -49,9 +49,10 @@ interface SearchDocumentsRequest {
49
49
  /** The type of documentation to search. Defaults to REST if not provided. */
50
50
  documentType?: DocumentTypeWithLiterals;
51
51
  /**
52
- * Maximum number of lines to include per result content. When set, method results use
53
- * section-aware truncation; article results are truncated at this line count.
54
- * A "Read more here: <url>" hint is appended when content is truncated.
52
+ * Maximum number of lines to include per result content. Defaults to 20.
53
+ * Method results use section-aware truncation; article results are truncated
54
+ * at this line count. A "Read more here: <url>" hint is appended when content
55
+ * is truncated.
55
56
  * @min 1
56
57
  * @max 200
57
58
  */
@@ -105,9 +106,10 @@ interface SearchDocumentsMarkdownRequest {
105
106
  */
106
107
  maximumResults?: number | null;
107
108
  /**
108
- * Maximum number of lines to include per result. When set, method results use
109
- * section-aware truncation; article results are truncated at this line count.
110
- * A "Read more here: <url>" hint is appended when content is truncated.
109
+ * Maximum number of lines to include per result. Defaults to 20. Method
110
+ * results use section-aware truncation; article results are truncated at this
111
+ * line count. A "Read more here: <url>" hint is appended when content is
112
+ * truncated.
111
113
  * @min 1
112
114
  * @max 200
113
115
  */
@@ -127,10 +129,11 @@ interface SearchDocumentsMarkdownResponse {
127
129
  *
128
130
  * Returns a ranked list of matching documentation entries ordered by relevance
129
131
  * score descending. Method results include kb_name to identify the source
130
- * knowledge base. Use lines_in_each_result to get truncated snippets with
131
- * contextual "read more" hints instead of full content.
132
+ * knowledge base. Each result is truncated to lines_in_each_result lines
133
+ * (defaults to 20) with contextual "read more" hints; pass a larger value
134
+ * for more content per result.
132
135
  * @param searchTerm - The search term to look up in the documentation.
133
- * @internal
136
+ * @public
134
137
  * @documentationMaturity preview
135
138
  * @requiredField searchTerm
136
139
  * @permissionId igor:v1:document_entry:search_documents
@@ -148,9 +151,10 @@ interface SearchDocumentsOptions {
148
151
  /** The type of documentation to search. Defaults to REST if not provided. */
149
152
  documentType?: DocumentTypeWithLiterals;
150
153
  /**
151
- * Maximum number of lines to include per result content. When set, method results use
152
- * section-aware truncation; article results are truncated at this line count.
153
- * A "Read more here: <url>" hint is appended when content is truncated.
154
+ * Maximum number of lines to include per result content. Defaults to 20.
155
+ * Method results use section-aware truncation; article results are truncated
156
+ * at this line count. A "Read more here: <url>" hint is appended when content
157
+ * is truncated.
154
158
  * @min 1
155
159
  * @max 200
156
160
  */
@@ -161,12 +165,12 @@ interface SearchDocumentsOptions {
161
165
  * ready to be passed directly to an LLM.
162
166
  *
163
167
  * Method results are interleaved 2-by-2 with article results so both types
164
- * always appear. When lines_in_each_result is set, each result is truncated
165
- * with a contextual hint (method results get a schema read hint; article
166
- * results get a "read the full article" hint). Results are separated by a
167
- * line of equal signs.
168
+ * always appear. Each result is truncated to lines_in_each_result lines
169
+ * (defaults to 20) with a contextual hint (method results get a schema read
170
+ * hint; article results get a "read the full article" hint). Results are
171
+ * separated by a line of equal signs.
168
172
  * @param searchTerm - The search term to look up in the documentation.
169
- * @internal
173
+ * @public
170
174
  * @documentationMaturity preview
171
175
  * @requiredField searchTerm
172
176
  * @permissionId igor:v1:document_entry:search_documents_markdown
@@ -184,9 +188,10 @@ interface SearchDocumentsMarkdownOptions {
184
188
  */
185
189
  maximumResults?: number | null;
186
190
  /**
187
- * Maximum number of lines to include per result. When set, method results use
188
- * section-aware truncation; article results are truncated at this line count.
189
- * A "Read more here: <url>" hint is appended when content is truncated.
191
+ * Maximum number of lines to include per result. Defaults to 20. Method
192
+ * results use section-aware truncation; article results are truncated at this
193
+ * line count. A "Read more here: <url>" hint is appended when content is
194
+ * truncated.
190
195
  * @min 1
191
196
  * @max 200
192
197
  */
@@ -17,6 +17,24 @@ function resolveWixIgorV1DocumentSearchServiceUrl(opts) {
17
17
  srcPath: "/mcp-docs-search/v1",
18
18
  destPath: ""
19
19
  }
20
+ ],
21
+ "bo._base_domain_": [
22
+ {
23
+ srcPath: "/mcp-docs-search/v1",
24
+ destPath: ""
25
+ }
26
+ ],
27
+ "wixbo.ai": [
28
+ {
29
+ srcPath: "/mcp-docs-search/v1",
30
+ destPath: ""
31
+ }
32
+ ],
33
+ "wix-bo.com": [
34
+ {
35
+ srcPath: "/mcp-docs-search/v1",
36
+ destPath: ""
37
+ }
20
38
  ]
21
39
  };
22
40
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/igor-v1-document-entry-document-search.universal.ts","../../../src/igor-v1-document-entry-document-search.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIgorV1DocumentEntry from './igor-v1-document-entry-document-search.http.js';\n\n/** A Wix documentation entry returned as a search result. */\nexport interface DocumentEntry {\n /**\n * The unique identifier for this documentation entry.\n * @maxLength 500\n */\n _id?: string;\n /** The date the document was last updated. */\n _updatedDate?: Date | null;\n /**\n * The title of the documentation entry.\n * @maxLength 1000\n */\n title?: string;\n /**\n * The full text content of the documentation entry.\n * @maxLength 100000\n */\n content?: string;\n /**\n * The direct URL to the documentation page for this entry.\n * @maxLength 2000\n */\n url?: string;\n /** The relevance score in the range [0, 1]. Higher means more relevant. */\n relevanceScore?: number;\n /**\n * The knowledge base this entry was retrieved from (e.g. \"REST_METHODS_KB_ID\").\n * @maxLength 100\n */\n kbName?: string;\n}\n\n/** The parameters for a SearchDocuments call. */\nexport interface SearchDocumentsRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The type of Wix documentation to search. */\nexport enum DocumentType {\n /** Default value. Must not be used. */\n DOCUMENT_TYPE_UNSPECIFIED = 'DOCUMENT_TYPE_UNSPECIFIED',\n /** Velo JavaScript APIs for Wix sites. */\n VELO = 'VELO',\n /** Wix JavaScript SDK for headless and external applications. */\n SDK = 'SDK',\n /** Wix REST APIs. */\n REST = 'REST',\n /** Wix Design System documentation. */\n WDS = 'WDS',\n /** Documentation for building Wix apps. */\n BUILD_APPS = 'BUILD_APPS',\n /** Wix Headless documentation for external and headless applications. */\n WIX_HEADLESS = 'WIX_HEADLESS',\n /** Wix CLI documentation. */\n CLI = 'CLI',\n /** Wix business solutions and workflow documentation. */\n BUSINESS_SOLUTIONS = 'BUSINESS_SOLUTIONS',\n}\n\n/** @enumType */\nexport type DocumentTypeWithLiterals =\n | DocumentType\n | 'DOCUMENT_TYPE_UNSPECIFIED'\n | 'VELO'\n | 'SDK'\n | 'REST'\n | 'WDS'\n | 'BUILD_APPS'\n | 'WIX_HEADLESS'\n | 'CLI'\n | 'BUSINESS_SOLUTIONS';\n\n/** The result of a SearchDocuments call. */\nexport interface SearchDocumentsResponse {\n /**\n * The ranked list of matching documentation entries, ordered by relevance score descending.\n * @maxSize 100\n */\n results?: DocumentEntry[];\n}\n\n/** The parameters for a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The result of a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownResponse {\n /**\n * The search results as a single markdown document. Method results are interleaved\n * with article results. Results are separated by a line of equal signs.\n * @maxLength 500000\n */\n content?: string;\n}\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Use lines_in_each_result to get truncated snippets with\n * contextual \"read more\" hints instead of full content.\n * @param searchTerm - The search term to look up in the documentation.\n * @internal\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents\n * @returns The result of a SearchDocuments call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocuments\n */\nexport async function searchDocuments(\n searchTerm: string,\n options?: SearchDocumentsOptions\n): Promise<\n NonNullablePaths<\n SearchDocumentsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.title`\n | `results.${number}.content`\n | `results.${number}.url`\n | `results.${number}.relevanceScore`\n | `results.${number}.kbName`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n maximumResults: options?.maximumResults,\n documentType: options?.documentType,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts = ambassadorWixIgorV1DocumentEntry.searchDocuments(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n maximumResults: '$[1].maximumResults',\n documentType: '$[1].documentType',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsOptions {\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. When lines_in_each_result is set, each result is truncated\n * with a contextual hint (method results get a schema read hint; article\n * results get a \"read the full article\" hint). Results are separated by a\n * line of equal signs.\n * @param searchTerm - The search term to look up in the documentation.\n * @internal\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents_markdown\n * @returns The result of a SearchDocumentsMarkdown call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown\n */\nexport async function searchDocumentsMarkdown(\n searchTerm: string,\n options?: SearchDocumentsMarkdownOptions\n): Promise<NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n documentType: options?.documentType,\n maximumResults: options?.maximumResults,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts =\n ambassadorWixIgorV1DocumentEntry.searchDocumentsMarkdown(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n documentType: '$[1].documentType',\n maximumResults: '$[1].maximumResults',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsMarkdownOptions {\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. When set, method results use\n * section-aware truncation; article results are truncated at this line count.\n * A \"Read more here: <url>\" hint is appended when content is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIgorV1DocumentSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_igor_document-search';\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Use lines_in_each_result to get truncated snippets with\n * contextual \"read more\" hints instead of full content.\n */\nexport function searchDocuments(payload: object): RequestOptionsFactory<any> {\n function __searchDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.relevanceScore' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchDocuments;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. When lines_in_each_result is set, each result is truncated\n * with a contextual hint (method results get a schema read hint; article\n * results get a \"read the full article\" hint). Results are separated by a\n * line of equal signs.\n */\nexport function searchDocumentsMarkdown(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchDocumentsMarkdown({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search/markdown',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __searchDocumentsMarkdown;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAA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OAAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,gBAAgB;AAAA,UAChB,mBAAmB;AAAA,QACrB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc,SAAS;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","DocumentType","searchDocuments","searchDocumentsMarkdown"]}
1
+ {"version":3,"sources":["../../../src/igor-v1-document-entry-document-search.universal.ts","../../../src/igor-v1-document-entry-document-search.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIgorV1DocumentEntry from './igor-v1-document-entry-document-search.http.js';\n\n/** A Wix documentation entry returned as a search result. */\nexport interface DocumentEntry {\n /**\n * The unique identifier for this documentation entry.\n * @maxLength 500\n */\n _id?: string;\n /** The date the document was last updated. */\n _updatedDate?: Date | null;\n /**\n * The title of the documentation entry.\n * @maxLength 1000\n */\n title?: string;\n /**\n * The full text content of the documentation entry.\n * @maxLength 100000\n */\n content?: string;\n /**\n * The direct URL to the documentation page for this entry.\n * @maxLength 2000\n */\n url?: string;\n /** The relevance score in the range [0, 1]. Higher means more relevant. */\n relevanceScore?: number;\n /**\n * The knowledge base this entry was retrieved from (e.g. \"REST_METHODS_KB_ID\").\n * @maxLength 100\n */\n kbName?: string;\n}\n\n/** The parameters for a SearchDocuments call. */\nexport interface SearchDocumentsRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. Defaults to 20.\n * Method results use section-aware truncation; article results are truncated\n * at this line count. A \"Read more here: <url>\" hint is appended when content\n * is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The type of Wix documentation to search. */\nexport enum DocumentType {\n /** Default value. Must not be used. */\n DOCUMENT_TYPE_UNSPECIFIED = 'DOCUMENT_TYPE_UNSPECIFIED',\n /** Velo JavaScript APIs for Wix sites. */\n VELO = 'VELO',\n /** Wix JavaScript SDK for headless and external applications. */\n SDK = 'SDK',\n /** Wix REST APIs. */\n REST = 'REST',\n /** Wix Design System documentation. */\n WDS = 'WDS',\n /** Documentation for building Wix apps. */\n BUILD_APPS = 'BUILD_APPS',\n /** Wix Headless documentation for external and headless applications. */\n WIX_HEADLESS = 'WIX_HEADLESS',\n /** Wix CLI documentation. */\n CLI = 'CLI',\n /** Wix business solutions and workflow documentation. */\n BUSINESS_SOLUTIONS = 'BUSINESS_SOLUTIONS',\n}\n\n/** @enumType */\nexport type DocumentTypeWithLiterals =\n | DocumentType\n | 'DOCUMENT_TYPE_UNSPECIFIED'\n | 'VELO'\n | 'SDK'\n | 'REST'\n | 'WDS'\n | 'BUILD_APPS'\n | 'WIX_HEADLESS'\n | 'CLI'\n | 'BUSINESS_SOLUTIONS';\n\n/** The result of a SearchDocuments call. */\nexport interface SearchDocumentsResponse {\n /**\n * The ranked list of matching documentation entries, ordered by relevance score descending.\n * @maxSize 100\n */\n results?: DocumentEntry[];\n}\n\n/** The parameters for a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownRequest {\n /**\n * The search term to look up in the documentation.\n * @minLength 1\n * @maxLength 500\n */\n searchTerm: string;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. Defaults to 20. Method\n * results use section-aware truncation; article results are truncated at this\n * line count. A \"Read more here: <url>\" hint is appended when content is\n * truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/** The result of a SearchDocumentsMarkdown call. */\nexport interface SearchDocumentsMarkdownResponse {\n /**\n * The search results as a single markdown document. Method results are interleaved\n * with article results. Results are separated by a line of equal signs.\n * @maxLength 500000\n */\n content?: string;\n}\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with contextual \"read more\" hints; pass a larger value\n * for more content per result.\n * @param searchTerm - The search term to look up in the documentation.\n * @public\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents\n * @returns The result of a SearchDocuments call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocuments\n */\nexport async function searchDocuments(\n searchTerm: string,\n options?: SearchDocumentsOptions\n): Promise<\n NonNullablePaths<\n SearchDocumentsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.title`\n | `results.${number}.content`\n | `results.${number}.url`\n | `results.${number}.relevanceScore`\n | `results.${number}.kbName`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n maximumResults: options?.maximumResults,\n documentType: options?.documentType,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts = ambassadorWixIgorV1DocumentEntry.searchDocuments(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n maximumResults: '$[1].maximumResults',\n documentType: '$[1].documentType',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsOptions {\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * Maximum number of lines to include per result content. Defaults to 20.\n * Method results use section-aware truncation; article results are truncated\n * at this line count. A \"Read more here: <url>\" hint is appended when content\n * is truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with a contextual hint (method results get a schema read\n * hint; article results get a \"read the full article\" hint). Results are\n * separated by a line of equal signs.\n * @param searchTerm - The search term to look up in the documentation.\n * @public\n * @documentationMaturity preview\n * @requiredField searchTerm\n * @permissionId igor:v1:document_entry:search_documents_markdown\n * @returns The result of a SearchDocumentsMarkdown call.\n * @fqn wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown\n */\nexport async function searchDocumentsMarkdown(\n searchTerm: string,\n options?: SearchDocumentsMarkdownOptions\n): Promise<NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchTerm: searchTerm,\n documentType: options?.documentType,\n maximumResults: options?.maximumResults,\n linesInEachResult: options?.linesInEachResult,\n });\n\n const reqOpts =\n ambassadorWixIgorV1DocumentEntry.searchDocumentsMarkdown(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchTerm: '$[0]',\n documentType: '$[1].documentType',\n maximumResults: '$[1].maximumResults',\n linesInEachResult: '$[1].linesInEachResult',\n },\n singleArgumentUnchanged: false,\n },\n ['searchTerm', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchDocumentsMarkdownOptions {\n /** The type of documentation to search. Defaults to REST if not provided. */\n documentType?: DocumentTypeWithLiterals;\n /**\n * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].\n * @min 1\n * @max 20\n */\n maximumResults?: number | null;\n /**\n * Maximum number of lines to include per result. Defaults to 20. Method\n * results use section-aware truncation; article results are truncated at this\n * line count. A \"Read more here: <url>\" hint is appended when content is\n * truncated.\n * @min 1\n * @max 200\n */\n linesInEachResult?: number | null;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIgorV1DocumentSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/mcp-docs-search/v1',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_igor_document-search';\n\n/**\n * Searches Wix documentation entries by a search term and document type.\n *\n * Returns a ranked list of matching documentation entries ordered by relevance\n * score descending. Method results include kb_name to identify the source\n * knowledge base. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with contextual \"read more\" hints; pass a larger value\n * for more content per result.\n */\nexport function searchDocuments(payload: object): RequestOptionsFactory<any> {\n function __searchDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.updatedDate' }],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.relevanceScore' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchDocuments;\n}\n\n/**\n * Searches Wix documentation and returns results as a single markdown string\n * ready to be passed directly to an LLM.\n *\n * Method results are interleaved 2-by-2 with article results so both types\n * always appear. Each result is truncated to lines_in_each_result lines\n * (defaults to 20) with a contextual hint (method results get a schema read\n * hint; article results get a \"read the full article\" hint). Results are\n * separated by a line of equal signs.\n */\nexport function searchDocumentsMarkdown(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchDocumentsMarkdown({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.igor.v1.document_entry',\n method: 'POST' as any,\n methodFqn: 'wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIgorV1DocumentSearchServiceUrl({\n protoPath: '/v1/docs/search/markdown',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __searchDocumentsMarkdown;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,yCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAWd,SAAS,gBAAgB,SAA6C;AAC3E,WAAS,kBAAkB,EAAE,KAAK,GAAQ;AACxC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,yCAAyC;AAA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["payload","DocumentType","searchDocuments","searchDocumentsMarkdown"]}
@@ -50,9 +50,10 @@ interface SearchDocumentsRequest {
50
50
  /** The type of documentation to search. Defaults to REST if not provided. */
51
51
  documentType?: DocumentTypeWithLiterals;
52
52
  /**
53
- * Maximum number of lines to include per result content. When set, method results use
54
- * section-aware truncation; article results are truncated at this line count.
55
- * A "Read more here: <url>" hint is appended when content is truncated.
53
+ * Maximum number of lines to include per result content. Defaults to 20.
54
+ * Method results use section-aware truncation; article results are truncated
55
+ * at this line count. A "Read more here: <url>" hint is appended when content
56
+ * is truncated.
56
57
  * @min 1
57
58
  * @max 200
58
59
  */
@@ -106,9 +107,10 @@ interface SearchDocumentsMarkdownRequest {
106
107
  */
107
108
  maximumResults?: number | null;
108
109
  /**
109
- * Maximum number of lines to include per result. When set, method results use
110
- * section-aware truncation; article results are truncated at this line count.
111
- * A "Read more here: <url>" hint is appended when content is truncated.
110
+ * Maximum number of lines to include per result. Defaults to 20. Method
111
+ * results use section-aware truncation; article results are truncated at this
112
+ * line count. A "Read more here: <url>" hint is appended when content is
113
+ * truncated.
112
114
  * @min 1
113
115
  * @max 200
114
116
  */
@@ -10,6 +10,24 @@ function resolveWixIgorV1DocumentSearchServiceUrl(opts) {
10
10
  srcPath: "/mcp-docs-search/v1",
11
11
  destPath: ""
12
12
  }
13
+ ],
14
+ "bo._base_domain_": [
15
+ {
16
+ srcPath: "/mcp-docs-search/v1",
17
+ destPath: ""
18
+ }
19
+ ],
20
+ "wixbo.ai": [
21
+ {
22
+ srcPath: "/mcp-docs-search/v1",
23
+ destPath: ""
24
+ }
25
+ ],
26
+ "wix-bo.com": [
27
+ {
28
+ srcPath: "/mcp-docs-search/v1",
29
+ destPath: ""
30
+ }
13
31
  ]
14
32
  };
15
33
  return resolveUrl(Object.assign(opts, { domainToMappings }));