@wix/auto_sdk_seo_tag-suggestions 1.0.4 → 1.0.6

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.
@@ -11,7 +11,7 @@ interface GenerateTitleSuggestionsSignature {
11
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
- (options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
14
+ (options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 0>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
15
15
  __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;
16
16
  }>;
17
17
  }
@@ -28,20 +28,20 @@ interface GenerateDescriptionSuggestionsSignature {
28
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
- (options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 2>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
31
+ (options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 0>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
32
32
  __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;
33
33
  }>;
34
34
  }
35
35
  declare function generateAltTextSuggestions$1(httpClient: HttpClient): GenerateAltTextSuggestionsSignature;
36
36
  interface GenerateAltTextSuggestionsSignature {
37
37
  /**
38
- * Generates alt text suggestions for a single image of a Wix-managed item.
38
+ * Generates alt text suggestions for a single Wix-hosted image.
39
39
  *
40
- * The image must be Wix-hosted media and belong to a Wix-managed item, such
41
- * as a site page or a store product, identified by `image.parentItemId` and
42
- * `itemType`. That item's stored SEO data gives the AI context about what
43
- * the image is for. This method can't generate alt text for an arbitrary
44
- * image URL with no owning item.
40
+ * The image must be Wix-hosted media. Set `itemType` to the kind of Wix
41
+ * item the image belongs to, such as a site page or a store product.
42
+ * Passing the item's ID as `image.parentItemId` is optional but
43
+ * recommended: that item's stored SEO data gives the AI context about what
44
+ * the image is for. Without it, alt text is generated from the image alone.
45
45
  *
46
46
  * Returns up to 5 ready-to-use alt texts in the site's language.
47
47
  *
@@ -49,7 +49,7 @@ interface GenerateAltTextSuggestionsSignature {
49
49
  * [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).
50
50
  * @param - The image to generate alt text for.
51
51
  */
52
- (image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>): Promise<NonNullablePaths<GenerateAltTextSuggestionsResponse, `altTextSuggestions.imageId` | `altTextSuggestions.url` | `altTextSuggestions.suggestions`, 3> & {
52
+ (image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<GenerateAltTextSuggestionsResponse, `altTextSuggestions.imageId` | `altTextSuggestions.url` | `altTextSuggestions.suggestions`, 1> & {
53
53
  __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;
54
54
  }>;
55
55
  }
@@ -58,8 +58,9 @@ interface BulkGenerateAltTextSuggestionsSignature {
58
58
  /**
59
59
  * Generates alt text suggestions for up to 20 images in one call.
60
60
  *
61
- * Every image must be Wix-hosted media and belong to a Wix-managed item of
62
- * the same type. Images are processed independently: the response reports
61
+ * Every image must be Wix-hosted media. `itemType` applies to all images in
62
+ * the call, and `parentItemId` is optional per image. Images are processed
63
+ * independently: the response reports
63
64
  * per-image success, and the call succeeds as long as at least 1 image
64
65
  * succeeded. A call where every image failed returns a `GENERATION_FAILED`
65
66
  * error. An image URL that isn't Wix-hosted rejects the whole request.
@@ -68,7 +69,7 @@ interface BulkGenerateAltTextSuggestionsSignature {
68
69
  * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).
69
70
  * @param - The images to generate alt text for.
70
71
  */
71
- (images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`, 2>): Promise<NonNullablePaths<BulkGenerateAltTextSuggestionsResponse, `results` | `results.${number}.imageId` | `results.${number}.success` | `successCount` | `failureCount`, 4> & {
72
+ (images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<BulkGenerateAltTextSuggestionsResponse, `results` | `results.${number}.imageId` | `results.${number}.success` | `successCount` | `failureCount`, 2> & {
72
73
  __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;
73
74
  }>;
74
75
  }
@@ -85,14 +86,9 @@ interface GenerateHeadingStructureSuggestionsSignature {
85
86
  *
86
87
  * The heading nodes are the request's content, so this method works for any
87
88
  * page, including headless projects.
88
- *
89
- * This method must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities), for example an app acting on
90
- * behalf of a signed-in site owner. Calls made with an API key fail,
91
- * because the page's title is read through the site's accessibility
92
- * analysis, which runs as the user.
93
89
  * @param - The page's heading elements, in the order they appear on the page.
94
90
  */
95
- (headings: HeadingNode[], options: NonNullablePaths<GenerateHeadingStructureSuggestionsOptions, `itemType` | `pageId`, 2>): Promise<NonNullablePaths<GenerateHeadingStructureSuggestionsResponse, `suggestions` | `suggestions.${number}.headingId` | `suggestions.${number}.uiElementId` | `suggestions.${number}.attributeId` | `suggestions.${number}.currentTag` | `suggestions.${number}.proposedTag`, 4> & {
91
+ (headings: HeadingNode[], options: NonNullablePaths<GenerateHeadingStructureSuggestionsOptions, `itemType` | `pageId`, 0>): Promise<NonNullablePaths<GenerateHeadingStructureSuggestionsResponse, `suggestions` | `suggestions.${number}.headingId` | `suggestions.${number}.uiElementId` | `suggestions.${number}.attributeId` | `suggestions.${number}.currentTag` | `suggestions.${number}.proposedTag`, 2> & {
96
92
  __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;
97
93
  }>;
98
94
  }
@@ -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 * Suggestions are generated for each call and aren't stored, so there's no ID\n * to retrieve them by later. Calling the same method twice may return\n * different suggestions.\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. */\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, as an SEO item type\n * identifier. For example, `STATIC_PAGE_V2` for a regular site page,\n * `STORES_PRODUCT` for a store product, or `BLOG_POST` for a blog post.\n * Other values are rejected.\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. It isn't interpreted.\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, as an SEO item type\n * identifier. All images in one call must belong to items of the same type.\n * For example, `STATIC_PAGE_V2` for a regular site page, `STORES_PRODUCT`\n * for a store product, or `BLOG_POST` for a blog post. Other values are\n * rejected.\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\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/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, which lets the page's title be read to give the AI context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item, as an SEO item type identifier. For example,\n * `STATIC_PAGE_V2` for a regular site page or `BLOG_POST` for a blog post.\n * Other values are rejected.\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 your own\n * references. They're echoed back on the matching suggestion and aren't\n * interpreted. `sectionId` is different: it guides the AI's grouping of\n * 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>`. Elements that aren't headings are ignored for\n * the structure check. Send page content only. Don't include personal\n * 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 be Wix-hosted media and belong to a Wix-managed item, such\n * as a site page or a store product, identified by `image.parentItemId` and\n * `itemType`. That item's stored SEO data gives the AI context about what\n * the image is for. This method can't generate alt text for an arbitrary\n * image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n *\n * To generate alt text for up to 20 images in a single call, call\n * [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).\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, as an SEO item type\n * identifier. For example, `STATIC_PAGE_V2` for a regular site page,\n * `STORES_PRODUCT` for a store product, or `BLOG_POST` for a blog post.\n * Other values are rejected.\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 * Every image must be Wix-hosted media and belong to a Wix-managed item of\n * the same type. Images are processed independently: the response reports\n * per-image success, and the call succeeds as long as at least 1 image\n * succeeded. A call where every image failed returns a `GENERATION_FAILED`\n * error. An image URL that isn't Wix-hosted rejects the whole request.\n *\n * To generate alt text for a single image, call\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).\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, as an SEO item type\n * identifier. All images in one call must belong to items of the same type.\n * For example, `STATIC_PAGE_V2` for a regular site page, `STORES_PRODUCT`\n * for a store product, or `BLOG_POST` for a blog post. Other values are\n * rejected.\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 *\n * This method must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities), for example an app acting on\n * behalf of a signed-in site owner. Calls made with an API key fail,\n * because the page's title is read through the site's accessibility\n * analysis, which runs as the user.\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, which lets the page's title be read to give the AI context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item, as an SEO item type identifier. For example,\n * `STATIC_PAGE_V2` for a regular site page or `BLOG_POST` for a blog post.\n * Other values are rejected.\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 _: [\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 be Wix-hosted media and belong to a Wix-managed item, such\n * as a site page or a store product, identified by `image.parentItemId` and\n * `itemType`. That item's stored SEO data gives the AI context about what\n * the image is for. This method can't generate alt text for an arbitrary\n * image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n *\n * To generate alt text for up to 20 images in a single call, call\n * [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).\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 * Every image must be Wix-hosted media and belong to a Wix-managed item of\n * the same type. Images are processed independently: the response reports\n * per-image success, and the call succeeds as long as at least 1 image\n * succeeded. A call where every image failed returns a `GENERATION_FAILED`\n * error. An image URL that isn't Wix-hosted rejects the whole request.\n *\n * To generate alt text for a single image, call\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).\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 *\n * This method must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities), for example an app acting on\n * behalf of a signed-in site owner. Calls made with an API key fail,\n * because the page's title is read through the site's accessibility\n * analysis, which runs as the user.\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 be Wix-hosted media and belong to a Wix-managed item, such\n * as a site page or a store product, identified by `image.parentItemId` and\n * `itemType`. That item's stored SEO data gives the AI context about what\n * the image is for. This method can't generate alt text for an arbitrary\n * image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n *\n * To generate alt text for up to 20 images in a single call, call\n * [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).\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 * Every image must be Wix-hosted media and belong to a Wix-managed item of\n * the same type. Images are processed independently: the response reports\n * per-image success, and the call succeeds as long as at least 1 image\n * succeeded. A call where every image failed returns a `GENERATION_FAILED`\n * error. An image URL that isn't Wix-hosted rejects the whole request.\n *\n * To generate alt text for a single image, call\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).\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 *\n * This method must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities), for example an app acting on\n * behalf of a signed-in site owner. Calls made with an API key fail,\n * because the page's title is read through the site's accessibility\n * analysis, which runs as the user.\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;AAA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,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 * Suggestions are generated for each call and aren't stored, so there's no ID\n * to retrieve them by later. Calling the same method twice may return\n * different suggestions.\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. */\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, as an SEO item type\n * identifier. For example, `STATIC_PAGE_V2` for a regular site page,\n * `STORES_PRODUCT` for a store product, or `BLOG_POST` for a blog post.\n * Other values are rejected.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/** A Wix-hosted image to generate alt text for. */\nexport interface ImageReference {\n /**\n * Your reference ID for the image. Echoed back in the result so you can\n * match suggestions to images. It isn't interpreted.\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`. Optional but\n * recommended: when passed, the item's stored SEO data gives the AI\n * context about the image. Without it, alt text is generated from the\n * image alone.\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, as an SEO item type\n * identifier. All images in one call must belong to items of the same type.\n * For example, `STATIC_PAGE_V2` for a regular site page, `STORES_PRODUCT`\n * for a store product, or `BLOG_POST` for a blog post. Other values are\n * rejected.\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\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/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, which lets the page's title be read to give the AI context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item, as an SEO item type identifier. For example,\n * `STATIC_PAGE_V2` for a regular site page or `BLOG_POST` for a blog post.\n * Other values are rejected.\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 your own\n * references. They're echoed back on the matching suggestion and aren't\n * interpreted. `sectionId` is different: it guides the AI's grouping of\n * 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>`. Elements that aren't headings are ignored for\n * the structure check. Send page content only. Don't include personal\n * 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`, 0>\n): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 1\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 0\n >\n): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 1\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 Wix-hosted image.\n *\n * The image must be Wix-hosted media. Set `itemType` to the kind of Wix\n * item the image belongs to, such as a site page or a store product.\n * Passing the item's ID as `image.parentItemId` is optional but\n * recommended: that item's stored SEO data gives the AI context about what\n * the image is for. Without it, alt text is generated from the image alone.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n *\n * To generate alt text for up to 20 images in a single call, call\n * [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).\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`, 0>\n): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 1\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, as an SEO item type\n * identifier. For example, `STATIC_PAGE_V2` for a regular site page,\n * `STORES_PRODUCT` for a store product, or `BLOG_POST` for a blog post.\n * Other values are rejected.\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 * Every image must be Wix-hosted media. `itemType` applies to all images in\n * the call, and `parentItemId` is optional per image. Images are processed\n * independently: the response reports\n * per-image success, and the call succeeds as long as at least 1 image\n * succeeded. A call where every image failed returns a `GENERATION_FAILED`\n * error. An image URL that isn't Wix-hosted rejects the whole request.\n *\n * To generate alt text for a single image, call\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).\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 0\n >\n): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 2\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, as an SEO item type\n * identifier. All images in one call must belong to items of the same type.\n * For example, `STATIC_PAGE_V2` for a regular site page, `STORES_PRODUCT`\n * for a store product, or `BLOG_POST` for a blog post. Other values are\n * rejected.\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 0\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 2\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, which lets the page's title be read to give the AI context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item, as an SEO item type identifier. For example,\n * `STATIC_PAGE_V2` for a regular site page or `BLOG_POST` for a blog post.\n * Other values are rejected.\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 _: [\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 Wix-hosted image.\n *\n * The image must be Wix-hosted media. Set `itemType` to the kind of Wix\n * item the image belongs to, such as a site page or a store product.\n * Passing the item's ID as `image.parentItemId` is optional but\n * recommended: that item's stored SEO data gives the AI context about what\n * the image is for. Without it, alt text is generated from the image alone.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n *\n * To generate alt text for up to 20 images in a single call, call\n * [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).\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 * Every image must be Wix-hosted media. `itemType` applies to all images in\n * the call, and `parentItemId` is optional per image. Images are processed\n * independently: the response reports\n * per-image success, and the call succeeds as long as at least 1 image\n * succeeded. A call where every image failed returns a `GENERATION_FAILED`\n * error. An image URL that isn't Wix-hosted rejects the whole request.\n *\n * To generate alt text for a single image, call\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).\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`, 0>\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`, 0>\n ): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 1\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 0\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 0\n >\n ): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 1\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`, 0>\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 Wix-hosted image.\n *\n * The image must be Wix-hosted media. Set `itemType` to the kind of Wix\n * item the image belongs to, such as a site page or a store product.\n * Passing the item's ID as `image.parentItemId` is optional but\n * recommended: that item's stored SEO data gives the AI context about what\n * the image is for. Without it, alt text is generated from the image alone.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n *\n * To generate alt text for up to 20 images in a single call, call\n * [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).\n * @param - The image to generate alt text for.\n */\n (\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 0>\n ): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 1\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 0\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 * Every image must be Wix-hosted media. `itemType` applies to all images in\n * the call, and `parentItemId` is optional per image. Images are processed\n * independently: the response reports\n * per-image success, and the call succeeds as long as at least 1 image\n * succeeded. A call where every image failed returns a `GENERATION_FAILED`\n * error. An image URL that isn't Wix-hosted rejects the whole request.\n *\n * To generate alt text for a single image, call\n * [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).\n * @param - The images to generate alt text for.\n */\n (\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 0\n >\n ): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 2\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 0\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 0\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 2\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;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,+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"]}
@@ -149,7 +149,7 @@ interface GenerateAltTextSuggestionsRequest {
149
149
  */
150
150
  itemType: string;
151
151
  }
152
- /** An image of a Wix-managed item, identified for alt text generation. */
152
+ /** A Wix-hosted image to generate alt text for. */
153
153
  interface ImageReference {
154
154
  /**
155
155
  * Your reference ID for the image. Echoed back in the result so you can
@@ -166,7 +166,10 @@ interface ImageReference {
166
166
  url?: string;
167
167
  /**
168
168
  * ID of the Wix item the image belongs to, for example, a page ID or a
169
- * store product ID, matching the request's `itemType`.
169
+ * store product ID, matching the request's `itemType`. Optional but
170
+ * recommended: when passed, the item's stored SEO data gives the AI
171
+ * context about the image. Without it, alt text is generated from the
172
+ * image alone.
170
173
  * @maxLength 100
171
174
  */
172
175
  parentItemId?: string;
@@ -433,7 +436,7 @@ type GenerateHeadingStructureSuggestionsApplicationErrors = {
433
436
  * @applicableIdentity APP
434
437
  * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions
435
438
  */
436
- declare function generateTitleSuggestions(options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
439
+ declare function generateTitleSuggestions(options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 0>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
437
440
  __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;
438
441
  }>;
439
442
  interface GenerateTitleSuggestionsOptions {
@@ -474,7 +477,7 @@ interface GenerateTitleSuggestionsOptions {
474
477
  * @applicableIdentity APP
475
478
  * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions
476
479
  */
477
- declare function generateDescriptionSuggestions(options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 2>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
480
+ declare function generateDescriptionSuggestions(options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 0>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
478
481
  __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;
479
482
  }>;
480
483
  interface GenerateDescriptionSuggestionsOptions {
@@ -528,13 +531,13 @@ interface GenerateDescriptionSuggestionsOptions {
528
531
  pageContent?: string | null;
529
532
  }
530
533
  /**
531
- * Generates alt text suggestions for a single image of a Wix-managed item.
534
+ * Generates alt text suggestions for a single Wix-hosted image.
532
535
  *
533
- * The image must be Wix-hosted media and belong to a Wix-managed item, such
534
- * as a site page or a store product, identified by `image.parentItemId` and
535
- * `itemType`. That item's stored SEO data gives the AI context about what
536
- * the image is for. This method can't generate alt text for an arbitrary
537
- * image URL with no owning item.
536
+ * The image must be Wix-hosted media. Set `itemType` to the kind of Wix
537
+ * item the image belongs to, such as a site page or a store product.
538
+ * Passing the item's ID as `image.parentItemId` is optional but
539
+ * recommended: that item's stored SEO data gives the AI context about what
540
+ * the image is for. Without it, alt text is generated from the image alone.
538
541
  *
539
542
  * Returns up to 5 ready-to-use alt texts in the site's language.
540
543
  *
@@ -550,7 +553,7 @@ interface GenerateDescriptionSuggestionsOptions {
550
553
  * @applicableIdentity APP
551
554
  * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions
552
555
  */
553
- declare function generateAltTextSuggestions(image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>): Promise<NonNullablePaths<GenerateAltTextSuggestionsResponse, `altTextSuggestions.imageId` | `altTextSuggestions.url` | `altTextSuggestions.suggestions`, 3> & {
556
+ declare function generateAltTextSuggestions(image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<GenerateAltTextSuggestionsResponse, `altTextSuggestions.imageId` | `altTextSuggestions.url` | `altTextSuggestions.suggestions`, 1> & {
554
557
  __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;
555
558
  }>;
556
559
  interface GenerateAltTextSuggestionsOptions {
@@ -567,8 +570,9 @@ interface GenerateAltTextSuggestionsOptions {
567
570
  /**
568
571
  * Generates alt text suggestions for up to 20 images in one call.
569
572
  *
570
- * Every image must be Wix-hosted media and belong to a Wix-managed item of
571
- * the same type. Images are processed independently: the response reports
573
+ * Every image must be Wix-hosted media. `itemType` applies to all images in
574
+ * the call, and `parentItemId` is optional per image. Images are processed
575
+ * independently: the response reports
572
576
  * per-image success, and the call succeeds as long as at least 1 image
573
577
  * succeeded. A call where every image failed returns a `GENERATION_FAILED`
574
578
  * error. An image URL that isn't Wix-hosted rejects the whole request.
@@ -585,7 +589,7 @@ interface GenerateAltTextSuggestionsOptions {
585
589
  * @applicableIdentity APP
586
590
  * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions
587
591
  */
588
- declare function bulkGenerateAltTextSuggestions(images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`, 2>): Promise<NonNullablePaths<BulkGenerateAltTextSuggestionsResponse, `results` | `results.${number}.imageId` | `results.${number}.success` | `successCount` | `failureCount`, 4> & {
592
+ declare function bulkGenerateAltTextSuggestions(images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<BulkGenerateAltTextSuggestionsResponse, `results` | `results.${number}.imageId` | `results.${number}.success` | `successCount` | `failureCount`, 2> & {
589
593
  __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;
590
594
  }>;
591
595
  interface BulkGenerateAltTextSuggestionsOptions {
@@ -611,11 +615,6 @@ interface BulkGenerateAltTextSuggestionsOptions {
611
615
  *
612
616
  * The heading nodes are the request's content, so this method works for any
613
617
  * page, including headless projects.
614
- *
615
- * This method must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities), for example an app acting on
616
- * behalf of a signed-in site owner. Calls made with an API key fail,
617
- * because the page's title is read through the site's accessibility
618
- * analysis, which runs as the user.
619
618
  * @param headings - The page's heading elements, in the order they appear on the page.
620
619
  * @public
621
620
  * @documentationMaturity preview
@@ -627,7 +626,7 @@ interface BulkGenerateAltTextSuggestionsOptions {
627
626
  * @applicableIdentity APP
628
627
  * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions
629
628
  */
630
- declare function generateHeadingStructureSuggestions(headings: HeadingNode[], options: NonNullablePaths<GenerateHeadingStructureSuggestionsOptions, `itemType` | `pageId`, 2>): Promise<NonNullablePaths<GenerateHeadingStructureSuggestionsResponse, `suggestions` | `suggestions.${number}.headingId` | `suggestions.${number}.uiElementId` | `suggestions.${number}.attributeId` | `suggestions.${number}.currentTag` | `suggestions.${number}.proposedTag`, 4> & {
629
+ declare function generateHeadingStructureSuggestions(headings: HeadingNode[], options: NonNullablePaths<GenerateHeadingStructureSuggestionsOptions, `itemType` | `pageId`, 0>): Promise<NonNullablePaths<GenerateHeadingStructureSuggestionsResponse, `suggestions` | `suggestions.${number}.headingId` | `suggestions.${number}.uiElementId` | `suggestions.${number}.attributeId` | `suggestions.${number}.currentTag` | `suggestions.${number}.proposedTag`, 2> & {
631
630
  __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;
632
631
  }>;
633
632
  interface GenerateHeadingStructureSuggestionsOptions {