@wix/auto_sdk_igor_document-search 1.0.3 → 1.0.5

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 (46) hide show
  1. package/build/cjs/index.js +1 -0
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +8 -10
  4. package/build/cjs/index.typings.js +1 -0
  5. package/build/cjs/index.typings.js.map +1 -1
  6. package/build/cjs/meta.d.ts +6 -6
  7. package/build/cjs/meta.js +1 -0
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/es/index.mjs +1 -0
  10. package/build/es/index.mjs.map +1 -1
  11. package/build/es/index.typings.d.mts +8 -10
  12. package/build/es/index.typings.mjs +1 -0
  13. package/build/es/index.typings.mjs.map +1 -1
  14. package/build/es/meta.d.mts +6 -6
  15. package/build/es/meta.mjs +1 -0
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/internal/cjs/index.typings.d.ts +8 -10
  18. package/build/internal/cjs/meta.d.ts +6 -6
  19. package/build/internal/es/index.typings.d.mts +8 -10
  20. package/build/internal/es/meta.d.mts +6 -6
  21. package/package.json +4 -11
  22. package/build/cjs/schemas.d.ts +0 -56
  23. package/build/cjs/schemas.js +0 -117
  24. package/build/cjs/schemas.js.map +0 -1
  25. package/build/es/schemas.d.mts +0 -56
  26. package/build/es/schemas.mjs +0 -77
  27. package/build/es/schemas.mjs.map +0 -1
  28. package/build/internal/cjs/index.js +0 -230
  29. package/build/internal/cjs/index.js.map +0 -1
  30. package/build/internal/cjs/index.typings.js +0 -207
  31. package/build/internal/cjs/index.typings.js.map +0 -1
  32. package/build/internal/cjs/meta.js +0 -175
  33. package/build/internal/cjs/meta.js.map +0 -1
  34. package/build/internal/cjs/schemas.d.ts +0 -56
  35. package/build/internal/cjs/schemas.js +0 -117
  36. package/build/internal/cjs/schemas.js.map +0 -1
  37. package/build/internal/es/index.mjs +0 -204
  38. package/build/internal/es/index.mjs.map +0 -1
  39. package/build/internal/es/index.typings.mjs +0 -181
  40. package/build/internal/es/index.typings.mjs.map +0 -1
  41. package/build/internal/es/meta.mjs +0 -146
  42. package/build/internal/es/meta.mjs.map +0 -1
  43. package/build/internal/es/schemas.d.mts +0 -56
  44. package/build/internal/es/schemas.mjs +0 -77
  45. package/build/internal/es/schemas.mjs.map +0 -1
  46. package/schemas/package.json +0 -3
