@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.
@@ -0,0 +1,224 @@
1
+ import { TriggerPageOptimizationRequest as TriggerPageOptimizationRequest$1, TriggerPageOptimizationResponse as TriggerPageOptimizationResponse$1, TriggerHomePageOptimizationRequest as TriggerHomePageOptimizationRequest$1, TriggerHomePageOptimizationResponse as TriggerHomePageOptimizationResponse$1, GetPageOptimizationResultsRequest as GetPageOptimizationResultsRequest$1, GetPageOptimizationResultsResponse as GetPageOptimizationResultsResponse$1 } from './index.typings.js';
2
+ import '@wix/sdk-types';
3
+
4
+ /**
5
+ * A whole-page set of SEO optimization suggestions, generated for one page
6
+ * and focus keyword.
7
+ *
8
+ * Each suggestion is a before/after pair: `before` is the page's current
9
+ * text (empty when the page has none, such as a missing meta description),
10
+ * and `after` is the suggested replacement. Locate the element to change by
11
+ * its `before` text.
12
+ */
13
+ interface PageOptimization {
14
+ /**
15
+ * ID of this suggestion set.
16
+ * @format GUID
17
+ * @readonly
18
+ */
19
+ id?: string | null;
20
+ /**
21
+ * Suggested title tag.
22
+ * @readonly
23
+ */
24
+ metaTitle?: TextSuggestion;
25
+ /**
26
+ * Suggested description tag.
27
+ * @readonly
28
+ */
29
+ metaDescription?: TextSuggestion;
30
+ /**
31
+ * Suggested H1 heading.
32
+ * @readonly
33
+ */
34
+ h1?: TextSuggestion;
35
+ /**
36
+ * Suggested H2 or H3 heading.
37
+ * @readonly
38
+ */
39
+ h2OrH3?: TextSuggestion;
40
+ /**
41
+ * Suggested body text rewrites.
42
+ * @readonly
43
+ * @maxSize 100
44
+ */
45
+ content?: TextSuggestion[];
46
+ }
47
+ /** One suggested text change. */
48
+ interface TextSuggestion {
49
+ /**
50
+ * The page's current text. Empty when the page has no text in this slot —
51
+ * for example, a missing meta description.
52
+ * @readonly
53
+ * @maxLength 1000
54
+ */
55
+ before?: string | null;
56
+ /**
57
+ * The suggested text.
58
+ * @readonly
59
+ * @maxLength 1000
60
+ */
61
+ after?: string;
62
+ }
63
+ interface TriggerPageOptimizationRequest {
64
+ /**
65
+ * ID of the site page to optimize.
66
+ * @maxLength 1000
67
+ * @minLength 1
68
+ */
69
+ pageId: string;
70
+ /**
71
+ * URL path of the page, relative to the site's domain. For example,
72
+ * `/about`.
73
+ * @maxLength 1000
74
+ * @minLength 1
75
+ */
76
+ pagePath: string;
77
+ }
78
+ interface TriggerPageOptimizationResponse {
79
+ /**
80
+ * ID of the generation job. Pass to Get Page Optimization Results.
81
+ * @readonly
82
+ * @maxLength 200
83
+ */
84
+ predictionId?: string;
85
+ }
86
+ interface TriggerHomePageOptimizationRequest {
87
+ /**
88
+ * ID of the site's homepage.
89
+ * @maxLength 1000
90
+ * @minLength 1
91
+ */
92
+ pageId: string;
93
+ /**
94
+ * URL path of the homepage. Usually `/`.
95
+ * @maxLength 1000
96
+ * @minLength 1
97
+ */
98
+ pagePath: string;
99
+ }
100
+ interface TriggerHomePageOptimizationResponse {
101
+ /**
102
+ * ID of the generation job. Pass to Get Page Optimization Results.
103
+ * @readonly
104
+ * @maxLength 200
105
+ */
106
+ predictionId?: string;
107
+ }
108
+ interface GetPageOptimizationResultsRequest {
109
+ /**
110
+ * ID of the generation job, from the trigger call.
111
+ * @maxLength 200
112
+ */
113
+ predictionId?: string | null;
114
+ /**
115
+ * ID of the page to retrieve suggestions for. An alternative to
116
+ * `predictionId` — returns the page's latest generation.
117
+ * @maxLength 1000
118
+ */
119
+ pageId?: string | null;
120
+ }
121
+ interface GetPageOptimizationResultsResponse {
122
+ /** The generated suggestions. Returned only when `status` is `COMPLETED`. */
123
+ pageOptimization?: PageOptimization;
124
+ /**
125
+ * Status of the generation job the lookup matched.
126
+ * @readonly
127
+ */
128
+ status?: OptimizationStatusWithLiterals;
129
+ }
130
+ /** Status of a page optimization generation job. */
131
+ declare enum OptimizationStatus {
132
+ UNKNOWN_OPTIMIZATION_STATUS = "UNKNOWN_OPTIMIZATION_STATUS",
133
+ /**
134
+ * No generation job matches the lookup — it never existed, or a later
135
+ * trigger for the same page replaced it.
136
+ */
137
+ NOT_FOUND = "NOT_FOUND",
138
+ /** Generation is still running. Poll again. */
139
+ IN_PROGRESS = "IN_PROGRESS",
140
+ /** Generation finished; the response carries the suggestions. */
141
+ COMPLETED = "COMPLETED",
142
+ /** Generation failed. Trigger again to retry. */
143
+ FAILED = "FAILED"
144
+ }
145
+ /** @enumType */
146
+ type OptimizationStatusWithLiterals = OptimizationStatus | 'UNKNOWN_OPTIMIZATION_STATUS' | 'NOT_FOUND' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
147
+ /** @docsIgnore */
148
+ type TriggerPageOptimizationApplicationErrors = {
149
+ code?: 'SITE_NOT_SUPPORTED';
150
+ description?: string;
151
+ data?: Record<string, any>;
152
+ } | {
153
+ code?: 'FOCUS_KEYWORD_NOT_SET';
154
+ description?: string;
155
+ data?: Record<string, any>;
156
+ } | {
157
+ code?: 'CONTENT_TOO_SHORT';
158
+ description?: string;
159
+ data?: Record<string, any>;
160
+ } | {
161
+ code?: 'SUGGESTIONS_ALREADY_IN_PROGRESS';
162
+ description?: string;
163
+ data?: Record<string, any>;
164
+ } | {
165
+ code?: 'GENERATION_FAILED';
166
+ description?: string;
167
+ data?: Record<string, any>;
168
+ } | {
169
+ code?: 'QUOTA_LIMIT_REACHED';
170
+ description?: string;
171
+ data?: Record<string, any>;
172
+ };
173
+ /** @docsIgnore */
174
+ type TriggerHomePageOptimizationApplicationErrors = {
175
+ code?: 'SITE_NOT_SUPPORTED';
176
+ description?: string;
177
+ data?: Record<string, any>;
178
+ } | {
179
+ code?: 'FOCUS_KEYWORD_NOT_SET';
180
+ description?: string;
181
+ data?: Record<string, any>;
182
+ } | {
183
+ code?: 'CONTENT_TOO_SHORT';
184
+ description?: string;
185
+ data?: Record<string, any>;
186
+ } | {
187
+ code?: 'SUGGESTIONS_ALREADY_IN_PROGRESS';
188
+ description?: string;
189
+ data?: Record<string, any>;
190
+ } | {
191
+ code?: 'GENERATION_FAILED';
192
+ description?: string;
193
+ data?: Record<string, any>;
194
+ } | {
195
+ code?: 'QUOTA_LIMIT_REACHED';
196
+ description?: string;
197
+ data?: Record<string, any>;
198
+ };
199
+ /** @docsIgnore */
200
+ type GetPageOptimizationResultsApplicationErrors = {
201
+ code?: 'GENERATION_FAILED';
202
+ description?: string;
203
+ data?: Record<string, any>;
204
+ } | {
205
+ code?: 'QUOTA_LIMIT_REACHED';
206
+ description?: string;
207
+ data?: Record<string, any>;
208
+ };
209
+
210
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
211
+ getUrl: (context: any) => string;
212
+ httpMethod: K;
213
+ path: string;
214
+ pathParams: M;
215
+ __requestType: T;
216
+ __originalRequestType: S;
217
+ __responseType: Q;
218
+ __originalResponseType: R;
219
+ };
220
+ declare function triggerPageOptimization(): __PublicMethodMetaInfo<'POST', {}, TriggerPageOptimizationRequest$1, TriggerPageOptimizationRequest, TriggerPageOptimizationResponse$1, TriggerPageOptimizationResponse>;
221
+ declare function triggerHomePageOptimization(): __PublicMethodMetaInfo<'POST', {}, TriggerHomePageOptimizationRequest$1, TriggerHomePageOptimizationRequest, TriggerHomePageOptimizationResponse$1, TriggerHomePageOptimizationResponse>;
222
+ declare function getPageOptimizationResults(): __PublicMethodMetaInfo<'GET', {}, GetPageOptimizationResultsRequest$1, GetPageOptimizationResultsRequest, GetPageOptimizationResultsResponse$1, GetPageOptimizationResultsResponse>;
223
+
224
+ export { type GetPageOptimizationResultsApplicationErrors as GetPageOptimizationResultsApplicationErrorsOriginal, type GetPageOptimizationResultsRequest as GetPageOptimizationResultsRequestOriginal, type GetPageOptimizationResultsResponse as GetPageOptimizationResultsResponseOriginal, OptimizationStatus as OptimizationStatusOriginal, type OptimizationStatusWithLiterals as OptimizationStatusWithLiteralsOriginal, type PageOptimization as PageOptimizationOriginal, type TextSuggestion as TextSuggestionOriginal, type TriggerHomePageOptimizationApplicationErrors as TriggerHomePageOptimizationApplicationErrorsOriginal, type TriggerHomePageOptimizationRequest as TriggerHomePageOptimizationRequestOriginal, type TriggerHomePageOptimizationResponse as TriggerHomePageOptimizationResponseOriginal, type TriggerPageOptimizationApplicationErrors as TriggerPageOptimizationApplicationErrorsOriginal, type TriggerPageOptimizationRequest as TriggerPageOptimizationRequestOriginal, type TriggerPageOptimizationResponse as TriggerPageOptimizationResponseOriginal, type __PublicMethodMetaInfo, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
@@ -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.mjs';
3
+ export { GetPageOptimizationResultsRequest, OptimizationStatus, OptimizationStatusWithLiterals, PageOptimization, TextSuggestion, TriggerHomePageOptimizationRequest, TriggerPageOptimizationRequest } from './index.typings.mjs';
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,306 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ /**
4
+ * A whole-page set of SEO optimization suggestions, generated for one page
5
+ * and focus keyword.
6
+ *
7
+ * Each suggestion is a before/after pair: `before` is the page's current
8
+ * text (empty when the page has none, such as a missing meta description),
9
+ * and `after` is the suggested replacement. Locate the element to change by
10
+ * its `before` text.
11
+ */
12
+ interface PageOptimization {
13
+ /**
14
+ * ID of this suggestion set.
15
+ * @format GUID
16
+ * @readonly
17
+ */
18
+ _id?: string | null;
19
+ /**
20
+ * Suggested title tag.
21
+ * @readonly
22
+ */
23
+ metaTitle?: TextSuggestion;
24
+ /**
25
+ * Suggested description tag.
26
+ * @readonly
27
+ */
28
+ metaDescription?: TextSuggestion;
29
+ /**
30
+ * Suggested H1 heading.
31
+ * @readonly
32
+ */
33
+ h1?: TextSuggestion;
34
+ /**
35
+ * Suggested H2 or H3 heading.
36
+ * @readonly
37
+ */
38
+ h2OrH3?: TextSuggestion;
39
+ /**
40
+ * Suggested body text rewrites.
41
+ * @readonly
42
+ * @maxSize 100
43
+ */
44
+ content?: TextSuggestion[];
45
+ }
46
+ /** One suggested text change. */
47
+ interface TextSuggestion {
48
+ /**
49
+ * The page's current text. Empty when the page has no text in this slot —
50
+ * for example, a missing meta description.
51
+ * @readonly
52
+ * @maxLength 1000
53
+ */
54
+ before?: string | null;
55
+ /**
56
+ * The suggested text.
57
+ * @readonly
58
+ * @maxLength 1000
59
+ */
60
+ after?: string;
61
+ }
62
+ interface TriggerPageOptimizationRequest {
63
+ /**
64
+ * ID of the site page to optimize.
65
+ * @maxLength 1000
66
+ * @minLength 1
67
+ */
68
+ pageId: string;
69
+ /**
70
+ * URL path of the page, relative to the site's domain. For example,
71
+ * `/about`.
72
+ * @maxLength 1000
73
+ * @minLength 1
74
+ */
75
+ pagePath: string;
76
+ }
77
+ interface TriggerPageOptimizationResponse {
78
+ /**
79
+ * ID of the generation job. Pass to Get Page Optimization Results.
80
+ * @readonly
81
+ * @maxLength 200
82
+ */
83
+ predictionId?: string;
84
+ }
85
+ interface TriggerHomePageOptimizationRequest {
86
+ /**
87
+ * ID of the site's homepage.
88
+ * @maxLength 1000
89
+ * @minLength 1
90
+ */
91
+ pageId: string;
92
+ /**
93
+ * URL path of the homepage. Usually `/`.
94
+ * @maxLength 1000
95
+ * @minLength 1
96
+ */
97
+ pagePath: string;
98
+ }
99
+ interface TriggerHomePageOptimizationResponse {
100
+ /**
101
+ * ID of the generation job. Pass to Get Page Optimization Results.
102
+ * @readonly
103
+ * @maxLength 200
104
+ */
105
+ predictionId?: string;
106
+ }
107
+ interface GetPageOptimizationResultsRequest {
108
+ /**
109
+ * ID of the generation job, from the trigger call.
110
+ * @maxLength 200
111
+ */
112
+ predictionId?: string | null;
113
+ /**
114
+ * ID of the page to retrieve suggestions for. An alternative to
115
+ * `predictionId` — returns the page's latest generation.
116
+ * @maxLength 1000
117
+ */
118
+ pageId?: string | null;
119
+ }
120
+ interface GetPageOptimizationResultsResponse {
121
+ /** The generated suggestions. Returned only when `status` is `COMPLETED`. */
122
+ pageOptimization?: PageOptimization;
123
+ /**
124
+ * Status of the generation job the lookup matched.
125
+ * @readonly
126
+ */
127
+ status?: OptimizationStatusWithLiterals;
128
+ }
129
+ /** Status of a page optimization generation job. */
130
+ declare enum OptimizationStatus {
131
+ UNKNOWN_OPTIMIZATION_STATUS = "UNKNOWN_OPTIMIZATION_STATUS",
132
+ /**
133
+ * No generation job matches the lookup — it never existed, or a later
134
+ * trigger for the same page replaced it.
135
+ */
136
+ NOT_FOUND = "NOT_FOUND",
137
+ /** Generation is still running. Poll again. */
138
+ IN_PROGRESS = "IN_PROGRESS",
139
+ /** Generation finished; the response carries the suggestions. */
140
+ COMPLETED = "COMPLETED",
141
+ /** Generation failed. Trigger again to retry. */
142
+ FAILED = "FAILED"
143
+ }
144
+ /** @enumType */
145
+ type OptimizationStatusWithLiterals = OptimizationStatus | 'UNKNOWN_OPTIMIZATION_STATUS' | 'NOT_FOUND' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
146
+ /** @docsIgnore */
147
+ type TriggerPageOptimizationApplicationErrors = {
148
+ code?: 'SITE_NOT_SUPPORTED';
149
+ description?: string;
150
+ data?: Record<string, any>;
151
+ } | {
152
+ code?: 'FOCUS_KEYWORD_NOT_SET';
153
+ description?: string;
154
+ data?: Record<string, any>;
155
+ } | {
156
+ code?: 'CONTENT_TOO_SHORT';
157
+ description?: string;
158
+ data?: Record<string, any>;
159
+ } | {
160
+ code?: 'SUGGESTIONS_ALREADY_IN_PROGRESS';
161
+ description?: string;
162
+ data?: Record<string, any>;
163
+ } | {
164
+ code?: 'GENERATION_FAILED';
165
+ description?: string;
166
+ data?: Record<string, any>;
167
+ } | {
168
+ code?: 'QUOTA_LIMIT_REACHED';
169
+ description?: string;
170
+ data?: Record<string, any>;
171
+ };
172
+ /** @docsIgnore */
173
+ type TriggerHomePageOptimizationApplicationErrors = {
174
+ code?: 'SITE_NOT_SUPPORTED';
175
+ description?: string;
176
+ data?: Record<string, any>;
177
+ } | {
178
+ code?: 'FOCUS_KEYWORD_NOT_SET';
179
+ description?: string;
180
+ data?: Record<string, any>;
181
+ } | {
182
+ code?: 'CONTENT_TOO_SHORT';
183
+ description?: string;
184
+ data?: Record<string, any>;
185
+ } | {
186
+ code?: 'SUGGESTIONS_ALREADY_IN_PROGRESS';
187
+ description?: string;
188
+ data?: Record<string, any>;
189
+ } | {
190
+ code?: 'GENERATION_FAILED';
191
+ description?: string;
192
+ data?: Record<string, any>;
193
+ } | {
194
+ code?: 'QUOTA_LIMIT_REACHED';
195
+ description?: string;
196
+ data?: Record<string, any>;
197
+ };
198
+ /** @docsIgnore */
199
+ type GetPageOptimizationResultsApplicationErrors = {
200
+ code?: 'GENERATION_FAILED';
201
+ description?: string;
202
+ data?: Record<string, any>;
203
+ } | {
204
+ code?: 'QUOTA_LIMIT_REACHED';
205
+ description?: string;
206
+ data?: Record<string, any>;
207
+ };
208
+ /**
209
+ * Starts generating optimization suggestions for a site page.
210
+ *
211
+ * The suggestions target the page's focus keyword, so set it first: run
212
+ * keyword research, set the chosen keyword as the page's focus keyword,
213
+ * then trigger. Returns a `predictionId` to poll Get Page Optimization
214
+ * Results with.
215
+ *
216
+ * Triggering is idempotent per page: while a generation for the page is in
217
+ * progress, calling again returns the same `predictionId` instead of
218
+ * starting a new job — unless the page's focus keyword changed since the
219
+ * job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.
220
+ * @param pageId - ID of the site page to optimize.
221
+ * @public
222
+ * @documentationMaturity preview
223
+ * @requiredField options
224
+ * @requiredField options.pagePath
225
+ * @requiredField pageId
226
+ * @permissionId seo:suggestions:v1:page_optimization:trigger_page_optimization
227
+ * @applicableIdentity APP
228
+ * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerPageOptimization
229
+ */
230
+ declare function triggerPageOptimization(pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {
231
+ __applicationErrorsType?: TriggerPageOptimizationApplicationErrors;
232
+ }>;
233
+ interface TriggerPageOptimizationOptions {
234
+ /**
235
+ * URL path of the page, relative to the site's domain. For example,
236
+ * `/about`.
237
+ * @maxLength 1000
238
+ * @minLength 1
239
+ */
240
+ pagePath: string;
241
+ }
242
+ /**
243
+ * Starts generating optimization suggestions for the site's homepage.
244
+ *
245
+ * The homepage gets its own method because its suggestions are generated
246
+ * with homepage-specific guidance — representing the whole site, not one
247
+ * topic. Same contract as Trigger Page Optimization: the homepage's focus
248
+ * keyword must be set first, the call returns a `predictionId` to poll,
249
+ * and triggering is idempotent per page while a job is in progress.
250
+ * @param pageId - ID of the site's homepage.
251
+ * @public
252
+ * @documentationMaturity preview
253
+ * @requiredField options
254
+ * @requiredField options.pagePath
255
+ * @requiredField pageId
256
+ * @permissionId seo:suggestions:v1:page_optimization:trigger_home_page_optimization
257
+ * @applicableIdentity APP
258
+ * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization
259
+ */
260
+ declare function triggerHomePageOptimization(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {
261
+ __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
262
+ }>;
263
+ interface TriggerHomePageOptimizationOptions {
264
+ /**
265
+ * URL path of the homepage. Usually `/`.
266
+ * @maxLength 1000
267
+ * @minLength 1
268
+ */
269
+ pagePath: string;
270
+ }
271
+ /**
272
+ * Retrieves the optimization suggestions generated for a page.
273
+ *
274
+ * Poll this method after a trigger call. The response's `status` reports
275
+ * where the job stands: while generation is still in progress the
276
+ * suggestions are empty and `status` is `IN_PROGRESS`; when it completes,
277
+ * the response carries the full suggestion set with `status` `COMPLETED`.
278
+ * A job that failed reports `FAILED` — trigger again to retry. Suggestions
279
+ * are stored per page — a later trigger for the same page replaces them,
280
+ * and a replaced job's lookup reports `NOT_FOUND`.
281
+ *
282
+ * Look up by `predictionId` (from the trigger call), or by `pageId`.
283
+ * @public
284
+ * @documentationMaturity preview
285
+ * @permissionId seo:suggestions:v1:page_optimization:get_page_optimization_results
286
+ * @applicableIdentity APP
287
+ * @fqn wix.seo.suggestions.v1.PageOptimizationService.GetPageOptimizationResults
288
+ */
289
+ declare function getPageOptimizationResults(options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 4> & {
290
+ __applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;
291
+ }>;
292
+ interface GetPageOptimizationResultsOptions {
293
+ /**
294
+ * ID of the generation job, from the trigger call.
295
+ * @maxLength 200
296
+ */
297
+ predictionId?: string | null;
298
+ /**
299
+ * ID of the page to retrieve suggestions for. An alternative to
300
+ * `predictionId` — returns the page's latest generation.
301
+ * @maxLength 1000
302
+ */
303
+ pageId?: string | null;
304
+ }
305
+
306
+ export { type GetPageOptimizationResultsApplicationErrors, type GetPageOptimizationResultsOptions, type GetPageOptimizationResultsRequest, type GetPageOptimizationResultsResponse, OptimizationStatus, type OptimizationStatusWithLiterals, type PageOptimization, type TextSuggestion, type TriggerHomePageOptimizationApplicationErrors, type TriggerHomePageOptimizationOptions, type TriggerHomePageOptimizationRequest, type TriggerHomePageOptimizationResponse, type TriggerPageOptimizationApplicationErrors, type TriggerPageOptimizationOptions, type TriggerPageOptimizationRequest, type TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };