@wix/auto_sdk_seo_tag-suggestions 1.0.0 → 1.0.1
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.
- package/build/cjs/index.d.ts +8 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +24 -24
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +12 -12
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +24 -24
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +12 -12
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -8
- package/build/internal/cjs/index.typings.d.ts +24 -24
- package/build/internal/cjs/meta.d.ts +12 -12
- package/build/internal/es/index.d.mts +8 -8
- package/build/internal/es/index.typings.d.mts +24 -24
- package/build/internal/es/meta.d.mts +12 -12
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface GenerateTitleSuggestionsSignature {
|
|
|
8
8
|
* Generates SEO title tag suggestions for a page.
|
|
9
9
|
*
|
|
10
10
|
* Returns up to 10 ready-to-use title texts for the page, based on the page
|
|
11
|
-
* name, page type, and primary keyword. Suggestions aim for the 45
|
|
11
|
+
* name, page type, and primary keyword. Suggestions aim for the 45 to 65
|
|
12
12
|
* character range that displays fully in search results.
|
|
13
13
|
*/
|
|
14
14
|
(options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
|
|
@@ -22,10 +22,10 @@ interface GenerateDescriptionSuggestionsSignature {
|
|
|
22
22
|
*
|
|
23
23
|
* Returns up to 10 ready-to-use meta description texts, based on the page
|
|
24
24
|
* name, topic, page type, and the optional context fields. Suggestions aim
|
|
25
|
-
* for the 130
|
|
25
|
+
* for the 130 to 165 character range that displays fully in search results.
|
|
26
26
|
*
|
|
27
|
-
* The optional context fields
|
|
28
|
-
* type, business location, and page content
|
|
27
|
+
* The optional context fields (primary keyword, tone of voice, business
|
|
28
|
+
* type, business location, and page content) are hints that may influence
|
|
29
29
|
* the generated text; they aren't guaranteed to appear in it.
|
|
30
30
|
*/
|
|
31
31
|
(options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 2>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
|
|
@@ -37,8 +37,8 @@ interface GenerateAltTextSuggestionsSignature {
|
|
|
37
37
|
/**
|
|
38
38
|
* Generates alt text suggestions for a single image of a Wix-managed item.
|
|
39
39
|
*
|
|
40
|
-
* The image must belong to a Wix-managed item
|
|
41
|
-
*
|
|
40
|
+
* The image must belong to a Wix-managed item, such as a site page or a
|
|
41
|
+
* store product, identified by `image.parentItemId` and
|
|
42
42
|
* `itemType`. Wix reads that item's stored SEO data to give the AI context
|
|
43
43
|
* about what the image is for. This method can't generate alt text for an
|
|
44
44
|
* arbitrary image URL with no owning item.
|
|
@@ -72,8 +72,8 @@ interface GenerateHeadingStructureSuggestionsSignature {
|
|
|
72
72
|
* Suggests corrected heading levels for a page's headings.
|
|
73
73
|
*
|
|
74
74
|
* Pass the page's headings in document order, each with its raw HTML and
|
|
75
|
-
* your own reference IDs. The AI checks the heading hierarchy
|
|
76
|
-
* no skipped levels, headings that match their content
|
|
75
|
+
* your own reference IDs. The AI checks the heading hierarchy (one H1,
|
|
76
|
+
* no skipped levels, headings that match their content) and returns a
|
|
77
77
|
* suggested tag per heading that should change, echoing your reference IDs
|
|
78
78
|
* back so you can locate each element.
|
|
79
79
|
*
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.http.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.public.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.context.ts"],"sourcesContent":["export * from './src/seo-suggestions-v1-tag-suggestions-tag-suggestions.context.js';\n","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 ambassadorWixSeoSuggestionsV1TagSuggestions from './seo-suggestions-v1-tag-suggestions-tag-suggestions.http.js';\n\n/**\n * SEO tag texts generated for a page.\n *\n * A computed projection — the suggestions are generated per call and aren't\n * stored, so there is no ID to retrieve them by later.\n */\nexport interface TagSuggestions {\n /**\n * Suggested tag texts, best match first.\n * @readonly\n * @maxSize 10\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface GenerateTitleSuggestionsRequest {\n /**\n * Kind of page the title is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n}\n\n/**\n * Kind of page the suggestion is for. Helps the AI phrase the suggestion for\n * the page's purpose.\n */\nexport enum PageType {\n UNKNOWN_PAGE_TYPE = 'UNKNOWN_PAGE_TYPE',\n /** A general site page. This is the default when no page type is passed. */\n WEBSITE_PAGE = 'WEBSITE_PAGE',\n /** The site's homepage. */\n HOMEPAGE = 'HOMEPAGE',\n /** A blog post. */\n BLOG_POST = 'BLOG_POST',\n /** A blog category page. */\n BLOG_CATEGORY_PAGE = 'BLOG_CATEGORY_PAGE',\n /** A blog tags page. */\n BLOG_TAGS_PAGE = 'BLOG_TAGS_PAGE',\n /** A store product details page. */\n PRODUCT_PAGE = 'PRODUCT_PAGE',\n /** A store product category or collection page. */\n PRODUCT_CATEGORY_PAGE = 'PRODUCT_CATEGORY_PAGE',\n /** A service booking page. */\n SERVICE_BOOKING_PAGE = 'SERVICE_BOOKING_PAGE',\n /** An event details page. */\n EVENT_PAGE = 'EVENT_PAGE',\n /** A restaurant menu page. */\n RESTAURANT_MENU_PAGE = 'RESTAURANT_MENU_PAGE',\n /** A restaurant menu item page. */\n RESTAURANT_MENU_ITEM_PAGE = 'RESTAURANT_MENU_ITEM_PAGE',\n /** An online program page. */\n ONLINE_PROGRAM_PAGE = 'ONLINE_PROGRAM_PAGE',\n /** A portfolio collection page. */\n PORTFOLIO_COLLECTION_PAGE = 'PORTFOLIO_COLLECTION_PAGE',\n /** A portfolio project page. */\n PORTFOLIO_PROJECT_PAGE = 'PORTFOLIO_PROJECT_PAGE',\n /** A table reservations page. */\n TABLE_RESERVATIONS_PAGE = 'TABLE_RESERVATIONS_PAGE',\n /** A page of another Wix app. */\n OTHER_APP_PAGE = 'OTHER_APP_PAGE',\n}\n\n/** @enumType */\nexport type PageTypeWithLiterals =\n | PageType\n | 'UNKNOWN_PAGE_TYPE'\n | 'WEBSITE_PAGE'\n | 'HOMEPAGE'\n | 'BLOG_POST'\n | 'BLOG_CATEGORY_PAGE'\n | 'BLOG_TAGS_PAGE'\n | 'PRODUCT_PAGE'\n | 'PRODUCT_CATEGORY_PAGE'\n | 'SERVICE_BOOKING_PAGE'\n | 'EVENT_PAGE'\n | 'RESTAURANT_MENU_PAGE'\n | 'RESTAURANT_MENU_ITEM_PAGE'\n | 'ONLINE_PROGRAM_PAGE'\n | 'PORTFOLIO_COLLECTION_PAGE'\n | 'PORTFOLIO_PROJECT_PAGE'\n | 'TABLE_RESERVATIONS_PAGE'\n | 'OTHER_APP_PAGE';\n\nexport interface GenerateTitleSuggestionsResponse {\n /** The generated title tag suggestions. */\n tagSuggestions?: TagSuggestions;\n}\n\nexport interface GenerateDescriptionSuggestionsRequest {\n /**\n * Kind of page the description is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * What the page is about — for example, the product name for a product\n * page, or the article subject for a blog post.\n * @maxLength 1000\n * @minLength 1\n */\n topic: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it. Optional hint.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n /**\n * Tone of voice for the generated text — for example, `friendly` or\n * `professional`. Optional hint.\n * @maxLength 1000\n */\n toneOfVoice?: string;\n /**\n * Type of business the site is for. Optional hint.\n * @maxLength 1000\n */\n businessType?: string;\n /**\n * Location of the business, for location-aware phrasing. Optional hint.\n * @maxLength 1000\n */\n businessLocation?: string;\n /**\n * Text content of the page, to ground the description in what the page\n * actually says. Send page content only — don't include personal data.\n * Optional hint.\n * @maxLength 100000\n */\n pageContent?: string | null;\n}\n\nexport interface GenerateDescriptionSuggestionsResponse {\n /** The generated description tag suggestions. */\n tagSuggestions?: TagSuggestions;\n}\n\nexport interface GenerateAltTextSuggestionsRequest {\n /** The image to generate alt text for. */\n image: ImageReference;\n /**\n * Type of the Wix item the image belongs to. For example, `STATIC_PAGE_V2`\n * for a regular site page, `STORES_PRODUCT` for a store product, or\n * `BLOG_POST` for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/** An image of a Wix-managed item, identified for alt text generation. */\nexport interface ImageReference {\n /**\n * Your reference ID for the image. Echoed back in the result so you can\n * match suggestions to images — Wix doesn't interpret it.\n * @maxLength 1000\n */\n _id?: string;\n /**\n * URL of the image file. Must be Wix-hosted media — a URL on a Wix media\n * domain such as `static.wixstatic.com`. Other hosts are rejected.\n * @format WEB_URL\n * @maxLength 1000\n */\n url?: string;\n /**\n * ID of the Wix item the image belongs to — for example, a page ID or a\n * store product ID, matching the request's `itemType`.\n * @maxLength 100\n */\n parentItemId?: string;\n}\n\nexport interface GenerateAltTextSuggestionsResponse {\n /** The generated alt text suggestions. */\n altTextSuggestions?: AltTextSuggestions;\n}\n\n/** Alt texts generated for one image. */\nexport interface AltTextSuggestions {\n /**\n * Your reference ID for the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n imageId?: string;\n /**\n * URL of the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n url?: string;\n /**\n * Suggested alt texts, best match first.\n * @readonly\n * @maxSize 5\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface BulkGenerateAltTextSuggestionsRequest {\n /**\n * The images to generate alt text for.\n * @maxSize 20\n */\n images: ImageReference[];\n /**\n * Type of the Wix item the images belong to. All images in one call must\n * belong to items of the same type. For example, `STATIC_PAGE_V2` for a\n * regular site page, `STORES_PRODUCT` for a store product, or `BLOG_POST`\n * for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\nexport interface BulkGenerateAltTextSuggestionsResponse {\n /**\n * A result per requested image, in request order.\n * @readonly\n * @maxSize 20\n */\n results?: BulkAltTextResult[];\n /**\n * Number of images that got suggestions.\n * @readonly\n */\n successCount?: number;\n /**\n * Number of images that failed. Failed images can be retried\n * individually with Generate Alt Text Suggestions.\n * @readonly\n */\n failureCount?: number;\n}\n\n/** The bulk-generation result for one image. */\nexport interface BulkAltTextResult {\n /**\n * Your reference ID for the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n imageId?: string;\n /**\n * Whether alt text was generated for this image.\n * @readonly\n */\n success?: boolean;\n /**\n * Suggested alt texts, best match first. Empty when `success` is `false`.\n * @readonly\n * @maxSize 5\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface GenerateHeadingStructureSuggestionsRequest {\n /**\n * The page's heading elements, in the order they appear on the page.\n * @maxSize 200\n */\n headings: HeadingNode[];\n /**\n * Your reference ID for the page the headings belong to. For Wix pages,\n * the page ID — the page title is then read from the page to give the AI\n * context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item. For example, `STATIC_PAGE_V2` for a regular\n * site page or `BLOG_POST` for a blog post.\n * @maxLength 200\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * One heading element of the page, as the caller knows it.\n *\n * The identifying fields — `id`, `uiElementId`, `attributeId` — are the\n * caller's own references. Wix echoes them back on the matching suggestion\n * and doesn't interpret them. `sectionId` is different: it guides the AI's\n * grouping of headings and isn't echoed back.\n *\n * `id` is required, and the combination of `id`, `uiElementId`, and\n * `attributeId` must be unique within a request — that combination is what\n * matches a suggestion back to its heading, so two headings sharing one would\n * both be given the same suggestion.\n */\nexport interface HeadingNode {\n /**\n * Your reference ID for the heading element. Required, and must be unique\n * within the request together with `uiElementId` and `attributeId` if you\n * send them.\n * @maxLength 1000\n * @minLength 1\n */\n _id?: string;\n /**\n * Additional reference ID for the heading's text attribute, if you use\n * one. Echoed back unchanged.\n * @maxLength 1000\n */\n attributeId?: string;\n /**\n * Raw HTML of the heading element, including its tag — for example,\n * `<h2>Our services</h2>`. Send page content only — don't include\n * personal data.\n * @maxLength 100000\n * @minLength 1\n */\n htmlString?: string;\n /**\n * Additional reference ID for the heading element, if you use one. Echoed\n * back unchanged.\n * @maxLength 1000\n */\n uiElementId?: string;\n /**\n * Your reference ID for the page section the heading belongs to. Helps\n * the AI keep one heading hierarchy per section.\n * @maxLength 1000\n */\n sectionId?: string;\n}\n\nexport interface GenerateHeadingStructureSuggestionsResponse {\n /**\n * A suggestion per heading whose level should change. Headings that are\n * already correct aren't returned.\n * @readonly\n * @maxSize 200\n */\n suggestions?: HeadingSuggestion[];\n}\n\n/** A suggested heading-level change for one heading element. */\nexport interface HeadingSuggestion {\n /**\n * Your reference ID for the heading element, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n headingId?: string;\n /**\n * Your `uiElementId` reference, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n uiElementId?: string;\n /**\n * Your `attributeId` reference, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n attributeId?: string;\n /**\n * The heading's current tag. For example, `H2`.\n * @readonly\n * @maxLength 10\n */\n currentTag?: string;\n /**\n * The suggested tag. For example, `H3`, or `P` for text that shouldn't be\n * a heading.\n * @readonly\n * @maxLength 10\n */\n proposedTag?: string;\n}\n\n/** @docsIgnore */\nexport type GenerateTitleSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateDescriptionSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateAltTextSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkGenerateAltTextSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateHeadingStructureSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45–65\n * character range that displays fully in search results.\n * @public\n * @documentationMaturity preview\n * @requiredField options.pageName\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_title_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions\n */\nexport async function generateTitleSuggestions(\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pageType: options?.pageType,\n pageName: options?.pageName,\n primaryKeyword: options?.primaryKeyword,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateTitleSuggestions(\n payload\n );\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 pageType: '$[0].pageType',\n pageName: '$[0].pageName',\n primaryKeyword: '$[0].primaryKeyword',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateTitleSuggestionsOptions {\n /**\n * Kind of page the title is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n}\n\n/**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130–165 character range that displays fully in search results.\n *\n * The optional context fields — primary keyword, tone of voice, business\n * type, business location, and page content — are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n * @public\n * @documentationMaturity preview\n * @requiredField options.pageName\n * @requiredField options.topic\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_description_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions\n */\nexport async function generateDescriptionSuggestions(\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pageType: options?.pageType,\n pageName: options?.pageName,\n topic: options?.topic,\n primaryKeyword: options?.primaryKeyword,\n toneOfVoice: options?.toneOfVoice,\n businessType: options?.businessType,\n businessLocation: options?.businessLocation,\n pageContent: options?.pageContent,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateDescriptionSuggestions(\n payload\n );\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 pageType: '$[0].pageType',\n pageName: '$[0].pageName',\n topic: '$[0].topic',\n primaryKeyword: '$[0].primaryKeyword',\n toneOfVoice: '$[0].toneOfVoice',\n businessType: '$[0].businessType',\n businessLocation: '$[0].businessLocation',\n pageContent: '$[0].pageContent',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateDescriptionSuggestionsOptions {\n /**\n * Kind of page the description is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * What the page is about — for example, the product name for a product\n * page, or the article subject for a blog post.\n * @maxLength 1000\n * @minLength 1\n */\n topic: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it. Optional hint.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n /**\n * Tone of voice for the generated text — for example, `friendly` or\n * `professional`. Optional hint.\n * @maxLength 1000\n */\n toneOfVoice?: string;\n /**\n * Type of business the site is for. Optional hint.\n * @maxLength 1000\n */\n businessType?: string;\n /**\n * Location of the business, for location-aware phrasing. Optional hint.\n * @maxLength 1000\n */\n businessLocation?: string;\n /**\n * Text content of the page, to ground the description in what the page\n * actually says. Send page content only — don't include personal data.\n * Optional hint.\n * @maxLength 100000\n */\n pageContent?: string | null;\n}\n\n/**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item — a site page or a vertical\n * item such as a store product — identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n * @param image - The image to generate alt text for.\n * @public\n * @documentationMaturity preview\n * @requiredField image\n * @requiredField options\n * @requiredField options.itemType\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_alt_text_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions\n */\nexport async function generateAltTextSuggestions(\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;\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 image: image,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateAltTextSuggestions(\n payload\n );\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: { image: '$[0]', itemType: '$[1].itemType' },\n singleArgumentUnchanged: false,\n },\n ['image', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateAltTextSuggestionsOptions {\n /**\n * Type of the Wix item the image belongs to. For example, `STATIC_PAGE_V2`\n * for a regular site page, `STORES_PRODUCT` for a store product, or\n * `BLOG_POST` for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n * @param images - The images to generate alt text for.\n * @public\n * @documentationMaturity preview\n * @requiredField images\n * @requiredField options\n * @requiredField options.itemType\n * @permissionId seo:suggestions:v1:tag_suggestions:bulk_generate_alt_text_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions\n */\nexport async function bulkGenerateAltTextSuggestions(\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 4\n > & {\n __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;\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 images: images,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.bulkGenerateAltTextSuggestions(\n payload\n );\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: { images: '$[0]', itemType: '$[1].itemType' },\n singleArgumentUnchanged: false,\n },\n ['images', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkGenerateAltTextSuggestionsOptions {\n /**\n * Type of the Wix item the images belong to. All images in one call must\n * belong to items of the same type. For example, `STATIC_PAGE_V2` for a\n * regular site page, `STORES_PRODUCT` for a store product, or `BLOG_POST`\n * for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy — one H1,\n * no skipped levels, headings that match their content — and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n * @param headings - The page's heading elements, in the order they appear on the page.\n * @public\n * @documentationMaturity preview\n * @requiredField headings\n * @requiredField options\n * @requiredField options.itemType\n * @requiredField options.pageId\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_heading_structure_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions\n */\nexport async function generateHeadingStructureSuggestions(\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n GenerateHeadingStructureSuggestionsResponse,\n | `suggestions`\n | `suggestions.${number}.headingId`\n | `suggestions.${number}.uiElementId`\n | `suggestions.${number}.attributeId`\n | `suggestions.${number}.currentTag`\n | `suggestions.${number}.proposedTag`,\n 4\n > & {\n __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;\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 headings: headings,\n pageId: options?.pageId,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateHeadingStructureSuggestions(\n payload\n );\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 headings: '$[0]',\n pageId: '$[1].pageId',\n itemType: '$[1].itemType',\n },\n singleArgumentUnchanged: false,\n },\n ['headings', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateHeadingStructureSuggestionsOptions {\n /**\n * Your reference ID for the page the headings belong to. For Wix pages,\n * the page ID — the page title is then read from the page to give the AI\n * context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item. For example, `STATIC_PAGE_V2` for a regular\n * site page or `BLOG_POST` for a blog post.\n * @maxLength 200\n * @minLength 1\n */\n itemType: string;\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/seo-suggestions/v1',\n destPath: '/v1',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_tag-suggestions';\n\n/**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45–65\n * character range that displays fully in search results.\n */\nexport function generateTitleSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateTitleSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/title',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateTitleSuggestions;\n}\n\n/**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130–165 character range that displays fully in search results.\n *\n * The optional context fields — primary keyword, tone of voice, business\n * type, business location, and page content — are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n */\nexport function generateDescriptionSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateDescriptionSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/description',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateDescriptionSuggestions;\n}\n\n/**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item — a site page or a vertical\n * item such as a store product — identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n */\nexport function generateAltTextSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateAltTextSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/alt-text',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateAltTextSuggestions;\n}\n\n/**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n */\nexport function bulkGenerateAltTextSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGenerateAltTextSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/alt-text-bulk',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkGenerateAltTextSuggestions;\n}\n\n/**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy — one H1,\n * no skipped levels, headings that match their content — and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n */\nexport function generateHeadingStructureSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateHeadingStructureSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/heading-structure',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateHeadingStructureSuggestions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkGenerateAltTextSuggestionsApplicationErrors,\n BulkGenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsResponse,\n GenerateAltTextSuggestionsApplicationErrors,\n GenerateAltTextSuggestionsOptions,\n GenerateAltTextSuggestionsResponse,\n GenerateDescriptionSuggestionsApplicationErrors,\n GenerateDescriptionSuggestionsOptions,\n GenerateDescriptionSuggestionsResponse,\n GenerateHeadingStructureSuggestionsApplicationErrors,\n GenerateHeadingStructureSuggestionsOptions,\n GenerateHeadingStructureSuggestionsResponse,\n GenerateTitleSuggestionsApplicationErrors,\n GenerateTitleSuggestionsOptions,\n GenerateTitleSuggestionsResponse,\n HeadingNode,\n ImageReference,\n bulkGenerateAltTextSuggestions as universalBulkGenerateAltTextSuggestions,\n generateAltTextSuggestions as universalGenerateAltTextSuggestions,\n generateDescriptionSuggestions as universalGenerateDescriptionSuggestions,\n generateHeadingStructureSuggestions as universalGenerateHeadingStructureSuggestions,\n generateTitleSuggestions as universalGenerateTitleSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function generateTitleSuggestions(\n httpClient: HttpClient\n): GenerateTitleSuggestionsSignature {\n return (\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n ) =>\n universalGenerateTitleSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateTitleSuggestionsSignature {\n /**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45–65\n * character range that displays fully in search results.\n */\n (\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n ): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateDescriptionSuggestions(\n httpClient: HttpClient\n): GenerateDescriptionSuggestionsSignature {\n return (\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n ) =>\n universalGenerateDescriptionSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateDescriptionSuggestionsSignature {\n /**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130–165 character range that displays fully in search results.\n *\n * The optional context fields — primary keyword, tone of voice, business\n * type, business location, and page content — are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n */\n (\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateAltTextSuggestions(\n httpClient: HttpClient\n): GenerateAltTextSuggestionsSignature {\n return (\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n ) =>\n universalGenerateAltTextSuggestions(\n image,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateAltTextSuggestionsSignature {\n /**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item — a site page or a vertical\n * item such as a store product — identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n * @param - The image to generate alt text for.\n */\n (\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n ): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function bulkGenerateAltTextSuggestions(\n httpClient: HttpClient\n): BulkGenerateAltTextSuggestionsSignature {\n return (\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n ) =>\n universalBulkGenerateAltTextSuggestions(\n images,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGenerateAltTextSuggestionsSignature {\n /**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n * @param - The images to generate alt text for.\n */\n (\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 4\n > & {\n __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateHeadingStructureSuggestions(\n httpClient: HttpClient\n): GenerateHeadingStructureSuggestionsSignature {\n return (\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n ) =>\n universalGenerateHeadingStructureSuggestions(\n headings,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateHeadingStructureSuggestionsSignature {\n /**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy — one H1,\n * no skipped levels, headings that match their content — and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n * @param - The page's heading elements, in the order they appear on the page.\n */\n (\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n GenerateHeadingStructureSuggestionsResponse,\n | `suggestions`\n | `suggestions.${number}.headingId`\n | `suggestions.${number}.uiElementId`\n | `suggestions.${number}.attributeId`\n | `suggestions.${number}.currentTag`\n | `suggestions.${number}.proposedTag`,\n 4\n > & {\n __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport {\n AltTextSuggestions,\n BulkAltTextResult,\n BulkGenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsRequest,\n BulkGenerateAltTextSuggestionsResponse,\n GenerateAltTextSuggestionsOptions,\n GenerateAltTextSuggestionsRequest,\n GenerateAltTextSuggestionsResponse,\n GenerateDescriptionSuggestionsOptions,\n GenerateDescriptionSuggestionsRequest,\n GenerateDescriptionSuggestionsResponse,\n GenerateHeadingStructureSuggestionsOptions,\n GenerateHeadingStructureSuggestionsRequest,\n GenerateHeadingStructureSuggestionsResponse,\n GenerateTitleSuggestionsOptions,\n GenerateTitleSuggestionsRequest,\n GenerateTitleSuggestionsResponse,\n HeadingNode,\n HeadingSuggestion,\n ImageReference,\n PageType,\n TagSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n","import {\n generateTitleSuggestions as publicGenerateTitleSuggestions,\n generateDescriptionSuggestions as publicGenerateDescriptionSuggestions,\n generateAltTextSuggestions as publicGenerateAltTextSuggestions,\n bulkGenerateAltTextSuggestions as publicBulkGenerateAltTextSuggestions,\n generateHeadingStructureSuggestions as publicGenerateHeadingStructureSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const generateTitleSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateTitleSuggestions> &\n typeof publicGenerateTitleSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateTitleSuggestions);\nexport const generateDescriptionSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateDescriptionSuggestions> &\n typeof publicGenerateDescriptionSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateDescriptionSuggestions);\nexport const generateAltTextSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateAltTextSuggestions> &\n typeof publicGenerateAltTextSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateAltTextSuggestions);\nexport const bulkGenerateAltTextSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicBulkGenerateAltTextSuggestions> &\n typeof publicBulkGenerateAltTextSuggestions\n> = /*#__PURE__*/ createRESTModule(publicBulkGenerateAltTextSuggestions);\nexport const generateHeadingStructureSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateHeadingStructureSuggestions> &\n typeof publicGenerateHeadingStructureSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateHeadingStructureSuggestions);\n\nexport { PageType } from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\nexport {\n TagSuggestions,\n GenerateTitleSuggestionsRequest,\n GenerateTitleSuggestionsResponse,\n GenerateDescriptionSuggestionsRequest,\n GenerateDescriptionSuggestionsResponse,\n GenerateAltTextSuggestionsRequest,\n ImageReference,\n GenerateAltTextSuggestionsResponse,\n AltTextSuggestions,\n BulkGenerateAltTextSuggestionsRequest,\n BulkGenerateAltTextSuggestionsResponse,\n BulkAltTextResult,\n GenerateHeadingStructureSuggestionsRequest,\n HeadingNode,\n GenerateHeadingStructureSuggestionsResponse,\n HeadingSuggestion,\n GenerateTitleSuggestionsOptions,\n GenerateDescriptionSuggestionsOptions,\n GenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsOptions,\n GenerateHeadingStructureSuggestionsOptions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\nexport {\n PageTypeWithLiterals,\n GenerateTitleSuggestionsApplicationErrors,\n GenerateDescriptionSuggestionsApplicationErrors,\n GenerateAltTextSuggestionsApplicationErrors,\n BulkGenerateAltTextSuggestionsApplicationErrors,\n GenerateHeadingStructureSuggestionsApplicationErrors,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,wCAAAA;AAAA,EAAA,kCAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,2CAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,oDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA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,SAAO,CACL,YAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,4BACd,YACqC;AACrC,SAAO,CACL,OACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,gCACd,YACyC;AACzC,SAAO,CACL,QACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmCO,SAASC,qCACd,YAC8C;AAC9C,SAAO,CACL,UACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtNA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,8BAGK,2DAAiBA,2BAAgC;AAC5D,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,uCAGK,2DAAiBA,oCAAyC;","names":["bulkGenerateAltTextSuggestions","generateAltTextSuggestions","generateDescriptionSuggestions","generateHeadingStructureSuggestions","generateTitleSuggestions","PageType","generateTitleSuggestions","sdkTransformError","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions","generateTitleSuggestions","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions","import_rest_modules","generateTitleSuggestions","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.http.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.public.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.context.ts"],"sourcesContent":["export * from './src/seo-suggestions-v1-tag-suggestions-tag-suggestions.context.js';\n","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 ambassadorWixSeoSuggestionsV1TagSuggestions from './seo-suggestions-v1-tag-suggestions-tag-suggestions.http.js';\n\n/**\n * SEO tag texts generated for a page.\n *\n * A computed projection: the suggestions are generated per call and aren't\n * stored, so there is no ID to retrieve them by later.\n */\nexport interface TagSuggestions {\n /**\n * Suggested tag texts, best match first.\n * @readonly\n * @maxSize 10\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface GenerateTitleSuggestionsRequest {\n /**\n * Kind of page the title is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n}\n\n/**\n * Kind of page the suggestion is for. Helps the AI phrase the suggestion for\n * the page's purpose.\n */\nexport enum PageType {\n UNKNOWN_PAGE_TYPE = 'UNKNOWN_PAGE_TYPE',\n /** A general site page. This is the default when no page type is passed. */\n WEBSITE_PAGE = 'WEBSITE_PAGE',\n /** The site's homepage. */\n HOMEPAGE = 'HOMEPAGE',\n /** A blog post. */\n BLOG_POST = 'BLOG_POST',\n /** A blog category page. */\n BLOG_CATEGORY_PAGE = 'BLOG_CATEGORY_PAGE',\n /** A blog tags page. */\n BLOG_TAGS_PAGE = 'BLOG_TAGS_PAGE',\n /** A store product details page. */\n PRODUCT_PAGE = 'PRODUCT_PAGE',\n /** A store product category or collection page. */\n PRODUCT_CATEGORY_PAGE = 'PRODUCT_CATEGORY_PAGE',\n /** A service booking page. */\n SERVICE_BOOKING_PAGE = 'SERVICE_BOOKING_PAGE',\n /** An event details page. */\n EVENT_PAGE = 'EVENT_PAGE',\n /** A restaurant menu page. */\n RESTAURANT_MENU_PAGE = 'RESTAURANT_MENU_PAGE',\n /** A restaurant menu item page. */\n RESTAURANT_MENU_ITEM_PAGE = 'RESTAURANT_MENU_ITEM_PAGE',\n /** An online program page. */\n ONLINE_PROGRAM_PAGE = 'ONLINE_PROGRAM_PAGE',\n /** A portfolio collection page. */\n PORTFOLIO_COLLECTION_PAGE = 'PORTFOLIO_COLLECTION_PAGE',\n /** A portfolio project page. */\n PORTFOLIO_PROJECT_PAGE = 'PORTFOLIO_PROJECT_PAGE',\n /** A table reservations page. */\n TABLE_RESERVATIONS_PAGE = 'TABLE_RESERVATIONS_PAGE',\n /** A page of another Wix app. */\n OTHER_APP_PAGE = 'OTHER_APP_PAGE',\n}\n\n/** @enumType */\nexport type PageTypeWithLiterals =\n | PageType\n | 'UNKNOWN_PAGE_TYPE'\n | 'WEBSITE_PAGE'\n | 'HOMEPAGE'\n | 'BLOG_POST'\n | 'BLOG_CATEGORY_PAGE'\n | 'BLOG_TAGS_PAGE'\n | 'PRODUCT_PAGE'\n | 'PRODUCT_CATEGORY_PAGE'\n | 'SERVICE_BOOKING_PAGE'\n | 'EVENT_PAGE'\n | 'RESTAURANT_MENU_PAGE'\n | 'RESTAURANT_MENU_ITEM_PAGE'\n | 'ONLINE_PROGRAM_PAGE'\n | 'PORTFOLIO_COLLECTION_PAGE'\n | 'PORTFOLIO_PROJECT_PAGE'\n | 'TABLE_RESERVATIONS_PAGE'\n | 'OTHER_APP_PAGE';\n\nexport interface GenerateTitleSuggestionsResponse {\n /** The generated title tag suggestions. */\n tagSuggestions?: TagSuggestions;\n}\n\nexport interface GenerateDescriptionSuggestionsRequest {\n /**\n * Kind of page the description is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * What the page is about, for example, the product name for a product\n * page, or the article subject for a blog post.\n * @maxLength 1000\n * @minLength 1\n */\n topic: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it. Optional hint.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n /**\n * Tone of voice for the generated text, for example, `friendly` or\n * `professional`. Optional hint.\n * @maxLength 1000\n */\n toneOfVoice?: string;\n /**\n * Type of business the site is for. Optional hint.\n * @maxLength 1000\n */\n businessType?: string;\n /**\n * Location of the business, for location-aware phrasing. Optional hint.\n * @maxLength 1000\n */\n businessLocation?: string;\n /**\n * Text content of the page, to ground the description in what the page\n * actually says. Send page content only. Don't include personal data.\n * Optional hint.\n * @maxLength 100000\n */\n pageContent?: string | null;\n}\n\nexport interface GenerateDescriptionSuggestionsResponse {\n /** The generated description tag suggestions. */\n tagSuggestions?: TagSuggestions;\n}\n\nexport interface GenerateAltTextSuggestionsRequest {\n /** The image to generate alt text for. */\n image: ImageReference;\n /**\n * Type of the Wix item the image belongs to. For example, `STATIC_PAGE_V2`\n * for a regular site page, `STORES_PRODUCT` for a store product, or\n * `BLOG_POST` for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/** An image of a Wix-managed item, identified for alt text generation. */\nexport interface ImageReference {\n /**\n * Your reference ID for the image. Echoed back in the result so you can\n * match suggestions to images. Wix doesn't interpret it.\n * @maxLength 1000\n */\n _id?: string;\n /**\n * URL of the image file. Must be Wix-hosted media, meaning a URL on a Wix media\n * domain such as `static.wixstatic.com`. Other hosts are rejected.\n * @format WEB_URL\n * @maxLength 1000\n */\n url?: string;\n /**\n * ID of the Wix item the image belongs to, for example, a page ID or a\n * store product ID, matching the request's `itemType`.\n * @maxLength 100\n */\n parentItemId?: string;\n}\n\nexport interface GenerateAltTextSuggestionsResponse {\n /** The generated alt text suggestions. */\n altTextSuggestions?: AltTextSuggestions;\n}\n\n/** Alt texts generated for one image. */\nexport interface AltTextSuggestions {\n /**\n * Your reference ID for the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n imageId?: string;\n /**\n * URL of the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n url?: string;\n /**\n * Suggested alt texts, best match first.\n * @readonly\n * @maxSize 5\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface BulkGenerateAltTextSuggestionsRequest {\n /**\n * The images to generate alt text for.\n * @maxSize 20\n */\n images: ImageReference[];\n /**\n * Type of the Wix item the images belong to. All images in one call must\n * belong to items of the same type. For example, `STATIC_PAGE_V2` for a\n * regular site page, `STORES_PRODUCT` for a store product, or `BLOG_POST`\n * for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\nexport interface BulkGenerateAltTextSuggestionsResponse {\n /**\n * A result per requested image, in request order.\n * @readonly\n * @maxSize 20\n */\n results?: BulkAltTextResult[];\n /**\n * Number of images that got suggestions.\n * @readonly\n */\n successCount?: number;\n /**\n * Number of images that failed. Failed images can be retried\n * individually with Generate Alt Text Suggestions.\n * @readonly\n */\n failureCount?: number;\n}\n\n/** The bulk-generation result for one image. */\nexport interface BulkAltTextResult {\n /**\n * Your reference ID for the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n imageId?: string;\n /**\n * Whether alt text was generated for this image.\n * @readonly\n */\n success?: boolean;\n /**\n * Suggested alt texts, best match first. Empty when `success` is `false`.\n * @readonly\n * @maxSize 5\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface GenerateHeadingStructureSuggestionsRequest {\n /**\n * The page's heading elements, in the order they appear on the page.\n * @maxSize 200\n */\n headings: HeadingNode[];\n /**\n * Your reference ID for the page the headings belong to. For Wix pages,\n * the page ID. The page title is then read from the page to give the AI\n * context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item. For example, `STATIC_PAGE_V2` for a regular\n * site page or `BLOG_POST` for a blog post.\n * @maxLength 200\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * One heading element of the page, as the caller knows it.\n *\n * The identifying fields (`id`, `uiElementId`, `attributeId`) are the\n * caller's own references. Wix echoes them back on the matching suggestion\n * and doesn't interpret them. `sectionId` is different: it guides the AI's\n * grouping of headings and isn't echoed back.\n *\n * `id` is required, and the combination of `id`, `uiElementId`, and\n * `attributeId` must be unique within a request, since that combination is what\n * matches a suggestion back to its heading, so two headings sharing one would\n * both be given the same suggestion.\n */\nexport interface HeadingNode {\n /**\n * Your reference ID for the heading element. Required, and must be unique\n * within the request together with `uiElementId` and `attributeId` if you\n * send them.\n * @maxLength 1000\n * @minLength 1\n */\n _id?: string;\n /**\n * Additional reference ID for the heading's text attribute, if you use\n * one. Echoed back unchanged.\n * @maxLength 1000\n */\n attributeId?: string;\n /**\n * Raw HTML of the heading element, including its tag, for example,\n * `<h2>Our services</h2>`. Send page content only. Don't include\n * personal data.\n * @maxLength 100000\n * @minLength 1\n */\n htmlString?: string;\n /**\n * Additional reference ID for the heading element, if you use one. Echoed\n * back unchanged.\n * @maxLength 1000\n */\n uiElementId?: string;\n /**\n * Your reference ID for the page section the heading belongs to. Helps\n * the AI keep one heading hierarchy per section.\n * @maxLength 1000\n */\n sectionId?: string;\n}\n\nexport interface GenerateHeadingStructureSuggestionsResponse {\n /**\n * A suggestion per heading whose level should change. Headings that are\n * already correct aren't returned.\n * @readonly\n * @maxSize 200\n */\n suggestions?: HeadingSuggestion[];\n}\n\n/** A suggested heading-level change for one heading element. */\nexport interface HeadingSuggestion {\n /**\n * Your reference ID for the heading element, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n headingId?: string;\n /**\n * Your `uiElementId` reference, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n uiElementId?: string;\n /**\n * Your `attributeId` reference, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n attributeId?: string;\n /**\n * The heading's current tag. For example, `H2`.\n * @readonly\n * @maxLength 10\n */\n currentTag?: string;\n /**\n * The suggested tag. For example, `H3`, or `P` for text that shouldn't be\n * a heading.\n * @readonly\n * @maxLength 10\n */\n proposedTag?: string;\n}\n\n/** @docsIgnore */\nexport type GenerateTitleSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateDescriptionSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateAltTextSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkGenerateAltTextSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateHeadingStructureSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45 to 65\n * character range that displays fully in search results.\n * @public\n * @documentationMaturity preview\n * @requiredField options.pageName\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_title_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions\n */\nexport async function generateTitleSuggestions(\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pageType: options?.pageType,\n pageName: options?.pageName,\n primaryKeyword: options?.primaryKeyword,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateTitleSuggestions(\n payload\n );\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 pageType: '$[0].pageType',\n pageName: '$[0].pageName',\n primaryKeyword: '$[0].primaryKeyword',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateTitleSuggestionsOptions {\n /**\n * Kind of page the title is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n}\n\n/**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130 to 165 character range that displays fully in search results.\n *\n * The optional context fields (primary keyword, tone of voice, business\n * type, business location, and page content) are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n * @public\n * @documentationMaturity preview\n * @requiredField options.pageName\n * @requiredField options.topic\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_description_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions\n */\nexport async function generateDescriptionSuggestions(\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pageType: options?.pageType,\n pageName: options?.pageName,\n topic: options?.topic,\n primaryKeyword: options?.primaryKeyword,\n toneOfVoice: options?.toneOfVoice,\n businessType: options?.businessType,\n businessLocation: options?.businessLocation,\n pageContent: options?.pageContent,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateDescriptionSuggestions(\n payload\n );\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 pageType: '$[0].pageType',\n pageName: '$[0].pageName',\n topic: '$[0].topic',\n primaryKeyword: '$[0].primaryKeyword',\n toneOfVoice: '$[0].toneOfVoice',\n businessType: '$[0].businessType',\n businessLocation: '$[0].businessLocation',\n pageContent: '$[0].pageContent',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateDescriptionSuggestionsOptions {\n /**\n * Kind of page the description is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * What the page is about, for example, the product name for a product\n * page, or the article subject for a blog post.\n * @maxLength 1000\n * @minLength 1\n */\n topic: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it. Optional hint.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n /**\n * Tone of voice for the generated text, for example, `friendly` or\n * `professional`. Optional hint.\n * @maxLength 1000\n */\n toneOfVoice?: string;\n /**\n * Type of business the site is for. Optional hint.\n * @maxLength 1000\n */\n businessType?: string;\n /**\n * Location of the business, for location-aware phrasing. Optional hint.\n * @maxLength 1000\n */\n businessLocation?: string;\n /**\n * Text content of the page, to ground the description in what the page\n * actually says. Send page content only. Don't include personal data.\n * Optional hint.\n * @maxLength 100000\n */\n pageContent?: string | null;\n}\n\n/**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item, such as a site page or a\n * store product, identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n * @param image - The image to generate alt text for.\n * @public\n * @documentationMaturity preview\n * @requiredField image\n * @requiredField options\n * @requiredField options.itemType\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_alt_text_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions\n */\nexport async function generateAltTextSuggestions(\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;\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 image: image,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateAltTextSuggestions(\n payload\n );\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: { image: '$[0]', itemType: '$[1].itemType' },\n singleArgumentUnchanged: false,\n },\n ['image', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateAltTextSuggestionsOptions {\n /**\n * Type of the Wix item the image belongs to. For example, `STATIC_PAGE_V2`\n * for a regular site page, `STORES_PRODUCT` for a store product, or\n * `BLOG_POST` for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n * @param images - The images to generate alt text for.\n * @public\n * @documentationMaturity preview\n * @requiredField images\n * @requiredField options\n * @requiredField options.itemType\n * @permissionId seo:suggestions:v1:tag_suggestions:bulk_generate_alt_text_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions\n */\nexport async function bulkGenerateAltTextSuggestions(\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 4\n > & {\n __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;\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 images: images,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.bulkGenerateAltTextSuggestions(\n payload\n );\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: { images: '$[0]', itemType: '$[1].itemType' },\n singleArgumentUnchanged: false,\n },\n ['images', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkGenerateAltTextSuggestionsOptions {\n /**\n * Type of the Wix item the images belong to. All images in one call must\n * belong to items of the same type. For example, `STATIC_PAGE_V2` for a\n * regular site page, `STORES_PRODUCT` for a store product, or `BLOG_POST`\n * for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy (one H1,\n * no skipped levels, headings that match their content) and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n * @param headings - The page's heading elements, in the order they appear on the page.\n * @public\n * @documentationMaturity preview\n * @requiredField headings\n * @requiredField options\n * @requiredField options.itemType\n * @requiredField options.pageId\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_heading_structure_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions\n */\nexport async function generateHeadingStructureSuggestions(\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n GenerateHeadingStructureSuggestionsResponse,\n | `suggestions`\n | `suggestions.${number}.headingId`\n | `suggestions.${number}.uiElementId`\n | `suggestions.${number}.attributeId`\n | `suggestions.${number}.currentTag`\n | `suggestions.${number}.proposedTag`,\n 4\n > & {\n __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;\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 headings: headings,\n pageId: options?.pageId,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateHeadingStructureSuggestions(\n payload\n );\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 headings: '$[0]',\n pageId: '$[1].pageId',\n itemType: '$[1].itemType',\n },\n singleArgumentUnchanged: false,\n },\n ['headings', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateHeadingStructureSuggestionsOptions {\n /**\n * Your reference ID for the page the headings belong to. For Wix pages,\n * the page ID. The page title is then read from the page to give the AI\n * context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item. For example, `STATIC_PAGE_V2` for a regular\n * site page or `BLOG_POST` for a blog post.\n * @maxLength 200\n * @minLength 1\n */\n itemType: string;\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/seo-suggestions/v1',\n destPath: '/v1',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_tag-suggestions';\n\n/**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45 to 65\n * character range that displays fully in search results.\n */\nexport function generateTitleSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateTitleSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/title',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateTitleSuggestions;\n}\n\n/**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130 to 165 character range that displays fully in search results.\n *\n * The optional context fields (primary keyword, tone of voice, business\n * type, business location, and page content) are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n */\nexport function generateDescriptionSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateDescriptionSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/description',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateDescriptionSuggestions;\n}\n\n/**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item, such as a site page or a\n * store product, identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n */\nexport function generateAltTextSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateAltTextSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/alt-text',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateAltTextSuggestions;\n}\n\n/**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n */\nexport function bulkGenerateAltTextSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGenerateAltTextSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/alt-text-bulk',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkGenerateAltTextSuggestions;\n}\n\n/**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy (one H1,\n * no skipped levels, headings that match their content) and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n */\nexport function generateHeadingStructureSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateHeadingStructureSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/heading-structure',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateHeadingStructureSuggestions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkGenerateAltTextSuggestionsApplicationErrors,\n BulkGenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsResponse,\n GenerateAltTextSuggestionsApplicationErrors,\n GenerateAltTextSuggestionsOptions,\n GenerateAltTextSuggestionsResponse,\n GenerateDescriptionSuggestionsApplicationErrors,\n GenerateDescriptionSuggestionsOptions,\n GenerateDescriptionSuggestionsResponse,\n GenerateHeadingStructureSuggestionsApplicationErrors,\n GenerateHeadingStructureSuggestionsOptions,\n GenerateHeadingStructureSuggestionsResponse,\n GenerateTitleSuggestionsApplicationErrors,\n GenerateTitleSuggestionsOptions,\n GenerateTitleSuggestionsResponse,\n HeadingNode,\n ImageReference,\n bulkGenerateAltTextSuggestions as universalBulkGenerateAltTextSuggestions,\n generateAltTextSuggestions as universalGenerateAltTextSuggestions,\n generateDescriptionSuggestions as universalGenerateDescriptionSuggestions,\n generateHeadingStructureSuggestions as universalGenerateHeadingStructureSuggestions,\n generateTitleSuggestions as universalGenerateTitleSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function generateTitleSuggestions(\n httpClient: HttpClient\n): GenerateTitleSuggestionsSignature {\n return (\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n ) =>\n universalGenerateTitleSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateTitleSuggestionsSignature {\n /**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45 to 65\n * character range that displays fully in search results.\n */\n (\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n ): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateDescriptionSuggestions(\n httpClient: HttpClient\n): GenerateDescriptionSuggestionsSignature {\n return (\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n ) =>\n universalGenerateDescriptionSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateDescriptionSuggestionsSignature {\n /**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130 to 165 character range that displays fully in search results.\n *\n * The optional context fields (primary keyword, tone of voice, business\n * type, business location, and page content) are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n */\n (\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateAltTextSuggestions(\n httpClient: HttpClient\n): GenerateAltTextSuggestionsSignature {\n return (\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n ) =>\n universalGenerateAltTextSuggestions(\n image,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateAltTextSuggestionsSignature {\n /**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item, such as a site page or a\n * store product, identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n * @param - The image to generate alt text for.\n */\n (\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n ): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function bulkGenerateAltTextSuggestions(\n httpClient: HttpClient\n): BulkGenerateAltTextSuggestionsSignature {\n return (\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n ) =>\n universalBulkGenerateAltTextSuggestions(\n images,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGenerateAltTextSuggestionsSignature {\n /**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n * @param - The images to generate alt text for.\n */\n (\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 4\n > & {\n __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateHeadingStructureSuggestions(\n httpClient: HttpClient\n): GenerateHeadingStructureSuggestionsSignature {\n return (\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n ) =>\n universalGenerateHeadingStructureSuggestions(\n headings,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateHeadingStructureSuggestionsSignature {\n /**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy (one H1,\n * no skipped levels, headings that match their content) and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n * @param - The page's heading elements, in the order they appear on the page.\n */\n (\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n GenerateHeadingStructureSuggestionsResponse,\n | `suggestions`\n | `suggestions.${number}.headingId`\n | `suggestions.${number}.uiElementId`\n | `suggestions.${number}.attributeId`\n | `suggestions.${number}.currentTag`\n | `suggestions.${number}.proposedTag`,\n 4\n > & {\n __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport {\n AltTextSuggestions,\n BulkAltTextResult,\n BulkGenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsRequest,\n BulkGenerateAltTextSuggestionsResponse,\n GenerateAltTextSuggestionsOptions,\n GenerateAltTextSuggestionsRequest,\n GenerateAltTextSuggestionsResponse,\n GenerateDescriptionSuggestionsOptions,\n GenerateDescriptionSuggestionsRequest,\n GenerateDescriptionSuggestionsResponse,\n GenerateHeadingStructureSuggestionsOptions,\n GenerateHeadingStructureSuggestionsRequest,\n GenerateHeadingStructureSuggestionsResponse,\n GenerateTitleSuggestionsOptions,\n GenerateTitleSuggestionsRequest,\n GenerateTitleSuggestionsResponse,\n HeadingNode,\n HeadingSuggestion,\n ImageReference,\n PageType,\n TagSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n","import {\n generateTitleSuggestions as publicGenerateTitleSuggestions,\n generateDescriptionSuggestions as publicGenerateDescriptionSuggestions,\n generateAltTextSuggestions as publicGenerateAltTextSuggestions,\n bulkGenerateAltTextSuggestions as publicBulkGenerateAltTextSuggestions,\n generateHeadingStructureSuggestions as publicGenerateHeadingStructureSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const generateTitleSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateTitleSuggestions> &\n typeof publicGenerateTitleSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateTitleSuggestions);\nexport const generateDescriptionSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateDescriptionSuggestions> &\n typeof publicGenerateDescriptionSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateDescriptionSuggestions);\nexport const generateAltTextSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateAltTextSuggestions> &\n typeof publicGenerateAltTextSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateAltTextSuggestions);\nexport const bulkGenerateAltTextSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicBulkGenerateAltTextSuggestions> &\n typeof publicBulkGenerateAltTextSuggestions\n> = /*#__PURE__*/ createRESTModule(publicBulkGenerateAltTextSuggestions);\nexport const generateHeadingStructureSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateHeadingStructureSuggestions> &\n typeof publicGenerateHeadingStructureSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateHeadingStructureSuggestions);\n\nexport { PageType } from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\nexport {\n TagSuggestions,\n GenerateTitleSuggestionsRequest,\n GenerateTitleSuggestionsResponse,\n GenerateDescriptionSuggestionsRequest,\n GenerateDescriptionSuggestionsResponse,\n GenerateAltTextSuggestionsRequest,\n ImageReference,\n GenerateAltTextSuggestionsResponse,\n AltTextSuggestions,\n BulkGenerateAltTextSuggestionsRequest,\n BulkGenerateAltTextSuggestionsResponse,\n BulkAltTextResult,\n GenerateHeadingStructureSuggestionsRequest,\n HeadingNode,\n GenerateHeadingStructureSuggestionsResponse,\n HeadingSuggestion,\n GenerateTitleSuggestionsOptions,\n GenerateDescriptionSuggestionsOptions,\n GenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsOptions,\n GenerateHeadingStructureSuggestionsOptions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\nexport {\n PageTypeWithLiterals,\n GenerateTitleSuggestionsApplicationErrors,\n GenerateDescriptionSuggestionsApplicationErrors,\n GenerateAltTextSuggestionsApplicationErrors,\n BulkGenerateAltTextSuggestionsApplicationErrors,\n GenerateHeadingStructureSuggestionsApplicationErrors,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,wCAAAA;AAAA,EAAA,kCAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,2CAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,oDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,E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4BACd,YACqC;AACrC,SAAO,CACL,OACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,gCACd,YACyC;AACzC,SAAO,CACL,QACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmCO,SAASC,qCACd,YAC8C;AAC9C,SAAO,CACL,UACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtNA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,8BAGK,2DAAiBA,2BAAgC;AAC5D,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,uCAGK,2DAAiBA,oCAAyC;","names":["bulkGenerateAltTextSuggestions","generateAltTextSuggestions","generateDescriptionSuggestions","generateHeadingStructureSuggestions","generateTitleSuggestions","PageType","generateTitleSuggestions","sdkTransformError","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions","generateTitleSuggestions","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions","import_rest_modules","generateTitleSuggestions","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions"]}
|
|
@@ -3,7 +3,7 @@ import { NonNullablePaths } from '@wix/sdk-types';
|
|
|
3
3
|
/**
|
|
4
4
|
* SEO tag texts generated for a page.
|
|
5
5
|
*
|
|
6
|
-
* A computed projection
|
|
6
|
+
* A computed projection: the suggestions are generated per call and aren't
|
|
7
7
|
* stored, so there is no ID to retrieve them by later.
|
|
8
8
|
*/
|
|
9
9
|
interface TagSuggestions {
|
|
@@ -94,7 +94,7 @@ interface GenerateDescriptionSuggestionsRequest {
|
|
|
94
94
|
*/
|
|
95
95
|
pageName: string;
|
|
96
96
|
/**
|
|
97
|
-
* What the page is about
|
|
97
|
+
* What the page is about, for example, the product name for a product
|
|
98
98
|
* page, or the article subject for a blog post.
|
|
99
99
|
* @maxLength 1000
|
|
100
100
|
* @minLength 1
|
|
@@ -107,7 +107,7 @@ interface GenerateDescriptionSuggestionsRequest {
|
|
|
107
107
|
*/
|
|
108
108
|
primaryKeyword?: string;
|
|
109
109
|
/**
|
|
110
|
-
* Tone of voice for the generated text
|
|
110
|
+
* Tone of voice for the generated text, for example, `friendly` or
|
|
111
111
|
* `professional`. Optional hint.
|
|
112
112
|
* @maxLength 1000
|
|
113
113
|
*/
|
|
@@ -124,7 +124,7 @@ interface GenerateDescriptionSuggestionsRequest {
|
|
|
124
124
|
businessLocation?: string;
|
|
125
125
|
/**
|
|
126
126
|
* Text content of the page, to ground the description in what the page
|
|
127
|
-
* actually says. Send page content only
|
|
127
|
+
* actually says. Send page content only. Don't include personal data.
|
|
128
128
|
* Optional hint.
|
|
129
129
|
* @maxLength 100000
|
|
130
130
|
*/
|
|
@@ -150,19 +150,19 @@ interface GenerateAltTextSuggestionsRequest {
|
|
|
150
150
|
interface ImageReference {
|
|
151
151
|
/**
|
|
152
152
|
* Your reference ID for the image. Echoed back in the result so you can
|
|
153
|
-
* match suggestions to images
|
|
153
|
+
* match suggestions to images. Wix doesn't interpret it.
|
|
154
154
|
* @maxLength 1000
|
|
155
155
|
*/
|
|
156
156
|
_id?: string;
|
|
157
157
|
/**
|
|
158
|
-
* URL of the image file. Must be Wix-hosted media
|
|
158
|
+
* URL of the image file. Must be Wix-hosted media, meaning a URL on a Wix media
|
|
159
159
|
* domain such as `static.wixstatic.com`. Other hosts are rejected.
|
|
160
160
|
* @format WEB_URL
|
|
161
161
|
* @maxLength 1000
|
|
162
162
|
*/
|
|
163
163
|
url?: string;
|
|
164
164
|
/**
|
|
165
|
-
* ID of the Wix item the image belongs to
|
|
165
|
+
* ID of the Wix item the image belongs to, for example, a page ID or a
|
|
166
166
|
* store product ID, matching the request's `itemType`.
|
|
167
167
|
* @maxLength 100
|
|
168
168
|
*/
|
|
@@ -258,7 +258,7 @@ interface GenerateHeadingStructureSuggestionsRequest {
|
|
|
258
258
|
headings: HeadingNode[];
|
|
259
259
|
/**
|
|
260
260
|
* Your reference ID for the page the headings belong to. For Wix pages,
|
|
261
|
-
* the page ID
|
|
261
|
+
* the page ID. The page title is then read from the page to give the AI
|
|
262
262
|
* context.
|
|
263
263
|
* @maxLength 200
|
|
264
264
|
* @minLength 1
|
|
@@ -275,13 +275,13 @@ interface GenerateHeadingStructureSuggestionsRequest {
|
|
|
275
275
|
/**
|
|
276
276
|
* One heading element of the page, as the caller knows it.
|
|
277
277
|
*
|
|
278
|
-
* The identifying fields
|
|
278
|
+
* The identifying fields (`id`, `uiElementId`, `attributeId`) are the
|
|
279
279
|
* caller's own references. Wix echoes them back on the matching suggestion
|
|
280
280
|
* and doesn't interpret them. `sectionId` is different: it guides the AI's
|
|
281
281
|
* grouping of headings and isn't echoed back.
|
|
282
282
|
*
|
|
283
283
|
* `id` is required, and the combination of `id`, `uiElementId`, and
|
|
284
|
-
* `attributeId` must be unique within a request
|
|
284
|
+
* `attributeId` must be unique within a request, since that combination is what
|
|
285
285
|
* matches a suggestion back to its heading, so two headings sharing one would
|
|
286
286
|
* both be given the same suggestion.
|
|
287
287
|
*/
|
|
@@ -301,8 +301,8 @@ interface HeadingNode {
|
|
|
301
301
|
*/
|
|
302
302
|
attributeId?: string;
|
|
303
303
|
/**
|
|
304
|
-
* Raw HTML of the heading element, including its tag
|
|
305
|
-
* `<h2>Our services</h2>`. Send page content only
|
|
304
|
+
* Raw HTML of the heading element, including its tag, for example,
|
|
305
|
+
* `<h2>Our services</h2>`. Send page content only. Don't include
|
|
306
306
|
* personal data.
|
|
307
307
|
* @maxLength 100000
|
|
308
308
|
* @minLength 1
|
|
@@ -418,7 +418,7 @@ type GenerateHeadingStructureSuggestionsApplicationErrors = {
|
|
|
418
418
|
* Generates SEO title tag suggestions for a page.
|
|
419
419
|
*
|
|
420
420
|
* Returns up to 10 ready-to-use title texts for the page, based on the page
|
|
421
|
-
* name, page type, and primary keyword. Suggestions aim for the 45
|
|
421
|
+
* name, page type, and primary keyword. Suggestions aim for the 45 to 65
|
|
422
422
|
* character range that displays fully in search results.
|
|
423
423
|
* @public
|
|
424
424
|
* @documentationMaturity preview
|
|
@@ -455,10 +455,10 @@ interface GenerateTitleSuggestionsOptions {
|
|
|
455
455
|
*
|
|
456
456
|
* Returns up to 10 ready-to-use meta description texts, based on the page
|
|
457
457
|
* name, topic, page type, and the optional context fields. Suggestions aim
|
|
458
|
-
* for the 130
|
|
458
|
+
* for the 130 to 165 character range that displays fully in search results.
|
|
459
459
|
*
|
|
460
|
-
* The optional context fields
|
|
461
|
-
* type, business location, and page content
|
|
460
|
+
* The optional context fields (primary keyword, tone of voice, business
|
|
461
|
+
* type, business location, and page content) are hints that may influence
|
|
462
462
|
* the generated text; they aren't guaranteed to appear in it.
|
|
463
463
|
* @public
|
|
464
464
|
* @documentationMaturity preview
|
|
@@ -485,7 +485,7 @@ interface GenerateDescriptionSuggestionsOptions {
|
|
|
485
485
|
*/
|
|
486
486
|
pageName: string;
|
|
487
487
|
/**
|
|
488
|
-
* What the page is about
|
|
488
|
+
* What the page is about, for example, the product name for a product
|
|
489
489
|
* page, or the article subject for a blog post.
|
|
490
490
|
* @maxLength 1000
|
|
491
491
|
* @minLength 1
|
|
@@ -498,7 +498,7 @@ interface GenerateDescriptionSuggestionsOptions {
|
|
|
498
498
|
*/
|
|
499
499
|
primaryKeyword?: string;
|
|
500
500
|
/**
|
|
501
|
-
* Tone of voice for the generated text
|
|
501
|
+
* Tone of voice for the generated text, for example, `friendly` or
|
|
502
502
|
* `professional`. Optional hint.
|
|
503
503
|
* @maxLength 1000
|
|
504
504
|
*/
|
|
@@ -515,7 +515,7 @@ interface GenerateDescriptionSuggestionsOptions {
|
|
|
515
515
|
businessLocation?: string;
|
|
516
516
|
/**
|
|
517
517
|
* Text content of the page, to ground the description in what the page
|
|
518
|
-
* actually says. Send page content only
|
|
518
|
+
* actually says. Send page content only. Don't include personal data.
|
|
519
519
|
* Optional hint.
|
|
520
520
|
* @maxLength 100000
|
|
521
521
|
*/
|
|
@@ -524,8 +524,8 @@ interface GenerateDescriptionSuggestionsOptions {
|
|
|
524
524
|
/**
|
|
525
525
|
* Generates alt text suggestions for a single image of a Wix-managed item.
|
|
526
526
|
*
|
|
527
|
-
* The image must belong to a Wix-managed item
|
|
528
|
-
*
|
|
527
|
+
* The image must belong to a Wix-managed item, such as a site page or a
|
|
528
|
+
* store product, identified by `image.parentItemId` and
|
|
529
529
|
* `itemType`. Wix reads that item's stored SEO data to give the AI context
|
|
530
530
|
* about what the image is for. This method can't generate alt text for an
|
|
531
531
|
* arbitrary image URL with no owning item.
|
|
@@ -590,8 +590,8 @@ interface BulkGenerateAltTextSuggestionsOptions {
|
|
|
590
590
|
* Suggests corrected heading levels for a page's headings.
|
|
591
591
|
*
|
|
592
592
|
* Pass the page's headings in document order, each with its raw HTML and
|
|
593
|
-
* your own reference IDs. The AI checks the heading hierarchy
|
|
594
|
-
* no skipped levels, headings that match their content
|
|
593
|
+
* your own reference IDs. The AI checks the heading hierarchy (one H1,
|
|
594
|
+
* no skipped levels, headings that match their content) and returns a
|
|
595
595
|
* suggested tag per heading that should change, echoing your reference IDs
|
|
596
596
|
* back so you can locate each element.
|
|
597
597
|
*
|
|
@@ -614,7 +614,7 @@ declare function generateHeadingStructureSuggestions(headings: HeadingNode[], op
|
|
|
614
614
|
interface GenerateHeadingStructureSuggestionsOptions {
|
|
615
615
|
/**
|
|
616
616
|
* Your reference ID for the page the headings belong to. For Wix pages,
|
|
617
|
-
* the page ID
|
|
617
|
+
* the page ID. The page title is then read from the page to give the AI
|
|
618
618
|
* context.
|
|
619
619
|
* @maxLength 200
|
|
620
620
|
* @minLength 1
|