@wix/auto_sdk_seo_page-optimization 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 +65 -0
- package/build/cjs/index.js +289 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +306 -0
- package/build/cjs/index.typings.js +258 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +224 -0
- package/build/cjs/meta.js +229 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +65 -0
- package/build/es/index.mjs +262 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +306 -0
- package/build/es/index.typings.mjs +231 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +224 -0
- package/build/es/meta.mjs +199 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +65 -0
- package/build/internal/cjs/index.typings.d.ts +306 -0
- package/build/internal/cjs/meta.d.ts +224 -0
- package/build/internal/es/index.d.mts +65 -0
- package/build/internal/es/index.typings.d.mts +306 -0
- package/build/internal/es/meta.d.mts +224 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerHomePageOptimizationOptions, TriggerHomePageOptimizationResponse, TriggerHomePageOptimizationApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, GetPageOptimizationResultsApplicationErrors } from './index.typings.js';
|
|
3
|
+
export { GetPageOptimizationResultsRequest, OptimizationStatus, OptimizationStatusWithLiterals, PageOptimization, TextSuggestion, TriggerHomePageOptimizationRequest, TriggerPageOptimizationRequest } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function triggerPageOptimization$1(httpClient: HttpClient): TriggerPageOptimizationSignature;
|
|
6
|
+
interface TriggerPageOptimizationSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Starts generating optimization suggestions for a site page.
|
|
9
|
+
*
|
|
10
|
+
* The suggestions target the page's focus keyword, so set it first: run
|
|
11
|
+
* keyword research, set the chosen keyword as the page's focus keyword,
|
|
12
|
+
* then trigger. Returns a `predictionId` to poll Get Page Optimization
|
|
13
|
+
* Results with.
|
|
14
|
+
*
|
|
15
|
+
* Triggering is idempotent per page: while a generation for the page is in
|
|
16
|
+
* progress, calling again returns the same `predictionId` instead of
|
|
17
|
+
* starting a new job — unless the page's focus keyword changed since the
|
|
18
|
+
* job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.
|
|
19
|
+
* @param - ID of the site page to optimize.
|
|
20
|
+
*/
|
|
21
|
+
(pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {
|
|
22
|
+
__applicationErrorsType?: TriggerPageOptimizationApplicationErrors;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
declare function triggerHomePageOptimization$1(httpClient: HttpClient): TriggerHomePageOptimizationSignature;
|
|
26
|
+
interface TriggerHomePageOptimizationSignature {
|
|
27
|
+
/**
|
|
28
|
+
* Starts generating optimization suggestions for the site's homepage.
|
|
29
|
+
*
|
|
30
|
+
* The homepage gets its own method because its suggestions are generated
|
|
31
|
+
* with homepage-specific guidance — representing the whole site, not one
|
|
32
|
+
* topic. Same contract as Trigger Page Optimization: the homepage's focus
|
|
33
|
+
* keyword must be set first, the call returns a `predictionId` to poll,
|
|
34
|
+
* and triggering is idempotent per page while a job is in progress.
|
|
35
|
+
* @param - ID of the site's homepage.
|
|
36
|
+
*/
|
|
37
|
+
(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {
|
|
38
|
+
__applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
declare function getPageOptimizationResults$1(httpClient: HttpClient): GetPageOptimizationResultsSignature;
|
|
42
|
+
interface GetPageOptimizationResultsSignature {
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves the optimization suggestions generated for a page.
|
|
45
|
+
*
|
|
46
|
+
* Poll this method after a trigger call. The response's `status` reports
|
|
47
|
+
* where the job stands: while generation is still in progress the
|
|
48
|
+
* suggestions are empty and `status` is `IN_PROGRESS`; when it completes,
|
|
49
|
+
* the response carries the full suggestion set with `status` `COMPLETED`.
|
|
50
|
+
* A job that failed reports `FAILED` — trigger again to retry. Suggestions
|
|
51
|
+
* are stored per page — a later trigger for the same page replaces them,
|
|
52
|
+
* and a replaced job's lookup reports `NOT_FOUND`.
|
|
53
|
+
*
|
|
54
|
+
* Look up by `predictionId` (from the trigger call), or by `pageId`.
|
|
55
|
+
*/
|
|
56
|
+
(options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 4> & {
|
|
57
|
+
__applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare const triggerPageOptimization: MaybeContext<BuildRESTFunction<typeof triggerPageOptimization$1> & typeof triggerPageOptimization$1>;
|
|
62
|
+
declare const triggerHomePageOptimization: MaybeContext<BuildRESTFunction<typeof triggerHomePageOptimization$1> & typeof triggerHomePageOptimization$1>;
|
|
63
|
+
declare const getPageOptimizationResults: MaybeContext<BuildRESTFunction<typeof getPageOptimizationResults$1> & typeof getPageOptimizationResults$1>;
|
|
64
|
+
|
|
65
|
+
export { GetPageOptimizationResultsApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, TriggerHomePageOptimizationApplicationErrors, TriggerHomePageOptimizationOptions, TriggerHomePageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
|
|
@@ -0,0 +1,289 @@
|
|
|
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
|
+
OptimizationStatus: () => OptimizationStatus,
|
|
24
|
+
getPageOptimizationResults: () => getPageOptimizationResults4,
|
|
25
|
+
triggerHomePageOptimization: () => triggerHomePageOptimization4,
|
|
26
|
+
triggerPageOptimization: () => triggerPageOptimization4
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
29
|
+
|
|
30
|
+
// src/seo-suggestions-v1-page-optimization-page-optimization.universal.ts
|
|
31
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
32
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
33
|
+
|
|
34
|
+
// src/seo-suggestions-v1-page-optimization-page-optimization.http.ts
|
|
35
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
36
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
37
|
+
function resolveWixSeoSuggestionsV1PageOptimizationServiceUrl(opts) {
|
|
38
|
+
const domainToMappings = {
|
|
39
|
+
"bo._base_domain_": [
|
|
40
|
+
{
|
|
41
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
42
|
+
destPath: ""
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"wixbo.ai": [
|
|
46
|
+
{
|
|
47
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
48
|
+
destPath: ""
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"wix-bo.com": [
|
|
52
|
+
{
|
|
53
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
54
|
+
destPath: ""
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"manage._base_domain_": [
|
|
58
|
+
{
|
|
59
|
+
srcPath: "/_serverless/seo-tags-suggestions-service",
|
|
60
|
+
destPath: ""
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"editor._base_domain_": [
|
|
64
|
+
{
|
|
65
|
+
srcPath: "/_api/seo-tags-suggestions-service",
|
|
66
|
+
destPath: ""
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"blocks._base_domain_": [
|
|
70
|
+
{
|
|
71
|
+
srcPath: "/_api/seo-tags-suggestions-service",
|
|
72
|
+
destPath: ""
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"create.editorx": [
|
|
76
|
+
{
|
|
77
|
+
srcPath: "/_api/seo-tags-suggestions-service",
|
|
78
|
+
destPath: ""
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"www.wixapis.com": [
|
|
82
|
+
{
|
|
83
|
+
srcPath: "/seo-suggestions/v1",
|
|
84
|
+
destPath: "/v1"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
};
|
|
88
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
89
|
+
}
|
|
90
|
+
var PACKAGE_NAME = "@wix/auto_sdk_seo_page-optimization";
|
|
91
|
+
function triggerPageOptimization(payload) {
|
|
92
|
+
function __triggerPageOptimization({ host }) {
|
|
93
|
+
const metadata = {
|
|
94
|
+
entityFqdn: "wix.seo.suggestions.v1.page_optimization",
|
|
95
|
+
method: "POST",
|
|
96
|
+
methodFqn: "wix.seo.suggestions.v1.PageOptimizationService.TriggerPageOptimization",
|
|
97
|
+
packageName: PACKAGE_NAME,
|
|
98
|
+
migrationOptions: {
|
|
99
|
+
optInTransformResponse: true
|
|
100
|
+
},
|
|
101
|
+
url: resolveWixSeoSuggestionsV1PageOptimizationServiceUrl({
|
|
102
|
+
protoPath: "/v1/page-optimization/trigger",
|
|
103
|
+
data: payload,
|
|
104
|
+
host
|
|
105
|
+
}),
|
|
106
|
+
data: payload
|
|
107
|
+
};
|
|
108
|
+
return metadata;
|
|
109
|
+
}
|
|
110
|
+
return __triggerPageOptimization;
|
|
111
|
+
}
|
|
112
|
+
function triggerHomePageOptimization(payload) {
|
|
113
|
+
function __triggerHomePageOptimization({ host }) {
|
|
114
|
+
const metadata = {
|
|
115
|
+
entityFqdn: "wix.seo.suggestions.v1.page_optimization",
|
|
116
|
+
method: "POST",
|
|
117
|
+
methodFqn: "wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization",
|
|
118
|
+
packageName: PACKAGE_NAME,
|
|
119
|
+
migrationOptions: {
|
|
120
|
+
optInTransformResponse: true
|
|
121
|
+
},
|
|
122
|
+
url: resolveWixSeoSuggestionsV1PageOptimizationServiceUrl({
|
|
123
|
+
protoPath: "/v1/page-optimization/trigger-home",
|
|
124
|
+
data: payload,
|
|
125
|
+
host
|
|
126
|
+
}),
|
|
127
|
+
data: payload
|
|
128
|
+
};
|
|
129
|
+
return metadata;
|
|
130
|
+
}
|
|
131
|
+
return __triggerHomePageOptimization;
|
|
132
|
+
}
|
|
133
|
+
function getPageOptimizationResults(payload) {
|
|
134
|
+
function __getPageOptimizationResults({ host }) {
|
|
135
|
+
const metadata = {
|
|
136
|
+
entityFqdn: "wix.seo.suggestions.v1.page_optimization",
|
|
137
|
+
method: "GET",
|
|
138
|
+
methodFqn: "wix.seo.suggestions.v1.PageOptimizationService.GetPageOptimizationResults",
|
|
139
|
+
packageName: PACKAGE_NAME,
|
|
140
|
+
migrationOptions: {
|
|
141
|
+
optInTransformResponse: true
|
|
142
|
+
},
|
|
143
|
+
url: resolveWixSeoSuggestionsV1PageOptimizationServiceUrl({
|
|
144
|
+
protoPath: "/v1/page-optimization/results",
|
|
145
|
+
data: payload,
|
|
146
|
+
host
|
|
147
|
+
}),
|
|
148
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
149
|
+
};
|
|
150
|
+
return metadata;
|
|
151
|
+
}
|
|
152
|
+
return __getPageOptimizationResults;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// src/seo-suggestions-v1-page-optimization-page-optimization.universal.ts
|
|
156
|
+
var OptimizationStatus = /* @__PURE__ */ ((OptimizationStatus2) => {
|
|
157
|
+
OptimizationStatus2["UNKNOWN_OPTIMIZATION_STATUS"] = "UNKNOWN_OPTIMIZATION_STATUS";
|
|
158
|
+
OptimizationStatus2["NOT_FOUND"] = "NOT_FOUND";
|
|
159
|
+
OptimizationStatus2["IN_PROGRESS"] = "IN_PROGRESS";
|
|
160
|
+
OptimizationStatus2["COMPLETED"] = "COMPLETED";
|
|
161
|
+
OptimizationStatus2["FAILED"] = "FAILED";
|
|
162
|
+
return OptimizationStatus2;
|
|
163
|
+
})(OptimizationStatus || {});
|
|
164
|
+
async function triggerPageOptimization2(pageId, options) {
|
|
165
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
166
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
167
|
+
pageId,
|
|
168
|
+
pagePath: options?.pagePath
|
|
169
|
+
});
|
|
170
|
+
const reqOpts = triggerPageOptimization(
|
|
171
|
+
payload
|
|
172
|
+
);
|
|
173
|
+
sideEffects?.onSiteCall?.();
|
|
174
|
+
try {
|
|
175
|
+
const result = await httpClient.request(reqOpts);
|
|
176
|
+
sideEffects?.onSuccess?.(result);
|
|
177
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
178
|
+
} catch (err) {
|
|
179
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
180
|
+
err,
|
|
181
|
+
{
|
|
182
|
+
spreadPathsToArguments: {},
|
|
183
|
+
explicitPathsToArguments: { pageId: "$[0]", pagePath: "$[1].pagePath" },
|
|
184
|
+
singleArgumentUnchanged: false
|
|
185
|
+
},
|
|
186
|
+
["pageId", "options"]
|
|
187
|
+
);
|
|
188
|
+
sideEffects?.onError?.(err);
|
|
189
|
+
throw transformedError;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
async function triggerHomePageOptimization2(pageId, options) {
|
|
193
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
194
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
195
|
+
pageId,
|
|
196
|
+
pagePath: options?.pagePath
|
|
197
|
+
});
|
|
198
|
+
const reqOpts = triggerHomePageOptimization(
|
|
199
|
+
payload
|
|
200
|
+
);
|
|
201
|
+
sideEffects?.onSiteCall?.();
|
|
202
|
+
try {
|
|
203
|
+
const result = await httpClient.request(reqOpts);
|
|
204
|
+
sideEffects?.onSuccess?.(result);
|
|
205
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
206
|
+
} catch (err) {
|
|
207
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
208
|
+
err,
|
|
209
|
+
{
|
|
210
|
+
spreadPathsToArguments: {},
|
|
211
|
+
explicitPathsToArguments: { pageId: "$[0]", pagePath: "$[1].pagePath" },
|
|
212
|
+
singleArgumentUnchanged: false
|
|
213
|
+
},
|
|
214
|
+
["pageId", "options"]
|
|
215
|
+
);
|
|
216
|
+
sideEffects?.onError?.(err);
|
|
217
|
+
throw transformedError;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async function getPageOptimizationResults2(options) {
|
|
221
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
222
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
223
|
+
predictionId: options?.predictionId,
|
|
224
|
+
pageId: options?.pageId
|
|
225
|
+
});
|
|
226
|
+
const reqOpts = getPageOptimizationResults(
|
|
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
|
+
predictionId: "$[0].predictionId",
|
|
241
|
+
pageId: "$[0].pageId"
|
|
242
|
+
},
|
|
243
|
+
singleArgumentUnchanged: false
|
|
244
|
+
},
|
|
245
|
+
["options"]
|
|
246
|
+
);
|
|
247
|
+
sideEffects?.onError?.(err);
|
|
248
|
+
throw transformedError;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// src/seo-suggestions-v1-page-optimization-page-optimization.public.ts
|
|
253
|
+
function triggerPageOptimization3(httpClient) {
|
|
254
|
+
return (pageId, options) => triggerPageOptimization2(
|
|
255
|
+
pageId,
|
|
256
|
+
options,
|
|
257
|
+
// @ts-ignore
|
|
258
|
+
{ httpClient }
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
function triggerHomePageOptimization3(httpClient) {
|
|
262
|
+
return (pageId, options) => triggerHomePageOptimization2(
|
|
263
|
+
pageId,
|
|
264
|
+
options,
|
|
265
|
+
// @ts-ignore
|
|
266
|
+
{ httpClient }
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
function getPageOptimizationResults3(httpClient) {
|
|
270
|
+
return (options) => getPageOptimizationResults2(
|
|
271
|
+
options,
|
|
272
|
+
// @ts-ignore
|
|
273
|
+
{ httpClient }
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// src/seo-suggestions-v1-page-optimization-page-optimization.context.ts
|
|
278
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
279
|
+
var triggerPageOptimization4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(triggerPageOptimization3);
|
|
280
|
+
var triggerHomePageOptimization4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(triggerHomePageOptimization3);
|
|
281
|
+
var getPageOptimizationResults4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPageOptimizationResults3);
|
|
282
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
283
|
+
0 && (module.exports = {
|
|
284
|
+
OptimizationStatus,
|
|
285
|
+
getPageOptimizationResults,
|
|
286
|
+
triggerHomePageOptimization,
|
|
287
|
+
triggerPageOptimization
|
|
288
|
+
});
|
|
289
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/seo-suggestions-v1-page-optimization-page-optimization.universal.ts","../../src/seo-suggestions-v1-page-optimization-page-optimization.http.ts","../../src/seo-suggestions-v1-page-optimization-page-optimization.public.ts","../../src/seo-suggestions-v1-page-optimization-page-optimization.context.ts"],"sourcesContent":["export * from './src/seo-suggestions-v1-page-optimization-page-optimization.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 ambassadorWixSeoSuggestionsV1PageOptimization from './seo-suggestions-v1-page-optimization-page-optimization.http.js';\n\n/**\n * A whole-page set of SEO optimization suggestions, generated for one page\n * and focus keyword.\n *\n * Each suggestion is a before/after pair: `before` is the page's current\n * text (empty when the page has none, such as a missing meta description),\n * and `after` is the suggested replacement. Locate the element to change by\n * its `before` text.\n */\nexport interface PageOptimization {\n /**\n * ID of this suggestion set.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Suggested title tag.\n * @readonly\n */\n metaTitle?: TextSuggestion;\n /**\n * Suggested description tag.\n * @readonly\n */\n metaDescription?: TextSuggestion;\n /**\n * Suggested H1 heading.\n * @readonly\n */\n h1?: TextSuggestion;\n /**\n * Suggested H2 or H3 heading.\n * @readonly\n */\n h2OrH3?: TextSuggestion;\n /**\n * Suggested body text rewrites.\n * @readonly\n * @maxSize 100\n */\n content?: TextSuggestion[];\n}\n\n/** One suggested text change. */\nexport interface TextSuggestion {\n /**\n * The page's current text. Empty when the page has no text in this slot —\n * for example, a missing meta description.\n * @readonly\n * @maxLength 1000\n */\n before?: string | null;\n /**\n * The suggested text.\n * @readonly\n * @maxLength 1000\n */\n after?: string;\n}\n\nexport interface TriggerPageOptimizationRequest {\n /**\n * ID of the site page to optimize.\n * @maxLength 1000\n * @minLength 1\n */\n pageId: string;\n /**\n * URL path of the page, relative to the site's domain. For example,\n * `/about`.\n * @maxLength 1000\n * @minLength 1\n */\n pagePath: string;\n}\n\nexport interface TriggerPageOptimizationResponse {\n /**\n * ID of the generation job. Pass to Get Page Optimization Results.\n * @readonly\n * @maxLength 200\n */\n predictionId?: string;\n}\n\nexport interface TriggerHomePageOptimizationRequest {\n /**\n * ID of the site's homepage.\n * @maxLength 1000\n * @minLength 1\n */\n pageId: string;\n /**\n * URL path of the homepage. Usually `/`.\n * @maxLength 1000\n * @minLength 1\n */\n pagePath: string;\n}\n\nexport interface TriggerHomePageOptimizationResponse {\n /**\n * ID of the generation job. Pass to Get Page Optimization Results.\n * @readonly\n * @maxLength 200\n */\n predictionId?: string;\n}\n\nexport interface GetPageOptimizationResultsRequest {\n /**\n * ID of the generation job, from the trigger call.\n * @maxLength 200\n */\n predictionId?: string | null;\n /**\n * ID of the page to retrieve suggestions for. An alternative to\n * `predictionId` — returns the page's latest generation.\n * @maxLength 1000\n */\n pageId?: string | null;\n}\n\nexport interface GetPageOptimizationResultsResponse {\n /** The generated suggestions. Returned only when `status` is `COMPLETED`. */\n pageOptimization?: PageOptimization;\n /**\n * Status of the generation job the lookup matched.\n * @readonly\n */\n status?: OptimizationStatusWithLiterals;\n}\n\n/** Status of a page optimization generation job. */\nexport enum OptimizationStatus {\n UNKNOWN_OPTIMIZATION_STATUS = 'UNKNOWN_OPTIMIZATION_STATUS',\n /**\n * No generation job matches the lookup — it never existed, or a later\n * trigger for the same page replaced it.\n */\n NOT_FOUND = 'NOT_FOUND',\n /** Generation is still running. Poll again. */\n IN_PROGRESS = 'IN_PROGRESS',\n /** Generation finished; the response carries the suggestions. */\n COMPLETED = 'COMPLETED',\n /** Generation failed. Trigger again to retry. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type OptimizationStatusWithLiterals =\n | OptimizationStatus\n | 'UNKNOWN_OPTIMIZATION_STATUS'\n | 'NOT_FOUND'\n | 'IN_PROGRESS'\n | 'COMPLETED'\n | 'FAILED';\n/** @docsIgnore */\nexport type TriggerPageOptimizationApplicationErrors =\n | {\n code?: 'SITE_NOT_SUPPORTED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FOCUS_KEYWORD_NOT_SET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTENT_TOO_SHORT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUGGESTIONS_ALREADY_IN_PROGRESS';\n description?: string;\n data?: Record<string, any>;\n }\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 TriggerHomePageOptimizationApplicationErrors =\n | {\n code?: 'SITE_NOT_SUPPORTED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'FOCUS_KEYWORD_NOT_SET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTENT_TOO_SHORT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUGGESTIONS_ALREADY_IN_PROGRESS';\n description?: string;\n data?: Record<string, any>;\n }\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 GetPageOptimizationResultsApplicationErrors =\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 * Starts generating optimization suggestions for a site page.\n *\n * The suggestions target the page's focus keyword, so set it first: run\n * keyword research, set the chosen keyword as the page's focus keyword,\n * then trigger. Returns a `predictionId` to poll Get Page Optimization\n * Results with.\n *\n * Triggering is idempotent per page: while a generation for the page is in\n * progress, calling again returns the same `predictionId` instead of\n * starting a new job — unless the page's focus keyword changed since the\n * job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.\n * @param pageId - ID of the site page to optimize.\n * @public\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.pagePath\n * @requiredField pageId\n * @permissionId seo:suggestions:v1:page_optimization:trigger_page_optimization\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerPageOptimization\n */\nexport async function triggerPageOptimization(\n pageId: string,\n options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>\n): Promise<\n NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {\n __applicationErrorsType?: TriggerPageOptimizationApplicationErrors;\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 pageId: pageId,\n pagePath: options?.pagePath,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1PageOptimization.triggerPageOptimization(\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: { pageId: '$[0]', pagePath: '$[1].pagePath' },\n singleArgumentUnchanged: false,\n },\n ['pageId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TriggerPageOptimizationOptions {\n /**\n * URL path of the page, relative to the site's domain. For example,\n * `/about`.\n * @maxLength 1000\n * @minLength 1\n */\n pagePath: string;\n}\n\n/**\n * Starts generating optimization suggestions for the site's homepage.\n *\n * The homepage gets its own method because its suggestions are generated\n * with homepage-specific guidance — representing the whole site, not one\n * topic. Same contract as Trigger Page Optimization: the homepage's focus\n * keyword must be set first, the call returns a `predictionId` to poll,\n * and triggering is idempotent per page while a job is in progress.\n * @param pageId - ID of the site's homepage.\n * @public\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.pagePath\n * @requiredField pageId\n * @permissionId seo:suggestions:v1:page_optimization:trigger_home_page_optimization\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization\n */\nexport async function triggerHomePageOptimization(\n pageId: string,\n options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>\n): Promise<\n NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {\n __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;\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 pageId: pageId,\n pagePath: options?.pagePath,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1PageOptimization.triggerHomePageOptimization(\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: { pageId: '$[0]', pagePath: '$[1].pagePath' },\n singleArgumentUnchanged: false,\n },\n ['pageId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TriggerHomePageOptimizationOptions {\n /**\n * URL path of the homepage. Usually `/`.\n * @maxLength 1000\n * @minLength 1\n */\n pagePath: string;\n}\n\n/**\n * Retrieves the optimization suggestions generated for a page.\n *\n * Poll this method after a trigger call. The response's `status` reports\n * where the job stands: while generation is still in progress the\n * suggestions are empty and `status` is `IN_PROGRESS`; when it completes,\n * the response carries the full suggestion set with `status` `COMPLETED`.\n * A job that failed reports `FAILED` — trigger again to retry. Suggestions\n * are stored per page — a later trigger for the same page replaces them,\n * and a replaced job's lookup reports `NOT_FOUND`.\n *\n * Look up by `predictionId` (from the trigger call), or by `pageId`.\n * @public\n * @documentationMaturity preview\n * @permissionId seo:suggestions:v1:page_optimization:get_page_optimization_results\n * @applicableIdentity APP\n * @fqn wix.seo.suggestions.v1.PageOptimizationService.GetPageOptimizationResults\n */\nexport async function getPageOptimizationResults(\n options?: GetPageOptimizationResultsOptions\n): Promise<\n NonNullablePaths<\n GetPageOptimizationResultsResponse,\n `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`,\n 4\n > & {\n __applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;\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 predictionId: options?.predictionId,\n pageId: options?.pageId,\n });\n\n const reqOpts =\n ambassadorWixSeoSuggestionsV1PageOptimization.getPageOptimizationResults(\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 predictionId: '$[0].predictionId',\n pageId: '$[0].pageId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetPageOptimizationResultsOptions {\n /**\n * ID of the generation job, from the trigger call.\n * @maxLength 200\n */\n predictionId?: string | null;\n /**\n * ID of the page to retrieve suggestions for. An alternative to\n * `predictionId` — returns the page's latest generation.\n * @maxLength 1000\n */\n pageId?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixSeoSuggestionsV1PageOptimizationServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/seo-tags-suggestions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/seo-suggestions/v1',\n destPath: '/v1',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_page-optimization';\n\n/**\n * Starts generating optimization suggestions for a site page.\n *\n * The suggestions target the page's focus keyword, so set it first: run\n * keyword research, set the chosen keyword as the page's focus keyword,\n * then trigger. Returns a `predictionId` to poll Get Page Optimization\n * Results with.\n *\n * Triggering is idempotent per page: while a generation for the page is in\n * progress, calling again returns the same `predictionId` instead of\n * starting a new job — unless the page's focus keyword changed since the\n * job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.\n */\nexport function triggerPageOptimization(\n payload: object\n): RequestOptionsFactory<any> {\n function __triggerPageOptimization({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.page_optimization',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.PageOptimizationService.TriggerPageOptimization',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1PageOptimizationServiceUrl({\n protoPath: '/v1/page-optimization/trigger',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __triggerPageOptimization;\n}\n\n/**\n * Starts generating optimization suggestions for the site's homepage.\n *\n * The homepage gets its own method because its suggestions are generated\n * with homepage-specific guidance — representing the whole site, not one\n * topic. Same contract as Trigger Page Optimization: the homepage's focus\n * keyword must be set first, the call returns a `predictionId` to poll,\n * and triggering is idempotent per page while a job is in progress.\n */\nexport function triggerHomePageOptimization(\n payload: object\n): RequestOptionsFactory<any> {\n function __triggerHomePageOptimization({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.page_optimization',\n method: 'POST' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1PageOptimizationServiceUrl({\n protoPath: '/v1/page-optimization/trigger-home',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __triggerHomePageOptimization;\n}\n\n/**\n * Retrieves the optimization suggestions generated for a page.\n *\n * Poll this method after a trigger call. The response's `status` reports\n * where the job stands: while generation is still in progress the\n * suggestions are empty and `status` is `IN_PROGRESS`; when it completes,\n * the response carries the full suggestion set with `status` `COMPLETED`.\n * A job that failed reports `FAILED` — trigger again to retry. Suggestions\n * are stored per page — a later trigger for the same page replaces them,\n * and a replaced job's lookup reports `NOT_FOUND`.\n *\n * Look up by `predictionId` (from the trigger call), or by `pageId`.\n */\nexport function getPageOptimizationResults(\n payload: object\n): RequestOptionsFactory<any> {\n function __getPageOptimizationResults({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.seo.suggestions.v1.page_optimization',\n method: 'GET' as any,\n methodFqn:\n 'wix.seo.suggestions.v1.PageOptimizationService.GetPageOptimizationResults',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSeoSuggestionsV1PageOptimizationServiceUrl({\n protoPath: '/v1/page-optimization/results',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getPageOptimizationResults;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetPageOptimizationResultsApplicationErrors,\n GetPageOptimizationResultsOptions,\n GetPageOptimizationResultsResponse,\n TriggerHomePageOptimizationApplicationErrors,\n TriggerHomePageOptimizationOptions,\n TriggerHomePageOptimizationResponse,\n TriggerPageOptimizationApplicationErrors,\n TriggerPageOptimizationOptions,\n TriggerPageOptimizationResponse,\n getPageOptimizationResults as universalGetPageOptimizationResults,\n triggerHomePageOptimization as universalTriggerHomePageOptimization,\n triggerPageOptimization as universalTriggerPageOptimization,\n} from './seo-suggestions-v1-page-optimization-page-optimization.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function triggerPageOptimization(\n httpClient: HttpClient\n): TriggerPageOptimizationSignature {\n return (\n pageId: string,\n options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>\n ) =>\n universalTriggerPageOptimization(\n pageId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TriggerPageOptimizationSignature {\n /**\n * Starts generating optimization suggestions for a site page.\n *\n * The suggestions target the page's focus keyword, so set it first: run\n * keyword research, set the chosen keyword as the page's focus keyword,\n * then trigger. Returns a `predictionId` to poll Get Page Optimization\n * Results with.\n *\n * Triggering is idempotent per page: while a generation for the page is in\n * progress, calling again returns the same `predictionId` instead of\n * starting a new job — unless the page's focus keyword changed since the\n * job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.\n * @param - ID of the site page to optimize.\n */\n (\n pageId: string,\n options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>\n ): Promise<\n NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {\n __applicationErrorsType?: TriggerPageOptimizationApplicationErrors;\n }\n >;\n}\n\nexport function triggerHomePageOptimization(\n httpClient: HttpClient\n): TriggerHomePageOptimizationSignature {\n return (\n pageId: string,\n options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>\n ) =>\n universalTriggerHomePageOptimization(\n pageId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TriggerHomePageOptimizationSignature {\n /**\n * Starts generating optimization suggestions for the site's homepage.\n *\n * The homepage gets its own method because its suggestions are generated\n * with homepage-specific guidance — representing the whole site, not one\n * topic. Same contract as Trigger Page Optimization: the homepage's focus\n * keyword must be set first, the call returns a `predictionId` to poll,\n * and triggering is idempotent per page while a job is in progress.\n * @param - ID of the site's homepage.\n */\n (\n pageId: string,\n options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>\n ): Promise<\n NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {\n __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;\n }\n >;\n}\n\nexport function getPageOptimizationResults(\n httpClient: HttpClient\n): GetPageOptimizationResultsSignature {\n return (options?: GetPageOptimizationResultsOptions) =>\n universalGetPageOptimizationResults(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPageOptimizationResultsSignature {\n /**\n * Retrieves the optimization suggestions generated for a page.\n *\n * Poll this method after a trigger call. The response's `status` reports\n * where the job stands: while generation is still in progress the\n * suggestions are empty and `status` is `IN_PROGRESS`; when it completes,\n * the response carries the full suggestion set with `status` `COMPLETED`.\n * A job that failed reports `FAILED` — trigger again to retry. Suggestions\n * are stored per page — a later trigger for the same page replaces them,\n * and a replaced job's lookup reports `NOT_FOUND`.\n *\n * Look up by `predictionId` (from the trigger call), or by `pageId`.\n */\n (options?: GetPageOptimizationResultsOptions): Promise<\n NonNullablePaths<\n GetPageOptimizationResultsResponse,\n | `pageOptimization.metaTitle.after`\n | `pageOptimization.content`\n | `status`,\n 4\n > & {\n __applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;\n }\n >;\n}\n\nexport {\n GetPageOptimizationResultsOptions,\n GetPageOptimizationResultsRequest,\n GetPageOptimizationResultsResponse,\n OptimizationStatus,\n PageOptimization,\n TextSuggestion,\n TriggerHomePageOptimizationOptions,\n TriggerHomePageOptimizationRequest,\n TriggerHomePageOptimizationResponse,\n TriggerPageOptimizationOptions,\n TriggerPageOptimizationRequest,\n TriggerPageOptimizationResponse,\n} from './seo-suggestions-v1-page-optimization-page-optimization.universal.js';\n","import {\n triggerPageOptimization as publicTriggerPageOptimization,\n triggerHomePageOptimization as publicTriggerHomePageOptimization,\n getPageOptimizationResults as publicGetPageOptimizationResults,\n} from './seo-suggestions-v1-page-optimization-page-optimization.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const triggerPageOptimization: MaybeContext<\n BuildRESTFunction<typeof publicTriggerPageOptimization> &\n typeof publicTriggerPageOptimization\n> = /*#__PURE__*/ createRESTModule(publicTriggerPageOptimization);\nexport const triggerHomePageOptimization: MaybeContext<\n BuildRESTFunction<typeof publicTriggerHomePageOptimization> &\n typeof publicTriggerHomePageOptimization\n> = /*#__PURE__*/ createRESTModule(publicTriggerHomePageOptimization);\nexport const getPageOptimizationResults: MaybeContext<\n BuildRESTFunction<typeof publicGetPageOptimizationResults> &\n typeof publicGetPageOptimizationResults\n> = /*#__PURE__*/ createRESTModule(publicGetPageOptimizationResults);\n\nexport { OptimizationStatus } from './seo-suggestions-v1-page-optimization-page-optimization.universal.js';\nexport {\n PageOptimization,\n TextSuggestion,\n TriggerPageOptimizationRequest,\n TriggerPageOptimizationResponse,\n TriggerHomePageOptimizationRequest,\n TriggerHomePageOptimizationResponse,\n GetPageOptimizationResultsRequest,\n GetPageOptimizationResultsResponse,\n TriggerPageOptimizationOptions,\n TriggerHomePageOptimizationOptions,\n GetPageOptimizationResultsOptions,\n} from './seo-suggestions-v1-page-optimization-page-optimization.universal.js';\nexport {\n OptimizationStatusWithLiterals,\n TriggerPageOptimizationApplicationErrors,\n TriggerHomePageOptimizationApplicationErrors,\n GetPageOptimizationResultsApplicationErrors,\n} from './seo-suggestions-v1-page-optimization-page-optimization.universal.js';\n"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SAAS;AAAA,IACvB,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAC0C;AAAA,IAC5C;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE5bO,SAASG,yBACd,YACkC;AAClC,SAAO,CACL,QACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA2BO,SAASC,6BACd,YACsC;AACtC,SAAO,CACL,QACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClGA,IAAAC,uBAAiC;AAG1B,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAMC,8BAGK,2DAAiBA,2BAAgC;","names":["getPageOptimizationResults","triggerHomePageOptimization","triggerPageOptimization","import_rest_modules","OptimizationStatus","triggerPageOptimization","sdkTransformError","triggerHomePageOptimization","getPageOptimizationResults","triggerPageOptimization","triggerHomePageOptimization","getPageOptimizationResults","import_rest_modules","triggerPageOptimization","triggerHomePageOptimization","getPageOptimizationResults"]}
|