@@ -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. 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 /** High-level Wix platform and business overview documentation. */\n OVERVIEW = 'OVERVIEW',\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 | 'OVERVIEW';\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;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;AAA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AAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,YAAY;AAAA,UACZ,gBAAgB;AAAA,UAChB,cAAc;AAAA,UACd,mBAAmB;AAAA,QACrB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc,SAAS;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAuCA,eAAsBC,yBACpB,YACA,SAC0E;AAE1E,QAAM,EAAE,YAAY,YAAY,IAAI,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"]}
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. Pass 0 to return full untruncated content for every result.\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 /** High-level Wix platform and business overview documentation. */\n OVERVIEW = 'OVERVIEW',\n /** Task-oriented skills articles (docs nodes published under a /skills/ path). */\n SKILLS = 'SKILLS',\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 | 'OVERVIEW'\n | 'SKILLS';\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. Pass 0 to return full untruncated content for every result.\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. Pass 0 to return full untruncated content for every result.\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. Pass 0 to return full untruncated content for every result.\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;AACr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B;AAAA,MACA,CAAC,cAAc,SAAS;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAsCA,eAAsBC,yBACpB,YACA,SAC0E;AAE1E,QAAM,EAAE,YAAY,YAAY,IAAI,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"]}
@@ -53,8 +53,7 @@ interface SearchDocumentsRequest {
53
53
  * Maximum number of lines to include per result content. Defaults to 20.
54
54
  * Method results use section-aware truncation; article results are truncated
55
55
  * at this line count. A "Read more here: <url>" hint is appended when content
56
- * is truncated.
57
- * @min 1
56
+ * is truncated. Pass 0 to return full untruncated content for every result.
58
57
  * @max 200
59
58
  */
60
59
  linesInEachResult?: number | null;
@@ -80,10 +79,12 @@ declare enum DocumentType {
80
79
  /** Wix business solutions and workflow documentation. */
81
80
  BUSINESS_SOLUTIONS = "BUSINESS_SOLUTIONS",
82
81
  /** High-level Wix platform and business overview documentation. */
83
- OVERVIEW = "OVERVIEW"
82
+ OVERVIEW = "OVERVIEW",
83
+ /** Task-oriented skills articles (docs nodes published under a /skills/ path). */
84
+ SKILLS = "SKILLS"
84
85
  }
85
86
  /** @enumType */
86
- type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW';
87
+ type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW' | 'SKILLS';
87
88
  /** The result of a SearchDocuments call. */
88
89
  interface SearchDocumentsResponse {
89
90
  /**
@@ -112,8 +113,7 @@ interface SearchDocumentsMarkdownRequest {
112
113
  * Maximum number of lines to include per result. Defaults to 20. Method
113
114
  * results use section-aware truncation; article results are truncated at this
114
115
  * line count. A "Read more here: <url>" hint is appended when content is
115
- * truncated.
116
- * @min 1
116
+ * truncated. Pass 0 to return full untruncated content for every result.
117
117
  * @max 200
118
118
  */
119
119
  linesInEachResult?: number | null;
package/build/es/meta.mjs CHANGED
@@ -98,6 +98,7 @@ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
98
98
  DocumentType2["CLI"] = "CLI";
99
99
  DocumentType2["BUSINESS_SOLUTIONS"] = "BUSINESS_SOLUTIONS";
100
100
  DocumentType2["OVERVIEW"] = "OVERVIEW";
101
+ DocumentType2["SKILLS"] = "SKILLS";
101
102
  return DocumentType2;
102
103
  })(DocumentType || {});
103
104
 
