@wix/auto_sdk_seo_tag-suggestions 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +95 -0
- package/build/cjs/index.js +441 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +632 -0
- package/build/cjs/index.typings.js +393 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +435 -0
- package/build/cjs/meta.js +326 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +95 -0
- package/build/es/index.mjs +412 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +632 -0
- package/build/es/index.typings.mjs +364 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +435 -0
- package/build/es/meta.mjs +294 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +95 -0
- package/build/internal/cjs/index.typings.d.ts +632 -0
- package/build/internal/cjs/meta.d.ts +435 -0
- package/build/internal/es/index.d.mts +95 -0
- package/build/internal/es/index.typings.d.mts +632 -0
- package/build/internal/es/meta.d.mts +435 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { GenerateTitleSuggestionsOptions, GenerateTitleSuggestionsResponse, GenerateTitleSuggestionsApplicationErrors, GenerateDescriptionSuggestionsOptions, GenerateDescriptionSuggestionsResponse, GenerateDescriptionSuggestionsApplicationErrors, ImageReference, GenerateAltTextSuggestionsOptions, GenerateAltTextSuggestionsResponse, GenerateAltTextSuggestionsApplicationErrors, BulkGenerateAltTextSuggestionsOptions, BulkGenerateAltTextSuggestionsResponse, BulkGenerateAltTextSuggestionsApplicationErrors, HeadingNode, GenerateHeadingStructureSuggestionsOptions, GenerateHeadingStructureSuggestionsResponse, GenerateHeadingStructureSuggestionsApplicationErrors } from './index.typings.js';
|
|
3
|
+
export { AltTextSuggestions, BulkAltTextResult, BulkGenerateAltTextSuggestionsRequest, GenerateAltTextSuggestionsRequest, GenerateDescriptionSuggestionsRequest, GenerateHeadingStructureSuggestionsRequest, GenerateTitleSuggestionsRequest, HeadingSuggestion, PageType, PageTypeWithLiterals, TagSuggestions } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function generateTitleSuggestions$1(httpClient: HttpClient): GenerateTitleSuggestionsSignature;
|
|
6
|
+
interface GenerateTitleSuggestionsSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Generates SEO title tag suggestions for a page.
|
|
9
|
+
*
|
|
10
|
+
* Returns up to 10 ready-to-use title texts for the page, based on the page
|
|
11
|
+
* name, page type, and primary keyword. Suggestions aim for the 45–65
|
|
12
|
+
* character range that displays fully in search results.
|
|
13
|
+
*/
|
|
14
|
+
(options?: NonNullablePaths<GenerateTitleSuggestionsOptions, `pageName`, 2>): Promise<NonNullablePaths<GenerateTitleSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
|
|
15
|
+
__applicationErrorsType?: GenerateTitleSuggestionsApplicationErrors;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
declare function generateDescriptionSuggestions$1(httpClient: HttpClient): GenerateDescriptionSuggestionsSignature;
|
|
19
|
+
interface GenerateDescriptionSuggestionsSignature {
|
|
20
|
+
/**
|
|
21
|
+
* Generates SEO description tag suggestions for a page.
|
|
22
|
+
*
|
|
23
|
+
* Returns up to 10 ready-to-use meta description texts, based on the page
|
|
24
|
+
* name, topic, page type, and the optional context fields. Suggestions aim
|
|
25
|
+
* for the 130–165 character range that displays fully in search results.
|
|
26
|
+
*
|
|
27
|
+
* The optional context fields — primary keyword, tone of voice, business
|
|
28
|
+
* type, business location, and page content — are hints that may influence
|
|
29
|
+
* the generated text; they aren't guaranteed to appear in it.
|
|
30
|
+
*/
|
|
31
|
+
(options?: NonNullablePaths<GenerateDescriptionSuggestionsOptions, `pageName` | `topic`, 2>): Promise<NonNullablePaths<GenerateDescriptionSuggestionsResponse, `tagSuggestions.suggestions`, 3> & {
|
|
32
|
+
__applicationErrorsType?: GenerateDescriptionSuggestionsApplicationErrors;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
declare function generateAltTextSuggestions$1(httpClient: HttpClient): GenerateAltTextSuggestionsSignature;
|
|
36
|
+
interface GenerateAltTextSuggestionsSignature {
|
|
37
|
+
/**
|
|
38
|
+
* Generates alt text suggestions for a single image of a Wix-managed item.
|
|
39
|
+
*
|
|
40
|
+
* The image must belong to a Wix-managed item — a site page or a vertical
|
|
41
|
+
* item such as a store product — identified by `image.parentItemId` and
|
|
42
|
+
* `itemType`. Wix reads that item's stored SEO data to give the AI context
|
|
43
|
+
* about what the image is for. This method can't generate alt text for an
|
|
44
|
+
* arbitrary image URL with no owning item.
|
|
45
|
+
*
|
|
46
|
+
* Returns up to 5 ready-to-use alt texts in the site's language.
|
|
47
|
+
* @param - The image to generate alt text for.
|
|
48
|
+
*/
|
|
49
|
+
(image: ImageReference, options: NonNullablePaths<GenerateAltTextSuggestionsOptions, `itemType`, 2>): Promise<NonNullablePaths<GenerateAltTextSuggestionsResponse, `altTextSuggestions.imageId` | `altTextSuggestions.url` | `altTextSuggestions.suggestions`, 3> & {
|
|
50
|
+
__applicationErrorsType?: GenerateAltTextSuggestionsApplicationErrors;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
declare function bulkGenerateAltTextSuggestions$1(httpClient: HttpClient): BulkGenerateAltTextSuggestionsSignature;
|
|
54
|
+
interface BulkGenerateAltTextSuggestionsSignature {
|
|
55
|
+
/**
|
|
56
|
+
* Generates alt text suggestions for up to 20 images in one call.
|
|
57
|
+
*
|
|
58
|
+
* Like Generate Alt Text Suggestions, every image must belong to a
|
|
59
|
+
* Wix-managed item. Images are processed independently: the response
|
|
60
|
+
* reports per-image success, and the call succeeds as long as at least one
|
|
61
|
+
* image succeeded. A call where every image failed returns a
|
|
62
|
+
* `GENERATION_FAILED` error.
|
|
63
|
+
* @param - The images to generate alt text for.
|
|
64
|
+
*/
|
|
65
|
+
(images: ImageReference[], options: NonNullablePaths<BulkGenerateAltTextSuggestionsOptions, `itemType`, 2>): Promise<NonNullablePaths<BulkGenerateAltTextSuggestionsResponse, `results` | `results.${number}.imageId` | `results.${number}.success` | `successCount` | `failureCount`, 4> & {
|
|
66
|
+
__applicationErrorsType?: BulkGenerateAltTextSuggestionsApplicationErrors;
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
declare function generateHeadingStructureSuggestions$1(httpClient: HttpClient): GenerateHeadingStructureSuggestionsSignature;
|
|
70
|
+
interface GenerateHeadingStructureSuggestionsSignature {
|
|
71
|
+
/**
|
|
72
|
+
* Suggests corrected heading levels for a page's headings.
|
|
73
|
+
*
|
|
74
|
+
* Pass the page's headings in document order, each with its raw HTML and
|
|
75
|
+
* your own reference IDs. The AI checks the heading hierarchy — one H1,
|
|
76
|
+
* no skipped levels, headings that match their content — and returns a
|
|
77
|
+
* suggested tag per heading that should change, echoing your reference IDs
|
|
78
|
+
* back so you can locate each element.
|
|
79
|
+
*
|
|
80
|
+
* The heading nodes are the request's content, so this method works for any
|
|
81
|
+
* page, including headless projects.
|
|
82
|
+
* @param - The page's heading elements, in the order they appear on the page.
|
|
83
|
+
*/
|
|
84
|
+
(headings: HeadingNode[], options: NonNullablePaths<GenerateHeadingStructureSuggestionsOptions, `itemType` | `pageId`, 2>): Promise<NonNullablePaths<GenerateHeadingStructureSuggestionsResponse, `suggestions` | `suggestions.${number}.headingId` | `suggestions.${number}.uiElementId` | `suggestions.${number}.attributeId` | `suggestions.${number}.currentTag` | `suggestions.${number}.proposedTag`, 4> & {
|
|
85
|
+
__applicationErrorsType?: GenerateHeadingStructureSuggestionsApplicationErrors;
|
|
86
|
+
}>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare const generateTitleSuggestions: MaybeContext<BuildRESTFunction<typeof generateTitleSuggestions$1> & typeof generateTitleSuggestions$1>;
|
|
90
|
+
declare const generateDescriptionSuggestions: MaybeContext<BuildRESTFunction<typeof generateDescriptionSuggestions$1> & typeof generateDescriptionSuggestions$1>;
|
|
91
|
+
declare const generateAltTextSuggestions: MaybeContext<BuildRESTFunction<typeof generateAltTextSuggestions$1> & typeof generateAltTextSuggestions$1>;
|
|
92
|
+
declare const bulkGenerateAltTextSuggestions: MaybeContext<BuildRESTFunction<typeof bulkGenerateAltTextSuggestions$1> & typeof bulkGenerateAltTextSuggestions$1>;
|
|
93
|
+
declare const generateHeadingStructureSuggestions: MaybeContext<BuildRESTFunction<typeof generateHeadingStructureSuggestions$1> & typeof generateHeadingStructureSuggestions$1>;
|
|
94
|
+
|
|
95
|
+
export { BulkGenerateAltTextSuggestionsApplicationErrors, BulkGenerateAltTextSuggestionsOptions, BulkGenerateAltTextSuggestionsResponse, GenerateAltTextSuggestionsApplicationErrors, GenerateAltTextSuggestionsOptions, GenerateAltTextSuggestionsResponse, GenerateDescriptionSuggestionsApplicationErrors, GenerateDescriptionSuggestionsOptions, GenerateDescriptionSuggestionsResponse, GenerateHeadingStructureSuggestionsApplicationErrors, GenerateHeadingStructureSuggestionsOptions, GenerateHeadingStructureSuggestionsResponse, GenerateTitleSuggestionsApplicationErrors, GenerateTitleSuggestionsOptions, GenerateTitleSuggestionsResponse, HeadingNode, ImageReference, bulkGenerateAltTextSuggestions, generateAltTextSuggestions, generateDescriptionSuggestions, generateHeadingStructureSuggestions, generateTitleSuggestions };
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
PageType: () => PageType,
|
|
24
|
+
bulkGenerateAltTextSuggestions: () => bulkGenerateAltTextSuggestions4,
|
|
25
|
+
generateAltTextSuggestions: () => generateAltTextSuggestions4,
|
|
26
|
+
generateDescriptionSuggestions: () => generateDescriptionSuggestions4,
|
|
27
|
+
generateHeadingStructureSuggestions: () => generateHeadingStructureSuggestions4,
|
|
28
|
+
generateTitleSuggestions: () => generateTitleSuggestions4
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(index_exports);
|
|
31
|
+
|
|
32
|
+
// src/seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.ts
|
|
33
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
34
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
35
|
+
|
|
36
|
+
// src/seo-suggestions-v1-tag-suggestions-tag-suggestions.http.ts
|
|
37
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
38
|
+
function resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl(opts) {
|
|
39
|
+
const domainToMappings = {
|
|
40
|
+
"bo._base_domain_": [
|
|
41
|
+
{
|
|
42
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
43
|
+
destPath: ""
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"wixbo.ai": [
|
|
47
|
+
{
|
|
48
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
49
|
+
destPath: ""
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"wix-bo.com": [
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
55
|
+
destPath: ""
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"manage._base_domain_": [
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
61
|
+
destPath: ""
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"editor._base_domain_": [
|
|
65
|
+
{
|
|
66
|
+
srcPath: "/_api/seo-tags-suggestions-service",
|
|
67
|
+
destPath: ""
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"blocks._base_domain_": [
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/_api/seo-tags-suggestions-service",
|
|
73
|
+
destPath: ""
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"create.editorx": [
|
|
77
|
+
{
|
|
78
|
+
srcPath: "/_api/seo-tags-suggestions-service",
|
|
79
|
+
destPath: ""
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"www.wixapis.com": [
|
|
83
|
+
{
|
|
84
|
+
srcPath: "/seo-suggestions/v1",
|
|
85
|
+
destPath: "/v1"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
90
|
+
}
|
|
91
|
+
var PACKAGE_NAME = "@wix/auto_sdk_seo_tag-suggestions";
|
|
92
|
+
function generateTitleSuggestions(payload) {
|
|
93
|
+
function __generateTitleSuggestions({ host }) {
|
|
94
|
+
const metadata = {
|
|
95
|
+
entityFqdn: "wix.seo.suggestions.v1.tag_suggestions",
|
|
96
|
+
method: "POST",
|
|
97
|
+
methodFqn: "wix.seo.suggestions.v1.TagsSuggestionsService.GenerateTitleSuggestions",
|
|
98
|
+
packageName: PACKAGE_NAME,
|
|
99
|
+
migrationOptions: {
|
|
100
|
+
optInTransformResponse: true
|
|
101
|
+
},
|
|
102
|
+
url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({
|
|
103
|
+
protoPath: "/v1/tag-suggestions/title",
|
|
104
|
+
data: payload,
|
|
105
|
+
host
|
|
106
|
+
}),
|
|
107
|
+
data: payload
|
|
108
|
+
};
|
|
109
|
+
return metadata;
|
|
110
|
+
}
|
|
111
|
+
return __generateTitleSuggestions;
|
|
112
|
+
}
|
|
113
|
+
function generateDescriptionSuggestions(payload) {
|
|
114
|
+
function __generateDescriptionSuggestions({ host }) {
|
|
115
|
+
const metadata = {
|
|
116
|
+
entityFqdn: "wix.seo.suggestions.v1.tag_suggestions",
|
|
117
|
+
method: "POST",
|
|
118
|
+
methodFqn: "wix.seo.suggestions.v1.TagsSuggestionsService.GenerateDescriptionSuggestions",
|
|
119
|
+
packageName: PACKAGE_NAME,
|
|
120
|
+
migrationOptions: {
|
|
121
|
+
optInTransformResponse: true
|
|
122
|
+
},
|
|
123
|
+
url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({
|
|
124
|
+
protoPath: "/v1/tag-suggestions/description",
|
|
125
|
+
data: payload,
|
|
126
|
+
host
|
|
127
|
+
}),
|
|
128
|
+
data: payload
|
|
129
|
+
};
|
|
130
|
+
return metadata;
|
|
131
|
+
}
|
|
132
|
+
return __generateDescriptionSuggestions;
|
|
133
|
+
}
|
|
134
|
+
function generateAltTextSuggestions(payload) {
|
|
135
|
+
function __generateAltTextSuggestions({ host }) {
|
|
136
|
+
const metadata = {
|
|
137
|
+
entityFqdn: "wix.seo.suggestions.v1.tag_suggestions",
|
|
138
|
+
method: "POST",
|
|
139
|
+
methodFqn: "wix.seo.suggestions.v1.TagsSuggestionsService.GenerateAltTextSuggestions",
|
|
140
|
+
packageName: PACKAGE_NAME,
|
|
141
|
+
migrationOptions: {
|
|
142
|
+
optInTransformResponse: true
|
|
143
|
+
},
|
|
144
|
+
url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({
|
|
145
|
+
protoPath: "/v1/tag-suggestions/alt-text",
|
|
146
|
+
data: payload,
|
|
147
|
+
host
|
|
148
|
+
}),
|
|
149
|
+
data: payload
|
|
150
|
+
};
|
|
151
|
+
return metadata;
|
|
152
|
+
}
|
|
153
|
+
return __generateAltTextSuggestions;
|
|
154
|
+
}
|
|
155
|
+
function bulkGenerateAltTextSuggestions(payload) {
|
|
156
|
+
function __bulkGenerateAltTextSuggestions({ host }) {
|
|
157
|
+
const metadata = {
|
|
158
|
+
entityFqdn: "wix.seo.suggestions.v1.tag_suggestions",
|
|
159
|
+
method: "POST",
|
|
160
|
+
methodFqn: "wix.seo.suggestions.v1.TagsSuggestionsService.BulkGenerateAltTextSuggestions",
|
|
161
|
+
packageName: PACKAGE_NAME,
|
|
162
|
+
migrationOptions: {
|
|
163
|
+
optInTransformResponse: true
|
|
164
|
+
},
|
|
165
|
+
url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({
|
|
166
|
+
protoPath: "/v1/tag-suggestions/alt-text-bulk",
|
|
167
|
+
data: payload,
|
|
168
|
+
host
|
|
169
|
+
}),
|
|
170
|
+
data: payload
|
|
171
|
+
};
|
|
172
|
+
return metadata;
|
|
173
|
+
}
|
|
174
|
+
return __bulkGenerateAltTextSuggestions;
|
|
175
|
+
}
|
|
176
|
+
function generateHeadingStructureSuggestions(payload) {
|
|
177
|
+
function __generateHeadingStructureSuggestions({ host }) {
|
|
178
|
+
const metadata = {
|
|
179
|
+
entityFqdn: "wix.seo.suggestions.v1.tag_suggestions",
|
|
180
|
+
method: "POST",
|
|
181
|
+
methodFqn: "wix.seo.suggestions.v1.TagsSuggestionsService.GenerateHeadingStructureSuggestions",
|
|
182
|
+
packageName: PACKAGE_NAME,
|
|
183
|
+
migrationOptions: {
|
|
184
|
+
optInTransformResponse: true
|
|
185
|
+
},
|
|
186
|
+
url: resolveWixSeoSuggestionsV1TagsSuggestionsServiceUrl({
|
|
187
|
+
protoPath: "/v1/tag-suggestions/heading-structure",
|
|
188
|
+
data: payload,
|
|
189
|
+
host
|
|
190
|
+
}),
|
|
191
|
+
data: payload
|
|
192
|
+
};
|
|
193
|
+
return metadata;
|
|
194
|
+
}
|
|
195
|
+
return __generateHeadingStructureSuggestions;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// src/seo-suggestions-v1-tag-suggestions-tag-suggestions.universal.ts
|
|
199
|
+
var PageType = /* @__PURE__ */ ((PageType2) => {
|
|
200
|
+
PageType2["UNKNOWN_PAGE_TYPE"] = "UNKNOWN_PAGE_TYPE";
|
|
201
|
+
PageType2["WEBSITE_PAGE"] = "WEBSITE_PAGE";
|
|
202
|
+
PageType2["HOMEPAGE"] = "HOMEPAGE";
|
|
203
|
+
PageType2["BLOG_POST"] = "BLOG_POST";
|
|
204
|
+
PageType2["BLOG_CATEGORY_PAGE"] = "BLOG_CATEGORY_PAGE";
|
|
205
|
+
PageType2["BLOG_TAGS_PAGE"] = "BLOG_TAGS_PAGE";
|
|
206
|
+
PageType2["PRODUCT_PAGE"] = "PRODUCT_PAGE";
|
|
207
|
+
PageType2["PRODUCT_CATEGORY_PAGE"] = "PRODUCT_CATEGORY_PAGE";
|
|
208
|
+
PageType2["SERVICE_BOOKING_PAGE"] = "SERVICE_BOOKING_PAGE";
|
|
209
|
+
PageType2["EVENT_PAGE"] = "EVENT_PAGE";
|
|
210
|
+
PageType2["RESTAURANT_MENU_PAGE"] = "RESTAURANT_MENU_PAGE";
|
|
211
|
+
PageType2["RESTAURANT_MENU_ITEM_PAGE"] = "RESTAURANT_MENU_ITEM_PAGE";
|
|
212
|
+
PageType2["ONLINE_PROGRAM_PAGE"] = "ONLINE_PROGRAM_PAGE";
|
|
213
|
+
PageType2["PORTFOLIO_COLLECTION_PAGE"] = "PORTFOLIO_COLLECTION_PAGE";
|
|
214
|
+
PageType2["PORTFOLIO_PROJECT_PAGE"] = "PORTFOLIO_PROJECT_PAGE";
|
|
215
|
+
PageType2["TABLE_RESERVATIONS_PAGE"] = "TABLE_RESERVATIONS_PAGE";
|
|
216
|
+
PageType2["OTHER_APP_PAGE"] = "OTHER_APP_PAGE";
|
|
217
|
+
return PageType2;
|
|
218
|
+
})(PageType || {});
|
|
219
|
+
async function generateTitleSuggestions2(options) {
|
|
220
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
221
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
222
|
+
pageType: options?.pageType,
|
|
223
|
+
pageName: options?.pageName,
|
|
224
|
+
primaryKeyword: options?.primaryKeyword
|
|
225
|
+
});
|
|
226
|
+
const reqOpts = generateTitleSuggestions(
|
|
227
|
+
payload
|
|
228
|
+
);
|
|
229
|
+
sideEffects?.onSiteCall?.();
|
|
230
|
+
try {
|
|
231
|
+
const result = await httpClient.request(reqOpts);
|
|
232
|
+
sideEffects?.onSuccess?.(result);
|
|
233
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
234
|
+
} catch (err) {
|
|
235
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
236
|
+
err,
|
|
237
|
+
{
|
|
238
|
+
spreadPathsToArguments: {},
|
|
239
|
+
explicitPathsToArguments: {
|
|
240
|
+
pageType: "$[0].pageType",
|
|
241
|
+
pageName: "$[0].pageName",
|
|
242
|
+
primaryKeyword: "$[0].primaryKeyword"
|
|
243
|
+
},
|
|
244
|
+
singleArgumentUnchanged: false
|
|
245
|
+
},
|
|
246
|
+
["options"]
|
|
247
|
+
);
|
|
248
|
+
sideEffects?.onError?.(err);
|
|
249
|
+
throw transformedError;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
async function generateDescriptionSuggestions2(options) {
|
|
253
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
254
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
255
|
+
pageType: options?.pageType,
|
|
256
|
+
pageName: options?.pageName,
|
|
257
|
+
topic: options?.topic,
|
|
258
|
+
primaryKeyword: options?.primaryKeyword,
|
|
259
|
+
toneOfVoice: options?.toneOfVoice,
|
|
260
|
+
businessType: options?.businessType,
|
|
261
|
+
businessLocation: options?.businessLocation,
|
|
262
|
+
pageContent: options?.pageContent
|
|
263
|
+
});
|
|
264
|
+
const reqOpts = generateDescriptionSuggestions(
|
|
265
|
+
payload
|
|
266
|
+
);
|
|
267
|
+
sideEffects?.onSiteCall?.();
|
|
268
|
+
try {
|
|
269
|
+
const result = await httpClient.request(reqOpts);
|
|
270
|
+
sideEffects?.onSuccess?.(result);
|
|
271
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
272
|
+
} catch (err) {
|
|
273
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
274
|
+
err,
|
|
275
|
+
{
|
|
276
|
+
spreadPathsToArguments: {},
|
|
277
|
+
explicitPathsToArguments: {
|
|
278
|
+
pageType: "$[0].pageType",
|
|
279
|
+
pageName: "$[0].pageName",
|
|
280
|
+
topic: "$[0].topic",
|
|
281
|
+
primaryKeyword: "$[0].primaryKeyword",
|
|
282
|
+
toneOfVoice: "$[0].toneOfVoice",
|
|
283
|
+
businessType: "$[0].businessType",
|
|
284
|
+
businessLocation: "$[0].businessLocation",
|
|
285
|
+
pageContent: "$[0].pageContent"
|
|
286
|
+
},
|
|
287
|
+
singleArgumentUnchanged: false
|
|
288
|
+
},
|
|
289
|
+
["options"]
|
|
290
|
+
);
|
|
291
|
+
sideEffects?.onError?.(err);
|
|
292
|
+
throw transformedError;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
async function generateAltTextSuggestions2(image, options) {
|
|
296
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
297
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
298
|
+
image,
|
|
299
|
+
itemType: options?.itemType
|
|
300
|
+
});
|
|
301
|
+
const reqOpts = generateAltTextSuggestions(
|
|
302
|
+
payload
|
|
303
|
+
);
|
|
304
|
+
sideEffects?.onSiteCall?.();
|
|
305
|
+
try {
|
|
306
|
+
const result = await httpClient.request(reqOpts);
|
|
307
|
+
sideEffects?.onSuccess?.(result);
|
|
308
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
309
|
+
} catch (err) {
|
|
310
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
311
|
+
err,
|
|
312
|
+
{
|
|
313
|
+
spreadPathsToArguments: {},
|
|
314
|
+
explicitPathsToArguments: { image: "$[0]", itemType: "$[1].itemType" },
|
|
315
|
+
singleArgumentUnchanged: false
|
|
316
|
+
},
|
|
317
|
+
["image", "options"]
|
|
318
|
+
);
|
|
319
|
+
sideEffects?.onError?.(err);
|
|
320
|
+
throw transformedError;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
async function bulkGenerateAltTextSuggestions2(images, options) {
|
|
324
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
325
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
326
|
+
images,
|
|
327
|
+
itemType: options?.itemType
|
|
328
|
+
});
|
|
329
|
+
const reqOpts = bulkGenerateAltTextSuggestions(
|
|
330
|
+
payload
|
|
331
|
+
);
|
|
332
|
+
sideEffects?.onSiteCall?.();
|
|
333
|
+
try {
|
|
334
|
+
const result = await httpClient.request(reqOpts);
|
|
335
|
+
sideEffects?.onSuccess?.(result);
|
|
336
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
337
|
+
} catch (err) {
|
|
338
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
339
|
+
err,
|
|
340
|
+
{
|
|
341
|
+
spreadPathsToArguments: {},
|
|
342
|
+
explicitPathsToArguments: { images: "$[0]", itemType: "$[1].itemType" },
|
|
343
|
+
singleArgumentUnchanged: false
|
|
344
|
+
},
|
|
345
|
+
["images", "options"]
|
|
346
|
+
);
|
|
347
|
+
sideEffects?.onError?.(err);
|
|
348
|
+
throw transformedError;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
async function generateHeadingStructureSuggestions2(headings, options) {
|
|
352
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
353
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
354
|
+
headings,
|
|
355
|
+
pageId: options?.pageId,
|
|
356
|
+
itemType: options?.itemType
|
|
357
|
+
});
|
|
358
|
+
const reqOpts = generateHeadingStructureSuggestions(
|
|
359
|
+
payload
|
|
360
|
+
);
|
|
361
|
+
sideEffects?.onSiteCall?.();
|
|
362
|
+
try {
|
|
363
|
+
const result = await httpClient.request(reqOpts);
|
|
364
|
+
sideEffects?.onSuccess?.(result);
|
|
365
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
366
|
+
} catch (err) {
|
|
367
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
368
|
+
err,
|
|
369
|
+
{
|
|
370
|
+
spreadPathsToArguments: {},
|
|
371
|
+
explicitPathsToArguments: {
|
|
372
|
+
headings: "$[0]",
|
|
373
|
+
pageId: "$[1].pageId",
|
|
374
|
+
itemType: "$[1].itemType"
|
|
375
|
+
},
|
|
376
|
+
singleArgumentUnchanged: false
|
|
377
|
+
},
|
|
378
|
+
["headings", "options"]
|
|
379
|
+
);
|
|
380
|
+
sideEffects?.onError?.(err);
|
|
381
|
+
throw transformedError;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// src/seo-suggestions-v1-tag-suggestions-tag-suggestions.public.ts
|
|
386
|
+
function generateTitleSuggestions3(httpClient) {
|
|
387
|
+
return (options) => generateTitleSuggestions2(
|
|
388
|
+
options,
|
|
389
|
+
// @ts-ignore
|
|
390
|
+
{ httpClient }
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
function generateDescriptionSuggestions3(httpClient) {
|
|
394
|
+
return (options) => generateDescriptionSuggestions2(
|
|
395
|
+
options,
|
|
396
|
+
// @ts-ignore
|
|
397
|
+
{ httpClient }
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
function generateAltTextSuggestions3(httpClient) {
|
|
401
|
+
return (image, options) => generateAltTextSuggestions2(
|
|
402
|
+
image,
|
|
403
|
+
options,
|
|
404
|
+
// @ts-ignore
|
|
405
|
+
{ httpClient }
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
function bulkGenerateAltTextSuggestions3(httpClient) {
|
|
409
|
+
return (images, options) => bulkGenerateAltTextSuggestions2(
|
|
410
|
+
images,
|
|
411
|
+
options,
|
|
412
|
+
// @ts-ignore
|
|
413
|
+
{ httpClient }
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
function generateHeadingStructureSuggestions3(httpClient) {
|
|
417
|
+
return (headings, options) => generateHeadingStructureSuggestions2(
|
|
418
|
+
headings,
|
|
419
|
+
options,
|
|
420
|
+
// @ts-ignore
|
|
421
|
+
{ httpClient }
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// src/seo-suggestions-v1-tag-suggestions-tag-suggestions.context.ts
|
|
426
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
427
|
+
var generateTitleSuggestions4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(generateTitleSuggestions3);
|
|
428
|
+
var generateDescriptionSuggestions4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(generateDescriptionSuggestions3);
|
|
429
|
+
var generateAltTextSuggestions4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(generateAltTextSuggestions3);
|
|
430
|
+
var bulkGenerateAltTextSuggestions4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(bulkGenerateAltTextSuggestions3);
|
|
431
|
+
var generateHeadingStructureSuggestions4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(generateHeadingStructureSuggestions3);
|
|
432
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
433
|
+
0 && (module.exports = {
|
|
434
|
+
PageType,
|
|
435
|
+
bulkGenerateAltTextSuggestions,
|
|
436
|
+
generateAltTextSuggestions,
|
|
437
|
+
generateDescriptionSuggestions,
|
|
438
|
+
generateHeadingStructureSuggestions,
|
|
439
|
+
generateTitleSuggestions
|
|
440
|
+
});
|
|
441
|
+
//# sourceMappingURL=index.js.map
|