@wix/auto_sdk_seo_tag-suggestions 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +21 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +61 -47
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +27 -21
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +21 -15
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +61 -47
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +27 -21
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +21 -15
- package/build/internal/cjs/index.typings.d.ts +61 -47
- package/build/internal/cjs/meta.d.ts +27 -21
- package/build/internal/es/index.d.mts +21 -15
- package/build/internal/es/index.typings.d.mts +61 -47
- package/build/internal/es/meta.d.mts +27 -21
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -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`,
|
|
14
|
+
(options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 0>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
|
|
15
15
|
__applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;
|
|
16
16
|
}>;
|
|
17
17
|
}
|
|
@@ -28,7 +28,7 @@ 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`,
|
|
31
|
+
(options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 0>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
|
|
32
32
|
__applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;
|
|
33
33
|
}>;
|
|
34
34
|
}
|
|
@@ -37,16 +37,19 @@ interface GenerateAltTextSuggestionsSignature {
|
|
|
37
37
|
/**
|
|
38
38
|
* Generates alt text suggestions for a single image of a Wix-managed item.
|
|
39
39
|
*
|
|
40
|
-
* The image must belong to a Wix-managed item, such
|
|
41
|
-
* store product, identified by `image.parentItemId` and
|
|
42
|
-
* `itemType`.
|
|
43
|
-
*
|
|
44
|
-
*
|
|
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.
|
|
45
45
|
*
|
|
46
46
|
* Returns up to 5 ready-to-use alt texts in the site's language.
|
|
47
|
+
*
|
|
48
|
+
* To generate alt text for up to 20 images in a single call, call
|
|
49
|
+
* [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).
|
|
47
50
|
* @param - The image to generate alt text for.
|
|
48
51
|
*/
|
|
49
|
-
(image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`,
|
|
52
|
+
(image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<GenerateAltTextSuggestionsResponse, `altTextSuggestions.imageId` | `altTextSuggestions.url` | `altTextSuggestions.suggestions`, 1> & {
|
|
50
53
|
__applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;
|
|
51
54
|
}>;
|
|
52
55
|
}
|
|
@@ -55,14 +58,17 @@ interface BulkGenerateAltTextSuggestionsSignature {
|
|
|
55
58
|
/**
|
|
56
59
|
* Generates alt text suggestions for up to 20 images in one call.
|
|
57
60
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
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
|
|
63
|
+
* per-image success, and the call succeeds as long as at least 1 image
|
|
64
|
+
* succeeded. A call where every image failed returns a `GENERATION_FAILED`
|
|
65
|
+
* error. An image URL that isn't Wix-hosted rejects the whole request.
|
|
66
|
+
*
|
|
67
|
+
* To generate alt text for a single image, call
|
|
68
|
+
* [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).
|
|
63
69
|
* @param - The images to generate alt text for.
|
|
64
70
|
*/
|
|
65
|
-
(images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`,
|
|
71
|
+
(images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<BulkGenerateAltTextSuggestionsResponse, `results` | `results.${number}.imageId` | `results.${number}.success` | `successCount` | `failureCount`, 2> & {
|
|
66
72
|
__applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;
|
|
67
73
|
}>;
|
|
68
74
|
}
|
|
@@ -81,7 +87,7 @@ interface GenerateHeadingStructureSuggestionsSignature {
|
|
|
81
87
|
* page, including headless projects.
|
|
82
88
|
* @param - The page's heading elements, in the order they appear on the page.
|
|
83
89
|
*/
|
|
84
|
-
(headings: HeadingNode[], options: NonNullablePaths<GenerateHeadingStructureSuggestionsOptions, `itemType` | `pageId`,
|
|
90
|
+
(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> & {
|
|
85
91
|
__applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;
|
|
86
92
|
}>;
|
|
87
93
|
}
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.http.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.public.ts","../../src/seo-suggestions-v1-tag-suggestions-tag-suggestions.context.ts"],"sourcesContent":["export * from './src/seo-suggestions-v1-tag-suggestions-tag-suggestions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSeoSuggestionsV1TagSuggestions from './seo-suggestions-v1-tag-suggestions-tag-suggestions.http.js';\n\n/**\n * SEO tag texts generated for a page.\n *\n * A computed projection: the suggestions are generated per call and aren't\n * stored, so there is no ID to retrieve them by later.\n */\nexport interface TagSuggestions {\n /**\n * Suggested tag texts, best match first.\n * @readonly\n * @maxSize 10\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface GenerateTitleSuggestionsRequest {\n /**\n * Kind of page the title is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n}\n\n/**\n * Kind of page the suggestion is for. Helps the AI phrase the suggestion for\n * the page's purpose.\n */\nexport enum PageType {\n UNKNOWN_PAGE_TYPE = 'UNKNOWN_PAGE_TYPE',\n /** A general site page. This is the default when no page type is passed. */\n WEBSITE_PAGE = 'WEBSITE_PAGE',\n /** The site's homepage. */\n HOMEPAGE = 'HOMEPAGE',\n /** A blog post. */\n BLOG_POST = 'BLOG_POST',\n /** A blog category page. */\n BLOG_CATEGORY_PAGE = 'BLOG_CATEGORY_PAGE',\n /** A blog tags page. */\n BLOG_TAGS_PAGE = 'BLOG_TAGS_PAGE',\n /** A store product details page. */\n PRODUCT_PAGE = 'PRODUCT_PAGE',\n /** A store product category or collection page. */\n PRODUCT_CATEGORY_PAGE = 'PRODUCT_CATEGORY_PAGE',\n /** A service booking page. */\n SERVICE_BOOKING_PAGE = 'SERVICE_BOOKING_PAGE',\n /** An event details page. */\n EVENT_PAGE = 'EVENT_PAGE',\n /** A restaurant menu page. */\n RESTAURANT_MENU_PAGE = 'RESTAURANT_MENU_PAGE',\n /** A restaurant menu item page. */\n RESTAURANT_MENU_ITEM_PAGE = 'RESTAURANT_MENU_ITEM_PAGE',\n /** An online program page. */\n ONLINE_PROGRAM_PAGE = 'ONLINE_PROGRAM_PAGE',\n /** A portfolio collection page. */\n PORTFOLIO_COLLECTION_PAGE = 'PORTFOLIO_COLLECTION_PAGE',\n /** A portfolio project page. */\n PORTFOLIO_PROJECT_PAGE = 'PORTFOLIO_PROJECT_PAGE',\n /** A table reservations page. */\n TABLE_RESERVATIONS_PAGE = 'TABLE_RESERVATIONS_PAGE',\n /** A page of another Wix app. */\n OTHER_APP_PAGE = 'OTHER_APP_PAGE',\n}\n\n/** @enumType */\nexport type PageTypeWithLiterals =\n | PageType\n | 'UNKNOWN_PAGE_TYPE'\n | 'WEBSITE_PAGE'\n | 'HOMEPAGE'\n | 'BLOG_POST'\n | 'BLOG_CATEGORY_PAGE'\n | 'BLOG_TAGS_PAGE'\n | 'PRODUCT_PAGE'\n | 'PRODUCT_CATEGORY_PAGE'\n | 'SERVICE_BOOKING_PAGE'\n | 'EVENT_PAGE'\n | 'RESTAURANT_MENU_PAGE'\n | 'RESTAURANT_MENU_ITEM_PAGE'\n | 'ONLINE_PROGRAM_PAGE'\n | 'PORTFOLIO_COLLECTION_PAGE'\n | 'PORTFOLIO_PROJECT_PAGE'\n | 'TABLE_RESERVATIONS_PAGE'\n | 'OTHER_APP_PAGE';\n\nexport interface GenerateTitleSuggestionsResponse {\n /** The generated title tag suggestions. */\n tagSuggestions?: TagSuggestions;\n}\n\nexport interface GenerateDescriptionSuggestionsRequest {\n /**\n * Kind of page the description is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * What the page is about, for example, the product name for a product\n * page, or the article subject for a blog post.\n * @maxLength 1000\n * @minLength 1\n */\n topic: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it. Optional hint.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n /**\n * Tone of voice for the generated text, for example, `friendly` or\n * `professional`. Optional hint.\n * @maxLength 1000\n */\n toneOfVoice?: string;\n /**\n * Type of business the site is for. Optional hint.\n * @maxLength 1000\n */\n businessType?: string;\n /**\n * Location of the business, for location-aware phrasing. Optional hint.\n * @maxLength 1000\n */\n businessLocation?: string;\n /**\n * Text content of the page, to ground the description in what the page\n * actually says. Send page content only. Don't include personal data.\n * Optional hint.\n * @maxLength 100000\n */\n pageContent?: string | null;\n}\n\nexport interface GenerateDescriptionSuggestionsResponse {\n /** The generated description tag suggestions. */\n tagSuggestions?: TagSuggestions;\n}\n\nexport interface GenerateAltTextSuggestionsRequest {\n /** The image to generate alt text for. */\n image: ImageReference;\n /**\n * Type of the Wix item the image belongs to. For example, `STATIC_PAGE_V2`\n * for a regular site page, `STORES_PRODUCT` for a store product, or\n * `BLOG_POST` for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/** An image of a Wix-managed item, identified for alt text generation. */\nexport interface ImageReference {\n /**\n * Your reference ID for the image. Echoed back in the result so you can\n * match suggestions to images. Wix doesn't interpret it.\n * @maxLength 1000\n */\n _id?: string;\n /**\n * URL of the image file. Must be Wix-hosted media, meaning a URL on a Wix media\n * domain such as `static.wixstatic.com`. Other hosts are rejected.\n * @format WEB_URL\n * @maxLength 1000\n */\n url?: string;\n /**\n * ID of the Wix item the image belongs to, for example, a page ID or a\n * store product ID, matching the request's `itemType`.\n * @maxLength 100\n */\n parentItemId?: string;\n}\n\nexport interface GenerateAltTextSuggestionsResponse {\n /** The generated alt text suggestions. */\n altTextSuggestions?: AltTextSuggestions;\n}\n\n/** Alt texts generated for one image. */\nexport interface AltTextSuggestions {\n /**\n * Your reference ID for the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n imageId?: string;\n /**\n * URL of the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n url?: string;\n /**\n * Suggested alt texts, best match first.\n * @readonly\n * @maxSize 5\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface BulkGenerateAltTextSuggestionsRequest {\n /**\n * The images to generate alt text for.\n * @maxSize 20\n */\n images: ImageReference[];\n /**\n * Type of the Wix item the images belong to. All images in one call must\n * belong to items of the same type. For example, `STATIC_PAGE_V2` for a\n * regular site page, `STORES_PRODUCT` for a store product, or `BLOG_POST`\n * for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\nexport interface BulkGenerateAltTextSuggestionsResponse {\n /**\n * A result per requested image, in request order.\n * @readonly\n * @maxSize 20\n */\n results?: BulkAltTextResult[];\n /**\n * Number of images that got suggestions.\n * @readonly\n */\n successCount?: number;\n /**\n * Number of images that failed. Failed images can be retried\n * individually with Generate Alt Text Suggestions.\n * @readonly\n */\n failureCount?: number;\n}\n\n/** The bulk-generation result for one image. */\nexport interface BulkAltTextResult {\n /**\n * Your reference ID for the image, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n imageId?: string;\n /**\n * Whether alt text was generated for this image.\n * @readonly\n */\n success?: boolean;\n /**\n * Suggested alt texts, best match first. Empty when `success` is `false`.\n * @readonly\n * @maxSize 5\n * @maxLength 1000\n */\n suggestions?: string[];\n}\n\nexport interface GenerateHeadingStructureSuggestionsRequest {\n /**\n * The page's heading elements, in the order they appear on the page.\n * @maxSize 200\n */\n headings: HeadingNode[];\n /**\n * Your reference ID for the page the headings belong to. For Wix pages,\n * the page ID. The page title is then read from the page to give the AI\n * context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item. For example, `STATIC_PAGE_V2` for a regular\n * site page or `BLOG_POST` for a blog post.\n * @maxLength 200\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * One heading element of the page, as the caller knows it.\n *\n * The identifying fields (`id`, `uiElementId`, `attributeId`) are the\n * caller's own references. Wix echoes them back on the matching suggestion\n * and doesn't interpret them. `sectionId` is different: it guides the AI's\n * grouping of headings and isn't echoed back.\n *\n * `id` is required, and the combination of `id`, `uiElementId`, and\n * `attributeId` must be unique within a request, since that combination is what\n * matches a suggestion back to its heading, so two headings sharing one would\n * both be given the same suggestion.\n */\nexport interface HeadingNode {\n /**\n * Your reference ID for the heading element. Required, and must be unique\n * within the request together with `uiElementId` and `attributeId` if you\n * send them.\n * @maxLength 1000\n * @minLength 1\n */\n _id?: string;\n /**\n * Additional reference ID for the heading's text attribute, if you use\n * one. Echoed back unchanged.\n * @maxLength 1000\n */\n attributeId?: string;\n /**\n * Raw HTML of the heading element, including its tag, for example,\n * `<h2>Our services</h2>`. Send page content only. Don't include\n * personal data.\n * @maxLength 100000\n * @minLength 1\n */\n htmlString?: string;\n /**\n * Additional reference ID for the heading element, if you use one. Echoed\n * back unchanged.\n * @maxLength 1000\n */\n uiElementId?: string;\n /**\n * Your reference ID for the page section the heading belongs to. Helps\n * the AI keep one heading hierarchy per section.\n * @maxLength 1000\n */\n sectionId?: string;\n}\n\nexport interface GenerateHeadingStructureSuggestionsResponse {\n /**\n * A suggestion per heading whose level should change. Headings that are\n * already correct aren't returned.\n * @readonly\n * @maxSize 200\n */\n suggestions?: HeadingSuggestion[];\n}\n\n/** A suggested heading-level change for one heading element. */\nexport interface HeadingSuggestion {\n /**\n * Your reference ID for the heading element, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n headingId?: string;\n /**\n * Your `uiElementId` reference, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n uiElementId?: string;\n /**\n * Your `attributeId` reference, echoed from the request.\n * @readonly\n * @maxLength 1000\n */\n attributeId?: string;\n /**\n * The heading's current tag. For example, `H2`.\n * @readonly\n * @maxLength 10\n */\n currentTag?: string;\n /**\n * The suggested tag. For example, `H3`, or `P` for text that shouldn't be\n * a heading.\n * @readonly\n * @maxLength 10\n */\n proposedTag?: string;\n}\n\n/** @docsIgnore */\nexport type GenerateTitleSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateDescriptionSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateAltTextSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkGenerateAltTextSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type GenerateHeadingStructureSuggestionsApplicationErrors =\n | {\n code?: 'GENERATION_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'QUOTA_LIMIT_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45 to 65\n * character range that displays fully in search results.\n * @public\n * @documentationMaturity preview\n * @requiredField options.pageName\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_title_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions\n */\nexport async function generateTitleSuggestions(\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pageType: options?.pageType,\n pageName: options?.pageName,\n primaryKeyword: options?.primaryKeyword,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateTitleSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pageType: '$[0].pageType',\n pageName: '$[0].pageName',\n primaryKeyword: '$[0].primaryKeyword',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateTitleSuggestionsOptions {\n /**\n * Kind of page the title is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n}\n\n/**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130 to 165 character range that displays fully in search results.\n *\n * The optional context fields (primary keyword, tone of voice, business\n * type, business location, and page content) are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n * @public\n * @documentationMaturity preview\n * @requiredField options.pageName\n * @requiredField options.topic\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_description_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions\n */\nexport async function generateDescriptionSuggestions(\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pageType: options?.pageType,\n pageName: options?.pageName,\n topic: options?.topic,\n primaryKeyword: options?.primaryKeyword,\n toneOfVoice: options?.toneOfVoice,\n businessType: options?.businessType,\n businessLocation: options?.businessLocation,\n pageContent: options?.pageContent,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateDescriptionSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pageType: '$[0].pageType',\n pageName: '$[0].pageName',\n topic: '$[0].topic',\n primaryKeyword: '$[0].primaryKeyword',\n toneOfVoice: '$[0].toneOfVoice',\n businessType: '$[0].businessType',\n businessLocation: '$[0].businessLocation',\n pageContent: '$[0].pageContent',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateDescriptionSuggestionsOptions {\n /**\n * Kind of page the description is for.\n *\n * Default: `WEBSITE_PAGE`.\n */\n pageType?: PageTypeWithLiterals;\n /**\n * Name of the page, as shown in the site's menu or page list.\n * @maxLength 1000\n * @minLength 1\n */\n pageName: string;\n /**\n * What the page is about, for example, the product name for a product\n * page, or the article subject for a blog post.\n * @maxLength 1000\n * @minLength 1\n */\n topic: string;\n /**\n * Primary keyword the page targets. When passed, suggestions try to\n * feature it. Optional hint.\n * @maxLength 1000\n */\n primaryKeyword?: string;\n /**\n * Tone of voice for the generated text, for example, `friendly` or\n * `professional`. Optional hint.\n * @maxLength 1000\n */\n toneOfVoice?: string;\n /**\n * Type of business the site is for. Optional hint.\n * @maxLength 1000\n */\n businessType?: string;\n /**\n * Location of the business, for location-aware phrasing. Optional hint.\n * @maxLength 1000\n */\n businessLocation?: string;\n /**\n * Text content of the page, to ground the description in what the page\n * actually says. Send page content only. Don't include personal data.\n * Optional hint.\n * @maxLength 100000\n */\n pageContent?: string | null;\n}\n\n/**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item, such as a site page or a\n * store product, identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n * @param image - The image to generate alt text for.\n * @public\n * @documentationMaturity preview\n * @requiredField image\n * @requiredField options\n * @requiredField options.itemType\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_alt_text_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions\n */\nexport async function generateAltTextSuggestions(\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n image: image,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateAltTextSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { image: '$[0]', itemType: '$[1].itemType' },\n singleArgumentUnchanged: false,\n },\n ['image', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateAltTextSuggestionsOptions {\n /**\n * Type of the Wix item the image belongs to. For example, `STATIC_PAGE_V2`\n * for a regular site page, `STORES_PRODUCT` for a store product, or\n * `BLOG_POST` for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n * @param images - The images to generate alt text for.\n * @public\n * @documentationMaturity preview\n * @requiredField images\n * @requiredField options\n * @requiredField options.itemType\n * @permissionId seo:suggestions:v1:tag_suggestions:bulk_generate_alt_text_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions\n */\nexport async function bulkGenerateAltTextSuggestions(\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 4\n > & {\n __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n images: images,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.bulkGenerateAltTextSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { images: '$[0]', itemType: '$[1].itemType' },\n singleArgumentUnchanged: false,\n },\n ['images', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkGenerateAltTextSuggestionsOptions {\n /**\n * Type of the Wix item the images belong to. All images in one call must\n * belong to items of the same type. For example, `STATIC_PAGE_V2` for a\n * regular site page, `STORES_PRODUCT` for a store product, or `BLOG_POST`\n * for a blog post.\n * @maxLength 100\n * @minLength 1\n */\n itemType: string;\n}\n\n/**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy (one H1,\n * no skipped levels, headings that match their content) and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n * @param headings - The page's heading elements, in the order they appear on the page.\n * @public\n * @documentationMaturity preview\n * @requiredField headings\n * @requiredField options\n * @requiredField options.itemType\n * @requiredField options.pageId\n * @permissionId seo:suggestions:v1:tag_suggestions:generate_heading_structure_suggestions\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions\n */\nexport async function generateHeadingStructureSuggestions(\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n GenerateHeadingStructureSuggestionsResponse,\n | `suggestions`\n | `suggestions.${number}.headingId`\n | `suggestions.${number}.uiElementId`\n | `suggestions.${number}.attributeId`\n | `suggestions.${number}.currentTag`\n | `suggestions.${number}.proposedTag`,\n 4\n > & {\n __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n headings: headings,\n pageId: options?.pageId,\n itemType: options?.itemType,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1TagSuggestions.generateHeadingStructureSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n headings: '$[0]',\n pageId: '$[1].pageId',\n itemType: '$[1].itemType',\n },\n singleArgumentUnchanged: false,\n },\n ['headings', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateHeadingStructureSuggestionsOptions {\n /**\n * Your reference ID for the page the headings belong to. For Wix pages,\n * the page ID. The page title is then read from the page to give the AI\n * context.\n * @maxLength 200\n * @minLength 1\n */\n pageId: string;\n /**\n * Type of the page's item. For example, `STATIC_PAGE_V2` for a regular\n * site page or `BLOG_POST` for a blog post.\n * @maxLength 200\n * @minLength 1\n */\n itemType: string;\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/seo/suggestions/v1',\n destPath: '/v1',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_tag-suggestions';\n\n/**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45 to 65\n * character range that displays fully in search results.\n */\nexport function generateTitleSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateTitleSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/title',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateTitleSuggestions;\n}\n\n/**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130 to 165 character range that displays fully in search results.\n *\n * The optional context fields (primary keyword, tone of voice, business\n * type, business location, and page content) are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n */\nexport function generateDescriptionSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateDescriptionSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/description',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateDescriptionSuggestions;\n}\n\n/**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item, such as a site page or a\n * store product, identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n */\nexport function generateAltTextSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateAltTextSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/alt-text',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateAltTextSuggestions;\n}\n\n/**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n */\nexport function bulkGenerateAltTextSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGenerateAltTextSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/alt-text-bulk',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkGenerateAltTextSuggestions;\n}\n\n/**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy (one H1,\n * no skipped levels, headings that match their content) and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n */\nexport function generateHeadingStructureSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateHeadingStructureSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.tag_suggestions',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({\n protoPath: '/v1/tag-suggestions/heading-structure',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateHeadingStructureSuggestions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkGenerateAltTextSuggestionsApplicationErrors,\n BulkGenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsResponse,\n GenerateAltTextSuggestionsApplicationErrors,\n GenerateAltTextSuggestionsOptions,\n GenerateAltTextSuggestionsResponse,\n GenerateDescriptionSuggestionsApplicationErrors,\n GenerateDescriptionSuggestionsOptions,\n GenerateDescriptionSuggestionsResponse,\n GenerateHeadingStructureSuggestionsApplicationErrors,\n GenerateHeadingStructureSuggestionsOptions,\n GenerateHeadingStructureSuggestionsResponse,\n GenerateTitleSuggestionsApplicationErrors,\n GenerateTitleSuggestionsOptions,\n GenerateTitleSuggestionsResponse,\n HeadingNode,\n ImageReference,\n bulkGenerateAltTextSuggestions as universalBulkGenerateAltTextSuggestions,\n generateAltTextSuggestions as universalGenerateAltTextSuggestions,\n generateDescriptionSuggestions as universalGenerateDescriptionSuggestions,\n generateHeadingStructureSuggestions as universalGenerateHeadingStructureSuggestions,\n generateTitleSuggestions as universalGenerateTitleSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function generateTitleSuggestions(\n httpClient: HttpClient\n): GenerateTitleSuggestionsSignature {\n return (\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n ) =>\n universalGenerateTitleSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateTitleSuggestionsSignature {\n /**\n * Generates SEO title tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use title texts for the page, based on the page\n * name, page type, and primary keyword. Suggestions aim for the 45 to 65\n * character range that displays fully in search results.\n */\n (\n options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>\n ): Promise<\n NonNullablePaths<\n GenerateTitleSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateDescriptionSuggestions(\n httpClient: HttpClient\n): GenerateDescriptionSuggestionsSignature {\n return (\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n ) =>\n universalGenerateDescriptionSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateDescriptionSuggestionsSignature {\n /**\n * Generates SEO description tag suggestions for a page.\n *\n * Returns up to 10 ready-to-use meta description texts, based on the page\n * name, topic, page type, and the optional context fields. Suggestions aim\n * for the 130 to 165 character range that displays fully in search results.\n *\n * The optional context fields (primary keyword, tone of voice, business\n * type, business location, and page content) are hints that may influence\n * the generated text; they aren't guaranteed to appear in it.\n */\n (\n options?: NonNullablePaths<\n GenerateDescriptionSuggestionsOptions,\n `pageName` | `topic`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n GenerateDescriptionSuggestionsResponse,\n `tagSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateAltTextSuggestions(\n httpClient: HttpClient\n): GenerateAltTextSuggestionsSignature {\n return (\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n ) =>\n universalGenerateAltTextSuggestions(\n image,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateAltTextSuggestionsSignature {\n /**\n * Generates alt text suggestions for a single image of a Wix-managed item.\n *\n * The image must belong to a Wix-managed item, such as a site page or a\n * store product, identified by `image.parentItemId` and\n * `itemType`. Wix reads that item's stored SEO data to give the AI context\n * about what the image is for. This method can't generate alt text for an\n * arbitrary image URL with no owning item.\n *\n * Returns up to 5 ready-to-use alt texts in the site's language.\n * @param - The image to generate alt text for.\n */\n (\n image: ImageReference,\n options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>\n ): Promise<\n NonNullablePaths<\n GenerateAltTextSuggestionsResponse,\n | `altTextSuggestions.imageId`\n | `altTextSuggestions.url`\n | `altTextSuggestions.suggestions`,\n 3\n > & {\n __applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function bulkGenerateAltTextSuggestions(\n httpClient: HttpClient\n): BulkGenerateAltTextSuggestionsSignature {\n return (\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n ) =>\n universalBulkGenerateAltTextSuggestions(\n images,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGenerateAltTextSuggestionsSignature {\n /**\n * Generates alt text suggestions for up to 20 images in one call.\n *\n * Like Generate Alt Text Suggestions, every image must belong to a\n * Wix-managed item. Images are processed independently: the response\n * reports per-image success, and the call succeeds as long as at least one\n * image succeeded. A call where every image failed returns a\n * `GENERATION_FAILED` error.\n * @param - The images to generate alt text for.\n */\n (\n images: ImageReference[],\n options: NonNullablePaths<\n BulkGenerateAltTextSuggestionsOptions,\n `itemType`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n BulkGenerateAltTextSuggestionsResponse,\n | `results`\n | `results.${number}.imageId`\n | `results.${number}.success`\n | `successCount`\n | `failureCount`,\n 4\n > & {\n __applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport function generateHeadingStructureSuggestions(\n httpClient: HttpClient\n): GenerateHeadingStructureSuggestionsSignature {\n return (\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n ) =>\n universalGenerateHeadingStructureSuggestions(\n headings,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateHeadingStructureSuggestionsSignature {\n /**\n * Suggests corrected heading levels for a page's headings.\n *\n * Pass the page's headings in document order, each with its raw HTML and\n * your own reference IDs. The AI checks the heading hierarchy (one H1,\n * no skipped levels, headings that match their content) and returns a\n * suggested tag per heading that should change, echoing your reference IDs\n * back so you can locate each element.\n *\n * The heading nodes are the request's content, so this method works for any\n * page, including headless projects.\n * @param - The page's heading elements, in the order they appear on the page.\n */\n (\n headings: HeadingNode[],\n options: NonNullablePaths<\n GenerateHeadingStructureSuggestionsOptions,\n `itemType` | `pageId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n GenerateHeadingStructureSuggestionsResponse,\n | `suggestions`\n | `suggestions.${number}.headingId`\n | `suggestions.${number}.uiElementId`\n | `suggestions.${number}.attributeId`\n | `suggestions.${number}.currentTag`\n | `suggestions.${number}.proposedTag`,\n 4\n > & {\n __applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;\n }\n >;\n}\n\nexport {\n AltTextSuggestions,\n BulkAltTextResult,\n BulkGenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsRequest,\n BulkGenerateAltTextSuggestionsResponse,\n GenerateAltTextSuggestionsOptions,\n GenerateAltTextSuggestionsRequest,\n GenerateAltTextSuggestionsResponse,\n GenerateDescriptionSuggestionsOptions,\n GenerateDescriptionSuggestionsRequest,\n GenerateDescriptionSuggestionsResponse,\n GenerateHeadingStructureSuggestionsOptions,\n GenerateHeadingStructureSuggestionsRequest,\n GenerateHeadingStructureSuggestionsResponse,\n GenerateTitleSuggestionsOptions,\n GenerateTitleSuggestionsRequest,\n GenerateTitleSuggestionsResponse,\n HeadingNode,\n HeadingSuggestion,\n ImageReference,\n PageType,\n TagSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n","import {\n generateTitleSuggestions as publicGenerateTitleSuggestions,\n generateDescriptionSuggestions as publicGenerateDescriptionSuggestions,\n generateAltTextSuggestions as publicGenerateAltTextSuggestions,\n bulkGenerateAltTextSuggestions as publicBulkGenerateAltTextSuggestions,\n generateHeadingStructureSuggestions as publicGenerateHeadingStructureSuggestions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const generateTitleSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateTitleSuggestions> &\n typeof publicGenerateTitleSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateTitleSuggestions);\nexport const generateDescriptionSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateDescriptionSuggestions> &\n typeof publicGenerateDescriptionSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateDescriptionSuggestions);\nexport const generateAltTextSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateAltTextSuggestions> &\n typeof publicGenerateAltTextSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateAltTextSuggestions);\nexport const bulkGenerateAltTextSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicBulkGenerateAltTextSuggestions> &\n typeof publicBulkGenerateAltTextSuggestions\n> = /*#__PURE__*/ createRESTModule(publicBulkGenerateAltTextSuggestions);\nexport const generateHeadingStructureSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateHeadingStructureSuggestions> &\n typeof publicGenerateHeadingStructureSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateHeadingStructureSuggestions);\n\nexport { PageType } from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\nexport {\n TagSuggestions,\n GenerateTitleSuggestionsRequest,\n GenerateTitleSuggestionsResponse,\n GenerateDescriptionSuggestionsRequest,\n GenerateDescriptionSuggestionsResponse,\n GenerateAltTextSuggestionsRequest,\n ImageReference,\n GenerateAltTextSuggestionsResponse,\n AltTextSuggestions,\n BulkGenerateAltTextSuggestionsRequest,\n BulkGenerateAltTextSuggestionsResponse,\n BulkAltTextResult,\n GenerateHeadingStructureSuggestionsRequest,\n HeadingNode,\n GenerateHeadingStructureSuggestionsResponse,\n HeadingSuggestion,\n GenerateTitleSuggestionsOptions,\n GenerateDescriptionSuggestionsOptions,\n GenerateAltTextSuggestionsOptions,\n BulkGenerateAltTextSuggestionsOptions,\n GenerateHeadingStructureSuggestionsOptions,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\nexport {\n PageTypeWithLiterals,\n GenerateTitleSuggestionsApplicationErrors,\n GenerateDescriptionSuggestionsApplicationErrors,\n GenerateAltTextSuggestionsApplicationErrors,\n BulkGenerateAltTextSuggestionsApplicationErrors,\n GenerateHeadingStructureSuggestionsApplicationErrors,\n} from './seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,wCAAAA;AAAA,EAAA,kCAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,2CAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,oDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AA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extSuggestions","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/** 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`, 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 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`, 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 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 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 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 */\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 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`, 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 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 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;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QAC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J;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,YAAY,SAAS;AAAA,IACxB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEv6BO,SAASK,0BACd,YACmC;AACnC,SAAO,CACL,YAEAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,gCACd,YACyC;AACzC,SAAO,CACL,YAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,4BACd,YACqC;AACrC,SAAO,CACL,OACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAkCO,SAASC,gCACd,YACyC;AACzC,SAAO,CACL,QACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAsCO,SAASC,qCACd,YAC8C;AAC9C,SAAO,CACL,UACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC5NA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,8BAGK,2DAAiBA,2BAAgC;AAC5D,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,uCAGK,2DAAiBA,oCAAyC;","names":["bulkGenerateAltTextSuggestions","generateAltTextSuggestions","generateDescriptionSuggestions","generateHeadingStructureSuggestions","generateTitleSuggestions","PageType","generateTitleSuggestions","sdkTransformError","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions","generateTitleSuggestions","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions","import_rest_modules","generateTitleSuggestions","generateDescriptionSuggestions","generateAltTextSuggestions","bulkGenerateAltTextSuggestions","generateHeadingStructureSuggestions"]}
|
|
@@ -3,8 +3,9 @@ import { NonNullablePaths } from '@wix/sdk-types';
|
|
|
3
3
|
/**
|
|
4
4
|
* SEO tag texts generated for a page.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Suggestions are generated for each call and aren't stored, so there's no ID
|
|
7
|
+
* to retrieve them by later. Calling the same method twice may return
|
|
8
|
+
* different suggestions.
|
|
8
9
|
*/
|
|
9
10
|
interface TagSuggestions {
|
|
10
11
|
/**
|
|
@@ -40,6 +41,7 @@ interface GenerateTitleSuggestionsRequest {
|
|
|
40
41
|
* the page's purpose.
|
|
41
42
|
*/
|
|
42
43
|
declare enum PageType {
|
|
44
|
+
/** Unknown page type. */
|
|
43
45
|
UNKNOWN_PAGE_TYPE = "UNKNOWN_PAGE_TYPE",
|
|
44
46
|
/** A general site page. This is the default when no page type is passed. */
|
|
45
47
|
WEBSITE_PAGE = "WEBSITE_PAGE",
|
|
@@ -138,9 +140,10 @@ interface GenerateAltTextSuggestionsRequest {
|
|
|
138
140
|
/** The image to generate alt text for. */
|
|
139
141
|
image: ImageReference;
|
|
140
142
|
/**
|
|
141
|
-
* Type of the Wix item the image belongs to
|
|
142
|
-
*
|
|
143
|
-
* `BLOG_POST` for a blog post.
|
|
143
|
+
* Type of the Wix item the image belongs to, as an SEO item type
|
|
144
|
+
* identifier. For example, `STATIC_PAGE_V2` for a regular site page,
|
|
145
|
+
* `STORES_PRODUCT` for a store product, or `BLOG_POST` for a blog post.
|
|
146
|
+
* Other values are rejected.
|
|
144
147
|
* @maxLength 100
|
|
145
148
|
* @minLength 1
|
|
146
149
|
*/
|
|
@@ -150,7 +153,7 @@ interface GenerateAltTextSuggestionsRequest {
|
|
|
150
153
|
interface ImageReference {
|
|
151
154
|
/**
|
|
152
155
|
* Your reference ID for the image. Echoed back in the result so you can
|
|
153
|
-
* match suggestions to images.
|
|
156
|
+
* match suggestions to images. It isn't interpreted.
|
|
154
157
|
* @maxLength 1000
|
|
155
158
|
*/
|
|
156
159
|
_id?: string;
|
|
@@ -201,10 +204,11 @@ interface BulkGenerateAltTextSuggestionsRequest {
|
|
|
201
204
|
*/
|
|
202
205
|
images: ImageReference[];
|
|
203
206
|
/**
|
|
204
|
-
* Type of the Wix item the images belong to
|
|
205
|
-
* belong to items of the same type.
|
|
206
|
-
*
|
|
207
|
-
* for a blog post.
|
|
207
|
+
* Type of the Wix item the images belong to, as an SEO item type
|
|
208
|
+
* identifier. All images in one call must belong to items of the same type.
|
|
209
|
+
* For example, `STATIC_PAGE_V2` for a regular site page, `STORES_PRODUCT`
|
|
210
|
+
* for a store product, or `BLOG_POST` for a blog post. Other values are
|
|
211
|
+
* rejected.
|
|
208
212
|
* @maxLength 100
|
|
209
213
|
* @minLength 1
|
|
210
214
|
*/
|
|
@@ -224,7 +228,8 @@ interface BulkGenerateAltTextSuggestionsResponse {
|
|
|
224
228
|
successCount?: number;
|
|
225
229
|
/**
|
|
226
230
|
* Number of images that failed. Failed images can be retried
|
|
227
|
-
* individually with
|
|
231
|
+
* individually with
|
|
232
|
+
* [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).
|
|
228
233
|
* @readonly
|
|
229
234
|
*/
|
|
230
235
|
failureCount?: number;
|
|
@@ -258,15 +263,15 @@ interface GenerateHeadingStructureSuggestionsRequest {
|
|
|
258
263
|
headings: HeadingNode[];
|
|
259
264
|
/**
|
|
260
265
|
* Your reference ID for the page the headings belong to. For Wix pages,
|
|
261
|
-
* the page ID
|
|
262
|
-
* context.
|
|
266
|
+
* the page ID, which lets the page's title be read to give the AI context.
|
|
263
267
|
* @maxLength 200
|
|
264
268
|
* @minLength 1
|
|
265
269
|
*/
|
|
266
270
|
pageId: string;
|
|
267
271
|
/**
|
|
268
|
-
* Type of the page's item. For example,
|
|
269
|
-
* site page or `BLOG_POST` for a blog post.
|
|
272
|
+
* Type of the page's item, as an SEO item type identifier. For example,
|
|
273
|
+
* `STATIC_PAGE_V2` for a regular site page or `BLOG_POST` for a blog post.
|
|
274
|
+
* Other values are rejected.
|
|
270
275
|
* @maxLength 200
|
|
271
276
|
* @minLength 1
|
|
272
277
|
*/
|
|
@@ -275,10 +280,10 @@ interface GenerateHeadingStructureSuggestionsRequest {
|
|
|
275
280
|
/**
|
|
276
281
|
* One heading element of the page, as the caller knows it.
|
|
277
282
|
*
|
|
278
|
-
* The identifying fields (`id`, `uiElementId`, `attributeId`) are
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
283
|
+
* The identifying fields (`id`, `uiElementId`, `attributeId`) are your own
|
|
284
|
+
* references. They're echoed back on the matching suggestion and aren't
|
|
285
|
+
* interpreted. `sectionId` is different: it guides the AI's grouping of
|
|
286
|
+
* headings and isn't echoed back.
|
|
282
287
|
*
|
|
283
288
|
* `id` is required, and the combination of `id`, `uiElementId`, and
|
|
284
289
|
* `attributeId` must be unique within a request, since that combination is what
|
|
@@ -302,8 +307,9 @@ interface HeadingNode {
|
|
|
302
307
|
attributeId?: string;
|
|
303
308
|
/**
|
|
304
309
|
* Raw HTML of the heading element, including its tag, for example,
|
|
305
|
-
* `<h2>Our services</h2>`.
|
|
306
|
-
*
|
|
310
|
+
* `<h2>Our services</h2>`. Elements that aren't headings are ignored for
|
|
311
|
+
* the structure check. Send page content only. Don't include personal
|
|
312
|
+
* data.
|
|
307
313
|
* @maxLength 100000
|
|
308
314
|
* @minLength 1
|
|
309
315
|
*/
|
|
@@ -427,7 +433,7 @@ type GenerateHeadingStructureSuggestionsApplicationErrors = {
|
|
|
427
433
|
* @applicableIdentity APP
|
|
428
434
|
* @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions
|
|
429
435
|
*/
|
|
430
|
-
declare function generateTitleSuggestions(options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`,
|
|
436
|
+
declare function generateTitleSuggestions(options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 0>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
|
|
431
437
|
__applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;
|
|
432
438
|
}>;
|
|
433
439
|
interface GenerateTitleSuggestionsOptions {
|
|
@@ -468,7 +474,7 @@ interface GenerateTitleSuggestionsOptions {
|
|
|
468
474
|
* @applicableIdentity APP
|
|
469
475
|
* @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions
|
|
470
476
|
*/
|
|
471
|
-
declare function generateDescriptionSuggestions(options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`,
|
|
477
|
+
declare function generateDescriptionSuggestions(options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 0>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 1> & {
|
|
472
478
|
__applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;
|
|
473
479
|
}>;
|
|
474
480
|
interface GenerateDescriptionSuggestionsOptions {
|
|
@@ -524,13 +530,16 @@ interface GenerateDescriptionSuggestionsOptions {
|
|
|
524
530
|
/**
|
|
525
531
|
* Generates alt text suggestions for a single image of a Wix-managed item.
|
|
526
532
|
*
|
|
527
|
-
* The image must belong to a Wix-managed item, such
|
|
528
|
-
* store product, identified by `image.parentItemId` and
|
|
529
|
-
* `itemType`.
|
|
530
|
-
*
|
|
531
|
-
*
|
|
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.
|
|
532
538
|
*
|
|
533
539
|
* Returns up to 5 ready-to-use alt texts in the site's language.
|
|
540
|
+
*
|
|
541
|
+
* To generate alt text for up to 20 images in a single call, call
|
|
542
|
+
* [Bulk Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/bulk-generate-alt-text-suggestions).
|
|
534
543
|
* @param image - The image to generate alt text for.
|
|
535
544
|
* @public
|
|
536
545
|
* @documentationMaturity preview
|
|
@@ -541,14 +550,15 @@ interface GenerateDescriptionSuggestionsOptions {
|
|
|
541
550
|
* @applicableIdentity APP
|
|
542
551
|
* @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions
|
|
543
552
|
*/
|
|
544
|
-
declare function generateAltTextSuggestions(image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`,
|
|
553
|
+
declare function generateAltTextSuggestions(image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<GenerateAltTextSuggestionsResponse, `altTextSuggestions.imageId` | `altTextSuggestions.url` | `altTextSuggestions.suggestions`, 1> & {
|
|
545
554
|
__applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;
|
|
546
555
|
}>;
|
|
547
556
|
interface GenerateAltTextSuggestionsOptions {
|
|
548
557
|
/**
|
|
549
|
-
* Type of the Wix item the image belongs to
|
|
550
|
-
*
|
|
551
|
-
* `BLOG_POST` for a blog post.
|
|
558
|
+
* Type of the Wix item the image belongs to, as an SEO item type
|
|
559
|
+
* identifier. For example, `STATIC_PAGE_V2` for a regular site page,
|
|
560
|
+
* `STORES_PRODUCT` for a store product, or `BLOG_POST` for a blog post.
|
|
561
|
+
* Other values are rejected.
|
|
552
562
|
* @maxLength 100
|
|
553
563
|
* @minLength 1
|
|
554
564
|
*/
|
|
@@ -557,11 +567,14 @@ interface GenerateAltTextSuggestionsOptions {
|
|
|
557
567
|
/**
|
|
558
568
|
* Generates alt text suggestions for up to 20 images in one call.
|
|
559
569
|
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
*
|
|
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
|
|
572
|
+
* per-image success, and the call succeeds as long as at least 1 image
|
|
573
|
+
* succeeded. A call where every image failed returns a `GENERATION_FAILED`
|
|
574
|
+
* error. An image URL that isn't Wix-hosted rejects the whole request.
|
|
575
|
+
*
|
|
576
|
+
* To generate alt text for a single image, call
|
|
577
|
+
* [Generate Alt Text Suggestions](https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-alt-text-suggestions).
|
|
565
578
|
* @param images - The images to generate alt text for.
|
|
566
579
|
* @public
|
|
567
580
|
* @documentationMaturity preview
|
|
@@ -572,15 +585,16 @@ interface GenerateAltTextSuggestionsOptions {
|
|
|
572
585
|
* @applicableIdentity APP
|
|
573
586
|
* @fqn wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions
|
|
574
587
|
*/
|
|
575
|
-
declare function bulkGenerateAltTextSuggestions(images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`,
|
|
588
|
+
declare function bulkGenerateAltTextSuggestions(images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`, 0>): Promise<NonNullablePaths<BulkGenerateAltTextSuggestionsResponse, `results` | `results.${number}.imageId` | `results.${number}.success` | `successCount` | `failureCount`, 2> & {
|
|
576
589
|
__applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;
|
|
577
590
|
}>;
|
|
578
591
|
interface BulkGenerateAltTextSuggestionsOptions {
|
|
579
592
|
/**
|
|
580
|
-
* Type of the Wix item the images belong to
|
|
581
|
-
* belong to items of the same type.
|
|
582
|
-
*
|
|
583
|
-
* for a blog post.
|
|
593
|
+
* Type of the Wix item the images belong to, as an SEO item type
|
|
594
|
+
* identifier. All images in one call must belong to items of the same type.
|
|
595
|
+
* For example, `STATIC_PAGE_V2` for a regular site page, `STORES_PRODUCT`
|
|
596
|
+
* for a store product, or `BLOG_POST` for a blog post. Other values are
|
|
597
|
+
* rejected.
|
|
584
598
|
* @maxLength 100
|
|
585
599
|
* @minLength 1
|
|
586
600
|
*/
|
|
@@ -608,21 +622,21 @@ interface BulkGenerateAltTextSuggestionsOptions {
|
|
|
608
622
|
* @applicableIdentity APP
|
|
609
623
|
* @fqn wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions
|
|
610
624
|
*/
|
|
611
|
-
declare function generateHeadingStructureSuggestions(headings: HeadingNode[], options: NonNullablePaths<GenerateHeadingStructureSuggestionsOptions, `itemType` | `pageId`,
|
|
625
|
+
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> & {
|
|
612
626
|
__applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;
|
|
613
627
|
}>;
|
|
614
628
|
interface GenerateHeadingStructureSuggestionsOptions {
|
|
615
629
|
/**
|
|
616
630
|
* Your reference ID for the page the headings belong to. For Wix pages,
|
|
617
|
-
* the page ID
|
|
618
|
-
* context.
|
|
631
|
+
* the page ID, which lets the page's title be read to give the AI context.
|
|
619
632
|
* @maxLength 200
|
|
620
633
|
* @minLength 1
|
|
621
634
|
*/
|
|
622
635
|
pageId: string;
|
|
623
636
|
/**
|
|
624
|
-
* Type of the page's item. For example,
|
|
625
|
-
* site page or `BLOG_POST` for a blog post.
|
|
637
|
+
* Type of the page's item, as an SEO item type identifier. For example,
|
|
638
|
+
* `STATIC_PAGE_V2` for a regular site page or `BLOG_POST` for a blog post.
|
|
639
|
+
* Other values are rejected.
|
|
626
640
|
* @maxLength 200
|
|
627
641
|
* @minLength 1
|
|
628
642
|
*/
|