@@ -1 +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 '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","/** 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 /** High-level Wix platform and business overview documentation. */\n OVERVIEW = 'OVERVIEW',\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 | 'OVERVIEW';\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","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,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;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AE5B,EAAAA,cAAA,UAAO;AAEP,EAAAA,cAAA,SAAM;AAEN,EAAAA,cAAA,UAAO;AAEP,EAAAA,cAAA,SAAM;AAEN,EAAAA,cAAA,gBAAa;AAEb,EAAAA,cAAA,kBAAe;AAEf,EAAAA,cAAA,SAAM;AAEN,EAAAA,cAAA,wBAAqB;AAErB,EAAAA,cAAA,cAAW;AApBD,SAAAA;AAAA,GAAA;;;ACvCL,SAASC,mBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6B,gBAAgB,OAAO;AAE1D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,2BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6B,wBAAwB,OAAO;AAElE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","DocumentType","searchDocuments","searchDocumentsMarkdown"]}
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 '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","/** 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. Pass 0 to return full untruncated content for every result.\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 /** High-level Wix platform and business overview documentation. */\n OVERVIEW = 'OVERVIEW',\n /** Task-oriented skills articles (docs nodes published under a /skills/ path). */\n SKILLS = 'SKILLS',\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 | 'OVERVIEW'\n | 'SKILLS';\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. Pass 0 to return full untruncated content for every result.\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,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,Q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AAAA,cAAA,+BAA4B;AAE5B,EAAAA,cAAA,UAAO;AAEP,EAAAA,cAAA,SAAM;AAEN,EAAAA,cAAA,UAAO;AAEP,EAAAA,cAAA,SAAM;AAEN,EAAAA,cAAA,gBAAa;AAEb,EAAAA,cAAA,kBAAe;AAEf,EAAAA,cAAA,SAAM;AAEN,EAAAA,cAAA,wBAAqB;AAErB,EAAAA,cAAA,cAAW;AAEX,EAAAA,cAAA,YAAS;AAtBC,SAAAA;AAAA,GAAA;;;ACtCL,SAASC,mBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6B,gBAAgB,OAAO;AAE1D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,2BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6B,wBAAwB,OAAO;AAElE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","DocumentType","searchDocuments","searchDocumentsMarkdown"]}
@@ -52,8 +52,7 @@ interface SearchDocumentsRequest {
52
52
  * Maximum number of lines to include per result content. Defaults to 20.
53
53
  * Method results use section-aware truncation; article results are truncated
54
54
  * at this line count. A "Read more here: <url>" hint is appended when content
55
- * is truncated.
56
- * @min 1
55
+ * is truncated. Pass 0 to return full untruncated content for every result.
57
56
  * @max 200
58
57
  */
59
58
  linesInEachResult?: number | null;
@@ -79,10 +78,12 @@ declare enum DocumentType {
79
78
  /** Wix business solutions and workflow documentation. */
80
79
  BUSINESS_SOLUTIONS = "BUSINESS_SOLUTIONS",
81
80
  /** High-level Wix platform and business overview documentation. */
82
- OVERVIEW = "OVERVIEW"
81
+ OVERVIEW = "OVERVIEW",
82
+ /** Task-oriented skills articles (docs nodes published under a /skills/ path). */
83
+ SKILLS = "SKILLS"
83
84
  }
84
85
  /** @enumType */
85
- type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW';
86
+ type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW' | 'SKILLS';
86
87
  /** The result of a SearchDocuments call. */
87
88
  interface SearchDocumentsResponse {
88
89
  /**
@@ -111,8 +112,7 @@ interface SearchDocumentsMarkdownRequest {
111
112
  * Maximum number of lines to include per result. Defaults to 20. Method
112
113
  * results use section-aware truncation; article results are truncated at this
113
114
  * line count. A "Read more here: <url>" hint is appended when content is
114
- * truncated.
115
- * @min 1
115
+ * truncated. Pass 0 to return full untruncated content for every result.
116
116
  * @max 200
117
117
  */
118
118
  linesInEachResult?: number | null;
@@ -156,8 +156,7 @@ interface SearchDocumentsOptions {
156
156
  * Maximum number of lines to include per result content. Defaults to 20.
157
157
  * Method results use section-aware truncation; article results are truncated
158
158
  * at this line count. A "Read more here: <url>" hint is appended when content
159
- * is truncated.
160
- * @min 1
159
+ * is truncated. Pass 0 to return full untruncated content for every result.
161
160
  * @max 200
162
161
  */
163
162
  linesInEachResult?: number | null;
@@ -193,8 +192,7 @@ interface SearchDocumentsMarkdownOptions {
193
192
  * Maximum number of lines to include per result. Defaults to 20. Method
194
193
  * results use section-aware truncation; article results are truncated at this
195
194
  * line count. A "Read more here: <url>" hint is appended when content is
196
- * truncated.
197
- * @min 1
195
+ * truncated. Pass 0 to return full untruncated content for every result.
198
196
  * @max 200
199
197
  */
200
198
  linesInEachResult?: number | null;
@@ -53,8 +53,7 @@ interface SearchDocumentsRequest {
53
53
  * Maximum number of lines to include per result content. Defaults to 20.
54
54
  * Method results use section-aware truncation; article results are truncated
55
55
  * at this line count. A "Read more here: <url>" hint is appended when content
56
- * is truncated.
57
- * @min 1
56
+ * is truncated. Pass 0 to return full untruncated content for every result.
58
57
  * @max 200
59
58
  */
60
59
  linesInEachResult?: number | null;
@@ -80,10 +79,12 @@ declare enum DocumentType {
80
79
  /** Wix business solutions and workflow documentation. */
81
80
  BUSINESS_SOLUTIONS = "BUSINESS_SOLUTIONS",
82
81
  /** High-level Wix platform and business overview documentation. */
83
- OVERVIEW = "OVERVIEW"
82
+ OVERVIEW = "OVERVIEW",
83
+ /** Task-oriented skills articles (docs nodes published under a /skills/ path). */
84
+ SKILLS = "SKILLS"
84
85
  }
85
86
  /** @enumType */
86
- type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW';
87
+ type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW' | 'SKILLS';
87
88
  /** The result of a SearchDocuments call. */
88
89
  interface SearchDocumentsResponse {
89
90
  /**
@@ -112,8 +113,7 @@ interface SearchDocumentsMarkdownRequest {
112
113
  * Maximum number of lines to include per result. Defaults to 20. Method
113
114
  * results use section-aware truncation; article results are truncated at this
114
115
  * line count. A "Read more here: <url>" hint is appended when content is
115
- * truncated.
116
- * @min 1
116
+ * truncated. Pass 0 to return full untruncated content for every result.
117
117
  * @max 200
118
118
  */
119
119
  linesInEachResult?: number | null;
@@ -52,8 +52,7 @@ interface SearchDocumentsRequest {
52
52
  * Maximum number of lines to include per result content. Defaults to 20.
53
53
  * Method results use section-aware truncation; article results are truncated
54
54
  * at this line count. A "Read more here: <url>" hint is appended when content
55
- * is truncated.
56
- * @min 1
55
+ * is truncated. Pass 0 to return full untruncated content for every result.
57
56
  * @max 200
58
57
  */
59
58
  linesInEachResult?: number | null;
@@ -79,10 +78,12 @@ declare enum DocumentType {
79
78
  /** Wix business solutions and workflow documentation. */
80
79
  BUSINESS_SOLUTIONS = "BUSINESS_SOLUTIONS",
81
80
  /** High-level Wix platform and business overview documentation. */
82
- OVERVIEW = "OVERVIEW"
81
+ OVERVIEW = "OVERVIEW",
82
+ /** Task-oriented skills articles (docs nodes published under a /skills/ path). */
83
+ SKILLS = "SKILLS"
83
84
  }
84
85
  /** @enumType */
85
- type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW';
86
+ type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW' | 'SKILLS';
86
87
  /** The result of a SearchDocuments call. */
87
88
  interface SearchDocumentsResponse {
88
89
  /**
@@ -111,8 +112,7 @@ interface SearchDocumentsMarkdownRequest {
111
112
  * Maximum number of lines to include per result. Defaults to 20. Method
112
113
  * results use section-aware truncation; article results are truncated at this
113
114
  * line count. A "Read more here: <url>" hint is appended when content is
114
- * truncated.
115
- * @min 1
115
+ * truncated. Pass 0 to return full untruncated content for every result.
116
116
  * @max 200
117
117
  */
118
118
  linesInEachResult?: number | null;
@@ -156,8 +156,7 @@ interface SearchDocumentsOptions {
156
156
  * Maximum number of lines to include per result content. Defaults to 20.
157
157
  * Method results use section-aware truncation; article results are truncated
158
158
  * at this line count. A "Read more here: <url>" hint is appended when content
159
- * is truncated.
160
- * @min 1
159
+ * is truncated. Pass 0 to return full untruncated content for every result.
161
160
  * @max 200
162
161
  */
163
162
  linesInEachResult?: number | null;
@@ -193,8 +192,7 @@ interface SearchDocumentsMarkdownOptions {
193
192
  * Maximum number of lines to include per result. Defaults to 20. Method
194
193
  * results use section-aware truncation; article results are truncated at this
195
194
  * line count. A "Read more here: <url>" hint is appended when content is
196
- * truncated.
197
- * @min 1
195
+ * truncated. Pass 0 to return full untruncated content for every result.
198
196
  * @max 200
199
197
  */
200
198
  linesInEachResult?: number | null;
@@ -53,8 +53,7 @@ interface SearchDocumentsRequest {
53
53
  * Maximum number of lines to include per result content. Defaults to 20.
54
54
  * Method results use section-aware truncation; article results are truncated
55
55
  * at this line count. A "Read more here: <url>" hint is appended when content
56
- * is truncated.
57
- * @min 1
56
+ * is truncated. Pass 0 to return full untruncated content for every result.
58
57
  * @max 200
59
58
  */
60
59
  linesInEachResult?: number | null;
@@ -80,10 +79,12 @@ declare enum DocumentType {
80
79
  /** Wix business solutions and workflow documentation. */
81
80
  BUSINESS_SOLUTIONS = "BUSINESS_SOLUTIONS",
82
81
  /** High-level Wix platform and business overview documentation. */
83
- OVERVIEW = "OVERVIEW"
82
+ OVERVIEW = "OVERVIEW",
83
+ /** Task-oriented skills articles (docs nodes published under a /skills/ path). */
84
+ SKILLS = "SKILLS"
84
85
  }
85
86
  /** @enumType */
86
- type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW';
87
+ type DocumentTypeWithLiterals = DocumentType | 'DOCUMENT_TYPE_UNSPECIFIED' | 'VELO' | 'SDK' | 'REST' | 'WDS' | 'BUILD_APPS' | 'WIX_HEADLESS' | 'CLI' | 'BUSINESS_SOLUTIONS' | 'OVERVIEW' | 'SKILLS';
87
88
  /** The result of a SearchDocuments call. */
88
89
  interface SearchDocumentsResponse {
89
90
  /**
@@ -112,8 +113,7 @@ interface SearchDocumentsMarkdownRequest {
112
113
  * Maximum number of lines to include per result. Defaults to 20. Method
113
114
  * results use section-aware truncation; article results are truncated at this
114
115
  * line count. A "Read more here: <url>" hint is appended when content is
115
- * truncated.
116
- * @min 1
116
+ * truncated. Pass 0 to return full untruncated content for every result.
117
117
  * @max 200
118
118
  */
119
119
  linesInEachResult?: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_igor_document-search",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -21,23 +21,16 @@
21
21
  "import": "./build/es/meta.mjs",
22
22
  "require": "./build/cjs/meta.js",
23
23
  "types": "./build/es/meta.d.mts"
24
- },
25
- "./schemas": {
26
- "import": "./build/es/schemas.mjs",
27
- "require": "./build/cjs/schemas.js",
28
- "types": "./build/es/schemas.d.mts"
29
24
  }
30
25
  },
31
26
  "files": [
32
27
  "build",
33
28
  "meta",
34
- "service-plugins",
35
- "schemas"
29
+ "service-plugins"
36
30
  ],
37
31
  "dependencies": {
38
32
  "@wix/sdk-runtime": "^1.0.24",
39
- "@wix/sdk-types": "^1.17.11",
40
- "zod": "^4.3.6"
33
+ "@wix/sdk-types": "^1.17.11"
41
34
  },
42
35
  "devDependencies": {
43
36
  "tsup": "^8.4.0",
@@ -57,5 +50,5 @@
57
50
  "fqdn": "wix.igor.v1.document_entry"
58
51
  }
59
52
  },
60
- "falconPackageHash": "dedb5de2573e5584cd1729457989bc7acd6034fb53f9fe5517c9e300"
53
+ "falconPackageHash": "af9812a9f46b8e966f501666bdedd6a4f1eead9f3845c5c273e29c4c"
61
54
  }
@@ -1,56 +0,0 @@
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
- OVERVIEW: "OVERVIEW";
18
- }>>;
19
- linesInEachResult: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
20
- }, z.core.$strip>>;
21
- }, z.core.$strip>;
22
- declare const SearchDocumentsResponse: z.ZodObject<{
23
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
24
- _id: z.ZodOptional<z.ZodString>;
25
- _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
26
- title: z.ZodOptional<z.ZodString>;
27
- content: z.ZodOptional<z.ZodString>;
28
- url: z.ZodOptional<z.ZodString>;
29
- relevanceScore: z.ZodOptional<z.ZodNumber>;
30
- kbName: z.ZodOptional<z.ZodString>;
31
- }, z.core.$strip>>>;
32
- }, z.core.$strip>;
33
- declare const SearchDocumentsMarkdownRequest: z.ZodObject<{
34
- searchTerm: z.ZodString;
35
- options: z.ZodOptional<z.ZodObject<{
36
- documentType: z.ZodOptional<z.ZodEnum<{
37
- DOCUMENT_TYPE_UNSPECIFIED: "DOCUMENT_TYPE_UNSPECIFIED";
38
- VELO: "VELO";
39
- SDK: "SDK";
40
- REST: "REST";
41
- WDS: "WDS";
42
- BUILD_APPS: "BUILD_APPS";
43
- WIX_HEADLESS: "WIX_HEADLESS";
44
- CLI: "CLI";
45
- BUSINESS_SOLUTIONS: "BUSINESS_SOLUTIONS";
46
- OVERVIEW: "OVERVIEW";
47
- }>>;
48
- maximumResults: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
49
- linesInEachResult: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
50
- }, z.core.$strip>>;
51
- }, z.core.$strip>;
52
- declare const SearchDocumentsMarkdownResponse: z.ZodObject<{
53
- content: z.ZodOptional<z.ZodString>;
54
- }, z.core.$strip>;
55
-
56
- export { SearchDocumentsMarkdownRequest, SearchDocumentsMarkdownResponse, SearchDocumentsRequest, SearchDocumentsResponse };
@@ -1,117 +0,0 @@
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 = /* @__PURE__ */ 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
- "OVERVIEW"
59
- ]).optional(),
60
- linesInEachResult: z.number().int().describe(
61
- '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.'
62
- ).min(1).max(200).optional().nullable()
63
- }).optional()
64
- });
65
- var SearchDocumentsResponse = /* @__PURE__ */ z.object({
66
- results: z.array(
67
- z.object({
68
- _id: z.string().describe("The unique identifier for this documentation entry.").max(500).optional(),
69
- _updatedDate: z.date().describe("The date the document was last updated.").optional().nullable(),
70
- title: z.string().describe("The title of the documentation entry.").max(1e3).optional(),
71
- content: z.string().describe("The full text content of the documentation entry.").max(1e5).optional(),
72
- url: z.string().describe("The direct URL to the documentation page for this entry.").max(2e3).optional(),
73
- relevanceScore: z.number().describe(
74
- "The relevance score in the range [0, 1]. Higher means more relevant."
75
- ).optional(),
76
- kbName: z.string().describe(
77
- 'The knowledge base this entry was retrieved from (e.g. "REST_METHODS_KB_ID").'
78
- ).max(100).optional()
79
- })
80
- ).max(100).optional()
81
- });
82
- var SearchDocumentsMarkdownRequest = /* @__PURE__ */ z.object({
83
- searchTerm: z.string().describe("The search term to look up in the documentation.").min(1).max(500),
84
- options: z.object({
85
- documentType: z.enum([
86
- "DOCUMENT_TYPE_UNSPECIFIED",
87
- "VELO",
88
- "SDK",
89
- "REST",
90
- "WDS",
91
- "BUILD_APPS",
92
- "WIX_HEADLESS",
93
- "CLI",
94
- "BUSINESS_SOLUTIONS",
95
- "OVERVIEW"
96
- ]).optional(),
97
- maximumResults: z.number().int().describe(
98
- "The maximum number of results to return. Defaults to 15. Valid range: [1, 20]."
99
- ).min(1).max(20).optional().nullable(),
100
- linesInEachResult: z.number().int().describe(
101
- '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.'
102
- ).min(1).max(200).optional().nullable()
103
- }).optional()
104
- });
105
- var SearchDocumentsMarkdownResponse = /* @__PURE__ */ z.object({
106
- content: z.string().describe(
107
- "The search results as a single markdown document. Method results are interleaved\nwith article results. Results are separated by a line of equal signs."
108
- ).max(5e5).optional()
109
- });
110
- // Annotate the CommonJS export names for ESM import in node:
111
- 0 && (module.exports = {
112
- SearchDocumentsMarkdownRequest,
113
- SearchDocumentsMarkdownResponse,
114
- SearchDocumentsRequest,
115
- SearchDocumentsResponse
116
- });
117
- //# sourceMappingURL=schemas.js.map
@@ -1 +0,0 @@
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 = /*#__PURE__*/ 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 'OVERVIEW',\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 = /*#__PURE__*/ 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 = /*#__PURE__*/ 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 'OVERVIEW',\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 = /*#__PURE__*/ 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,yBAAuC,gBAAE,SAAO;AAAA,EAC3D,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,MACA;AAAA,IACF,CAAC,EACA,SAAS;AAAA,IACZ,mBACG,SAAO,EACP,IAAI,EACJ;AAAA,MACC;AAAA,IACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,EACd,C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