@wix/auto_sdk_igor_document-search 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +160 -0
  2. package/build/cjs/index.js +211 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +188 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +139 -0
  8. package/build/cjs/meta.js +156 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +160 -0
  11. package/build/es/index.mjs +185 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1 -0
  14. package/build/es/index.typings.mjs +162 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +139 -0
  17. package/build/es/meta.mjs +127 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +43 -0
  21. package/build/internal/cjs/index.js +211 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +196 -0
  24. package/build/internal/cjs/index.typings.js +188 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +140 -0
  27. package/build/internal/cjs/meta.js +156 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +43 -0
  30. package/build/internal/es/index.mjs +185 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +196 -0
  33. package/build/internal/es/index.typings.mjs +162 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +140 -0
  36. package/build/internal/es/meta.mjs +127 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +55 -0
@@ -0,0 +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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;;;AEhSO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CAAC,YAAoB,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"]}
@@ -0,0 +1 @@
1
+ export { DocumentEntry, DocumentType, DocumentTypeWithLiterals, SearchDocumentsMarkdownOptions, SearchDocumentsMarkdownRequest, SearchDocumentsMarkdownResponse, SearchDocumentsOptions, SearchDocumentsRequest, SearchDocumentsResponse } from './index.mjs';
@@ -0,0 +1,162 @@
1
+ // src/igor-v1-document-entry-document-search.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import {
4
+ renameKeysFromSDKRequestToRESTRequest,
5
+ renameKeysFromRESTResponseToSDKResponse
6
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
7
+
8
+ // src/igor-v1-document-entry-document-search.http.ts
9
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
10
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
11
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
12
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
13
+ function resolveWixIgorV1DocumentSearchServiceUrl(opts) {
14
+ const domainToMappings = {
15
+ "www.wixapis.com": [
16
+ {
17
+ srcPath: "/mcp-docs-search/v1",
18
+ destPath: ""
19
+ }
20
+ ]
21
+ };
22
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
23
+ }
24
+ var PACKAGE_NAME = "@wix/auto_sdk_igor_document-search";
25
+ function searchDocuments(payload) {
26
+ function __searchDocuments({ host }) {
27
+ const metadata = {
28
+ entityFqdn: "wix.igor.v1.document_entry",
29
+ method: "POST",
30
+ methodFqn: "wix.igor.v1.DocumentSearchService.SearchDocuments",
31
+ packageName: PACKAGE_NAME,
32
+ migrationOptions: {
33
+ optInTransformResponse: true
34
+ },
35
+ url: resolveWixIgorV1DocumentSearchServiceUrl({
36
+ protoPath: "/v1/docs/search",
37
+ data: payload,
38
+ host
39
+ }),
40
+ data: payload,
41
+ transformResponse: (payload2) => transformPaths(payload2, [
42
+ {
43
+ transformFn: transformRESTTimestampToSDKTimestamp,
44
+ paths: [{ path: "results.updatedDate" }]
45
+ },
46
+ {
47
+ transformFn: transformRESTFloatToSDKFloat,
48
+ paths: [{ path: "results.relevanceScore" }]
49
+ }
50
+ ])
51
+ };
52
+ return metadata;
53
+ }
54
+ return __searchDocuments;
55
+ }
56
+ function searchDocumentsMarkdown(payload) {
57
+ function __searchDocumentsMarkdown({ host }) {
58
+ const metadata = {
59
+ entityFqdn: "wix.igor.v1.document_entry",
60
+ method: "POST",
61
+ methodFqn: "wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown",
62
+ packageName: PACKAGE_NAME,
63
+ migrationOptions: {
64
+ optInTransformResponse: true
65
+ },
66
+ url: resolveWixIgorV1DocumentSearchServiceUrl({
67
+ protoPath: "/v1/docs/search/markdown",
68
+ data: payload,
69
+ host
70
+ }),
71
+ data: payload
72
+ };
73
+ return metadata;
74
+ }
75
+ return __searchDocumentsMarkdown;
76
+ }
77
+
78
+ // src/igor-v1-document-entry-document-search.universal.ts
79
+ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
80
+ DocumentType2["DOCUMENT_TYPE_UNSPECIFIED"] = "DOCUMENT_TYPE_UNSPECIFIED";
81
+ DocumentType2["VELO"] = "VELO";
82
+ DocumentType2["SDK"] = "SDK";
83
+ DocumentType2["REST"] = "REST";
84
+ DocumentType2["WDS"] = "WDS";
85
+ DocumentType2["BUILD_APPS"] = "BUILD_APPS";
86
+ DocumentType2["WIX_HEADLESS"] = "WIX_HEADLESS";
87
+ DocumentType2["CLI"] = "CLI";
88
+ DocumentType2["BUSINESS_SOLUTIONS"] = "BUSINESS_SOLUTIONS";
89
+ return DocumentType2;
90
+ })(DocumentType || {});
91
+ async function searchDocuments2(searchTerm, options) {
92
+ const { httpClient, sideEffects } = arguments[2];
93
+ const payload = renameKeysFromSDKRequestToRESTRequest({
94
+ searchTerm,
95
+ maximumResults: options?.maximumResults,
96
+ documentType: options?.documentType,
97
+ linesInEachResult: options?.linesInEachResult
98
+ });
99
+ const reqOpts = searchDocuments(payload);
100
+ sideEffects?.onSiteCall?.();
101
+ try {
102
+ const result = await httpClient.request(reqOpts);
103
+ sideEffects?.onSuccess?.(result);
104
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
105
+ } catch (err) {
106
+ const transformedError = sdkTransformError(
107
+ err,
108
+ {
109
+ spreadPathsToArguments: {},
110
+ explicitPathsToArguments: {
111
+ searchTerm: "$[0]",
112
+ maximumResults: "$[1].maximumResults",
113
+ documentType: "$[1].documentType",
114
+ linesInEachResult: "$[1].linesInEachResult"
115
+ },
116
+ singleArgumentUnchanged: false
117
+ },
118
+ ["searchTerm", "options"]
119
+ );
120
+ sideEffects?.onError?.(err);
121
+ throw transformedError;
122
+ }
123
+ }
124
+ async function searchDocumentsMarkdown2(searchTerm, options) {
125
+ const { httpClient, sideEffects } = arguments[2];
126
+ const payload = renameKeysFromSDKRequestToRESTRequest({
127
+ searchTerm,
128
+ documentType: options?.documentType,
129
+ maximumResults: options?.maximumResults,
130
+ linesInEachResult: options?.linesInEachResult
131
+ });
132
+ const reqOpts = searchDocumentsMarkdown(payload);
133
+ sideEffects?.onSiteCall?.();
134
+ try {
135
+ const result = await httpClient.request(reqOpts);
136
+ sideEffects?.onSuccess?.(result);
137
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
138
+ } catch (err) {
139
+ const transformedError = sdkTransformError(
140
+ err,
141
+ {
142
+ spreadPathsToArguments: {},
143
+ explicitPathsToArguments: {
144
+ searchTerm: "$[0]",
145
+ documentType: "$[1].documentType",
146
+ maximumResults: "$[1].maximumResults",
147
+ linesInEachResult: "$[1].linesInEachResult"
148
+ },
149
+ singleArgumentUnchanged: false
150
+ },
151
+ ["searchTerm", "options"]
152
+ );
153
+ sideEffects?.onError?.(err);
154
+ throw transformedError;
155
+ }
156
+ }
157
+ export {
158
+ DocumentType,
159
+ searchDocuments2 as searchDocuments,
160
+ searchDocumentsMarkdown2 as searchDocumentsMarkdown
161
+ };
162
+ //# sourceMappingURL=index.typings.mjs.map
@@ -0,0 +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 __searchDocument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,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA,cAAc,SAAS;AAAA,IACvB,gBAAgB,SAAS;AAAA,IACzB,mBAAmB,SAAS;AAAA,EAC9B,CAAC;AAED,QAAM,UAC6B,wBAAwB,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"]}
@@ -0,0 +1,139 @@
1
+ import { SearchDocumentsRequest as SearchDocumentsRequest$1, SearchDocumentsResponse as SearchDocumentsResponse$1, SearchDocumentsMarkdownRequest as SearchDocumentsMarkdownRequest$1, SearchDocumentsMarkdownResponse as SearchDocumentsMarkdownResponse$1 } from './index.mjs';
2
+
3
+ /** A Wix documentation entry returned as a search result. */
4
+ interface DocumentEntry {
5
+ /**
6
+ * The unique identifier for this documentation entry.
7
+ * @maxLength 500
8
+ */
9
+ id?: string;
10
+ /** The date the document was last updated. */
11
+ updatedDate?: Date | null;
12
+ /**
13
+ * The title of the documentation entry.
14
+ * @maxLength 1000
15
+ */
16
+ title?: string;
17
+ /**
18
+ * The full text content of the documentation entry.
19
+ * @maxLength 100000
20
+ */
21
+ content?: string;
22
+ /**
23
+ * The direct URL to the documentation page for this entry.
24
+ * @maxLength 2000
25
+ */
26
+ url?: string;
27
+ /** The relevance score in the range [0, 1]. Higher means more relevant. */
28
+ relevanceScore?: number;
29
+ /**
30
+ * The knowledge base this entry was retrieved from (e.g. "REST_METHODS_KB_ID").
31
+ * @maxLength 100
32
+ */
33
+ kbName?: string;
34
+ }
35
+ /** The parameters for a SearchDocuments call. */
36
+ interface SearchDocumentsRequest {
37
+ /**
38
+ * The search term to look up in the documentation.
39
+ * @minLength 1
40
+ * @maxLength 500
41
+ */
42
+ searchTerm: string;
43
+ /**
44
+ * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].
45
+ * @min 1
46
+ * @max 20
47
+ */
48
+ maximumResults?: number | null;
49
+ /** The type of documentation to search. Defaults to REST if not provided. */
50
+ documentType?: DocumentTypeWithLiterals;
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.
55
+ * @min 1
56
+ * @max 200
57
+ */
58
+ linesInEachResult?: number | null;
59
+ }
60
+ /** The type of Wix documentation to search. */
61
+ declare enum DocumentType {
62
+ /** Default value. Must not be used. */
63
+ DOCUMENT_TYPE_UNSPECIFIED = "DOCUMENT_TYPE_UNSPECIFIED",
64
+ /** Velo JavaScript APIs for Wix sites. */
65
+ VELO = "VELO",
66
+ /** Wix JavaScript SDK for headless and external applications. */
67
+ SDK = "SDK",
68
+ /** Wix REST APIs. */
69
+ REST = "REST",
70
+ /** Wix Design System documentation. */
71
+ WDS = "WDS",
72
+ /** Documentation for building Wix apps. */
73
+ BUILD_APPS = "BUILD_APPS",
74
+ /** Wix Headless documentation for external and headless applications. */
75
+ WIX_HEADLESS = "WIX_HEADLESS",
76
+ /** Wix CLI documentation. */
77
+ CLI = "CLI",
78
+ /** Wix business solutions and workflow documentation. */
79
+ BUSINESS_SOLUTIONS = "BUSINESS_SOLUTIONS"
80
+ }
81
+ /** @enumType */
82
+ type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS';
83
+ /** The result of a SearchDocuments call. */
84
+ interface SearchDocumentsResponse {
85
+ /**
86
+ * The ranked list of matching documentation entries, ordered by relevance score descending.
87
+ * @maxSize 100
88
+ */
89
+ results?: DocumentEntry[];
90
+ }
91
+ /** The parameters for a SearchDocumentsMarkdown call. */
92
+ interface SearchDocumentsMarkdownRequest {
93
+ /**
94
+ * The search term to look up in the documentation.
95
+ * @minLength 1
96
+ * @maxLength 500
97
+ */
98
+ searchTerm: string;
99
+ /** The type of documentation to search. Defaults to REST if not provided. */
100
+ documentType?: DocumentTypeWithLiterals;
101
+ /**
102
+ * The maximum number of results to return. Defaults to 15. Valid range: [1, 20].
103
+ * @min 1
104
+ * @max 20
105
+ */
106
+ maximumResults?: number | null;
107
+ /**
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.
111
+ * @min 1
112
+ * @max 200
113
+ */
114
+ linesInEachResult?: number | null;
115
+ }
116
+ /** The result of a SearchDocumentsMarkdown call. */
117
+ interface SearchDocumentsMarkdownResponse {
118
+ /**
119
+ * The search results as a single markdown document. Method results are interleaved
120
+ * with article results. Results are separated by a line of equal signs.
121
+ * @maxLength 500000
122
+ */
123
+ content?: string;
124
+ }
125
+
126
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
127
+ getUrl: (context: any) => string;
128
+ httpMethod: K;
129
+ path: string;
130
+ pathParams: M;
131
+ __requestType: T;
132
+ __originalRequestType: S;
133
+ __responseType: Q;
134
+ __originalResponseType: R;
135
+ };
136
+ declare function searchDocuments(): __PublicMethodMetaInfo<'POST', {}, SearchDocumentsRequest$1, SearchDocumentsRequest, SearchDocumentsResponse$1, SearchDocumentsResponse>;
137
+ declare function searchDocumentsMarkdown(): __PublicMethodMetaInfo<'POST', {}, SearchDocumentsMarkdownRequest$1, SearchDocumentsMarkdownRequest, SearchDocumentsMarkdownResponse$1, SearchDocumentsMarkdownResponse>;
138
+
139
+ export { type DocumentEntry as DocumentEntryOriginal, DocumentType as DocumentTypeOriginal, type DocumentTypeWithLiterals as DocumentTypeWithLiteralsOriginal, type SearchDocumentsMarkdownRequest as SearchDocumentsMarkdownRequestOriginal, type SearchDocumentsMarkdownResponse as SearchDocumentsMarkdownResponseOriginal, type SearchDocumentsRequest as SearchDocumentsRequestOriginal, type SearchDocumentsResponse as SearchDocumentsResponseOriginal, type __PublicMethodMetaInfo, searchDocuments, searchDocumentsMarkdown };
@@ -0,0 +1,127 @@
1
+ // src/igor-v1-document-entry-document-search.http.ts
2
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
3
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
4
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
5
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
6
+ function resolveWixIgorV1DocumentSearchServiceUrl(opts) {
7
+ const domainToMappings = {
8
+ "www.wixapis.com": [
9
+ {
10
+ srcPath: "/mcp-docs-search/v1",
11
+ destPath: ""
12
+ }
13
+ ]
14
+ };
15
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
16
+ }
17
+ var PACKAGE_NAME = "@wix/auto_sdk_igor_document-search";
18
+ function searchDocuments(payload) {
19
+ function __searchDocuments({ host }) {
20
+ const metadata = {
21
+ entityFqdn: "wix.igor.v1.document_entry",
22
+ method: "POST",
23
+ methodFqn: "wix.igor.v1.DocumentSearchService.SearchDocuments",
24
+ packageName: PACKAGE_NAME,
25
+ migrationOptions: {
26
+ optInTransformResponse: true
27
+ },
28
+ url: resolveWixIgorV1DocumentSearchServiceUrl({
29
+ protoPath: "/v1/docs/search",
30
+ data: payload,
31
+ host
32
+ }),
33
+ data: payload,
34
+ transformResponse: (payload2) => transformPaths(payload2, [
35
+ {
36
+ transformFn: transformRESTTimestampToSDKTimestamp,
37
+ paths: [{ path: "results.updatedDate" }]
38
+ },
39
+ {
40
+ transformFn: transformRESTFloatToSDKFloat,
41
+ paths: [{ path: "results.relevanceScore" }]
42
+ }
43
+ ])
44
+ };
45
+ return metadata;
46
+ }
47
+ return __searchDocuments;
48
+ }
49
+ function searchDocumentsMarkdown(payload) {
50
+ function __searchDocumentsMarkdown({ host }) {
51
+ const metadata = {
52
+ entityFqdn: "wix.igor.v1.document_entry",
53
+ method: "POST",
54
+ methodFqn: "wix.igor.v1.DocumentSearchService.SearchDocumentsMarkdown",
55
+ packageName: PACKAGE_NAME,
56
+ migrationOptions: {
57
+ optInTransformResponse: true
58
+ },
59
+ url: resolveWixIgorV1DocumentSearchServiceUrl({
60
+ protoPath: "/v1/docs/search/markdown",
61
+ data: payload,
62
+ host
63
+ }),
64
+ data: payload
65
+ };
66
+ return metadata;
67
+ }
68
+ return __searchDocumentsMarkdown;
69
+ }
70
+
71
+ // src/igor-v1-document-entry-document-search.types.ts
72
+ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
73
+ DocumentType2["DOCUMENT_TYPE_UNSPECIFIED"] = "DOCUMENT_TYPE_UNSPECIFIED";
74
+ DocumentType2["VELO"] = "VELO";
75
+ DocumentType2["SDK"] = "SDK";
76
+ DocumentType2["REST"] = "REST";
77
+ DocumentType2["WDS"] = "WDS";
78
+ DocumentType2["BUILD_APPS"] = "BUILD_APPS";
79
+ DocumentType2["WIX_HEADLESS"] = "WIX_HEADLESS";
80
+ DocumentType2["CLI"] = "CLI";
81
+ DocumentType2["BUSINESS_SOLUTIONS"] = "BUSINESS_SOLUTIONS";
82
+ return DocumentType2;
83
+ })(DocumentType || {});
84
+
85
+ // src/igor-v1-document-entry-document-search.meta.ts
86
+ function searchDocuments2() {
87
+ const payload = {};
88
+ const getRequestOptions = searchDocuments(payload);
89
+ const getUrl = (context) => {
90
+ const { url } = getRequestOptions(context);
91
+ return url;
92
+ };
93
+ return {
94
+ getUrl,
95
+ httpMethod: "POST",
96
+ path: "/v1/docs/search",
97
+ pathParams: {},
98
+ __requestType: null,
99
+ __originalRequestType: null,
100
+ __responseType: null,
101
+ __originalResponseType: null
102
+ };
103
+ }
104
+ function searchDocumentsMarkdown2() {
105
+ const payload = {};
106
+ const getRequestOptions = searchDocumentsMarkdown(payload);
107
+ const getUrl = (context) => {
108
+ const { url } = getRequestOptions(context);
109
+ return url;
110
+ };
111
+ return {
112
+ getUrl,
113
+ httpMethod: "POST",
114
+ path: "/v1/docs/search/markdown",
115
+ pathParams: {},
116
+ __requestType: null,
117
+ __originalRequestType: null,
118
+ __responseType: null,
119
+ __originalResponseType: null
120
+ };
121
+ }
122
+ export {
123
+ DocumentType as DocumentTypeOriginal,
124
+ searchDocuments2 as searchDocuments,
125
+ searchDocumentsMarkdown2 as searchDocumentsMarkdown
126
+ };
127
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/igor-v1-document-entry-document-search.http.ts","../../src/igor-v1-document-entry-document-search.types.ts","../../src/igor-v1-document-entry-document-search.meta.ts"],"sourcesContent":["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","/** 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","import * as ambassadorWixIgorV1DocumentEntry from './igor-v1-document-entry-document-search.http.js';\nimport * as ambassadorWixIgorV1DocumentEntryTypes from './igor-v1-document-entry-document-search.types.js';\nimport * as ambassadorWixIgorV1DocumentEntryUniversalTypes from './igor-v1-document-entry-document-search.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function searchDocuments(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIgorV1DocumentEntryUniversalTypes.SearchDocumentsRequest,\n ambassadorWixIgorV1DocumentEntryTypes.SearchDocumentsRequest,\n ambassadorWixIgorV1DocumentEntryUniversalTypes.SearchDocumentsResponse,\n ambassadorWixIgorV1DocumentEntryTypes.SearchDocumentsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIgorV1DocumentEntry.searchDocuments(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/docs/search',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function searchDocumentsMarkdown(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIgorV1DocumentEntryUniversalTypes.SearchDocumentsMarkdownRequest,\n ambassadorWixIgorV1DocumentEntryTypes.SearchDocumentsMarkdownRequest,\n ambassadorWixIgorV1DocumentEntryUniversalTypes.SearchDocumentsMarkdownResponse,\n ambassadorWixIgorV1DocumentEntryTypes.SearchDocumentsMarkdownResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIgorV1DocumentEntry.searchDocumentsMarkdown(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/docs/search/markdown',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n DocumentEntry as DocumentEntryOriginal,\n SearchDocumentsRequest as SearchDocumentsRequestOriginal,\n DocumentType as DocumentTypeOriginal,\n DocumentTypeWithLiterals as DocumentTypeWithLiteralsOriginal,\n SearchDocumentsResponse as SearchDocumentsResponseOriginal,\n SearchDocumentsMarkdownRequest as SearchDocumentsMarkdownRequestOriginal,\n SearchDocumentsMarkdownResponse as SearchDocumentsMarkdownResponseOriginal,\n} from './igor-v1-document-entry-document-search.types.js';\n"],"mappings":";AAAA,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,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,QAC5C;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAYO,SAAS,wBACd,SAC4B;AAC5B,WAAS,0BAA0B,EAAE,KAAK,GAAQ;AAChD,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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@@ -0,0 +1,43 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { SearchDocumentsOptions, SearchDocumentsResponse, SearchDocumentsMarkdownOptions, SearchDocumentsMarkdownResponse } from './index.typings.js';
3
+ export { DocumentEntry, DocumentType, DocumentTypeWithLiterals, SearchDocumentsMarkdownRequest, SearchDocumentsRequest } from './index.typings.js';
4
+
5
+ /** @internal */
6
+ declare function searchDocuments$1(httpClient: HttpClient): SearchDocumentsSignature;
7
+ interface SearchDocumentsSignature {
8
+ /**
9
+ * Searches Wix documentation entries by a search term and document type.
10
+ *
11
+ * Returns a ranked list of matching documentation entries ordered by relevance
12
+ * 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.
15
+ * @param - The search term to look up in the documentation.
16
+ * @returns The result of a SearchDocuments call.
17
+ */
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
+ }
20
+ /** @internal */
21
+ declare function searchDocumentsMarkdown$1(httpClient: HttpClient): SearchDocumentsMarkdownSignature;
22
+ interface SearchDocumentsMarkdownSignature {
23
+ /**
24
+ * Searches Wix documentation and returns results as a single markdown string
25
+ * ready to be passed directly to an LLM.
26
+ *
27
+ * 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.
32
+ * @param - The search term to look up in the documentation.
33
+ * @returns The result of a SearchDocumentsMarkdown call.
34
+ */
35
+ (searchTerm: string, options?: SearchDocumentsMarkdownOptions): Promise<NonNullablePaths<SearchDocumentsMarkdownResponse, `content`, 2>>;
36
+ }
37
+
38
+ /** @internal */
39
+ declare const searchDocuments: MaybeContext<BuildRESTFunction<typeof searchDocuments$1> & typeof searchDocuments$1>;
40
+ /** @internal */
41
+ declare const searchDocumentsMarkdown: MaybeContext<BuildRESTFunction<typeof searchDocumentsMarkdown$1> & typeof searchDocumentsMarkdown$1>;
42
+
43
+ export { SearchDocumentsMarkdownOptions, SearchDocumentsMarkdownResponse, SearchDocumentsOptions, SearchDocumentsResponse, searchDocuments, searchDocumentsMarkdown };