@wix/auto_sdk_seo_page-optimization 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,8 @@ import { NonNullablePaths } from '@wix/sdk-types';
7
7
  * Each suggestion is a before/after pair: `before` is the page's current
8
8
  * text (empty when the page has none, such as a missing meta description),
9
9
  * and `after` is the suggested replacement. Locate the element to change by
10
- * its `before` text.
10
+ * its `before` text. Suggestions are stored per page, so a later generation
11
+ * for the same page replaces this set.
11
12
  */
12
13
  interface PageOptimization {
13
14
  /**
@@ -32,12 +33,12 @@ interface PageOptimization {
32
33
  */
33
34
  h1?: TextSuggestion;
34
35
  /**
35
- * Suggested H2 or H3 heading.
36
+ * Suggested subheading, for an H2 or H3 element of the page.
36
37
  * @readonly
37
38
  */
38
39
  h2OrH3?: TextSuggestion;
39
40
  /**
40
- * Suggested body text rewrites.
41
+ * Suggested rewrites of the page's body text, one per text element.
41
42
  * @readonly
42
43
  * @maxSize 100
43
44
  */
@@ -61,7 +62,7 @@ interface TextSuggestion {
61
62
  }
62
63
  interface TriggerPageOptimizationRequest {
63
64
  /**
64
- * ID of the site page to optimize.
65
+ * ID of the site page to optimize. The page's focus keyword must be set.
65
66
  * @maxLength 1000
66
67
  * @minLength 1
67
68
  */
@@ -106,7 +107,8 @@ interface TriggerHomePageOptimizationResponse {
106
107
  }
107
108
  interface GetPageOptimizationResultsRequest {
108
109
  /**
109
- * ID of the generation job, from the trigger call.
110
+ * ID of the generation job, from the trigger call. Can be looked up for 2
111
+ * hours after the trigger call.
110
112
  * @maxLength 200
111
113
  */
112
114
  predictionId?: string | null;
@@ -128,6 +130,7 @@ interface GetPageOptimizationResultsResponse {
128
130
  }
129
131
  /** Status of a page optimization generation job. */
130
132
  declare enum OptimizationStatus {
133
+ /** Unknown status. */
131
134
  UNKNOWN_OPTIMIZATION_STATUS = "UNKNOWN_OPTIMIZATION_STATUS",
132
135
  /**
133
136
  * No generation job matches the lookup. It never existed, or a later
@@ -217,7 +220,7 @@ type GetPageOptimizationResultsApplicationErrors = {
217
220
  * progress, calling again returns the same `predictionId` instead of
218
221
  * starting a new job, unless the page's focus keyword changed since the
219
222
  * job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.
220
- * @param pageId - ID of the site page to optimize.
223
+ * @param pageId - ID of the site page to optimize. The page's focus keyword must be set.
221
224
  * @public
222
225
  * @documentationMaturity preview
223
226
  * @requiredField options
@@ -227,7 +230,7 @@ type GetPageOptimizationResultsApplicationErrors = {
227
230
  * @applicableIdentity APP
228
231
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerPageOptimization
229
232
  */
230
- declare function triggerPageOptimization(pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {
233
+ declare function triggerPageOptimization(pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 0> & {
231
234
  __applicationErrorsType?: TriggerPageOptimizationApplicationErrors;
232
235
  }>;
233
236
  interface TriggerPageOptimizationOptions {
@@ -257,7 +260,7 @@ interface TriggerPageOptimizationOptions {
257
260
  * @applicableIdentity APP
258
261
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization
259
262
  */
260
- declare function triggerHomePageOptimization(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {
263
+ declare function triggerHomePageOptimization(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 0> & {
261
264
  __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
262
265
  }>;
263
266
  interface TriggerHomePageOptimizationOptions {
@@ -279,19 +282,22 @@ interface TriggerHomePageOptimizationOptions {
279
282
  * are stored per page, so a later trigger for the same page replaces them,
280
283
  * and a replaced job's lookup reports `NOT_FOUND`.
281
284
  *
282
- * Look up by `predictionId` (from the trigger call), or by `pageId`.
285
+ * Look up by `predictionId` (from the trigger call), or by `pageId`. A
286
+ * `predictionId` can be looked up for 2 hours after the trigger call; after
287
+ * that, look up by `pageId`, which returns the page's latest generation.
283
288
  * @public
284
289
  * @documentationMaturity preview
285
290
  * @permissionId seo:suggestions:v1:page_optimization:get_page_optimization_results
286
291
  * @applicableIdentity APP
287
292
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.GetPageOptimizationResults
288
293
  */
289
- declare function getPageOptimizationResults(options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 4> & {
294
+ declare function getPageOptimizationResults(options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 2> & {
290
295
  __applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;
291
296
  }>;
292
297
  interface GetPageOptimizationResultsOptions {
293
298
  /**
294
- * ID of the generation job, from the trigger call.
299
+ * ID of the generation job, from the trigger call. Can be looked up for 2
300
+ * hours after the trigger call.
295
301
  * @maxLength 200
296
302
  */
297
303
  predictionId?: string | null;
@@ -8,7 +8,8 @@ import '@wix/sdk-types';
8
8
  * Each suggestion is a before/after pair: `before` is the page's current
9
9
  * text (empty when the page has none, such as a missing meta description),
10
10
  * and `after` is the suggested replacement. Locate the element to change by
11
- * its `before` text.
11
+ * its `before` text. Suggestions are stored per page, so a later generation
12
+ * for the same page replaces this set.
12
13
  */
13
14
  interface PageOptimization {
14
15
  /**
@@ -33,12 +34,12 @@ interface PageOptimization {
33
34
  */
34
35
  h1?: TextSuggestion;
35
36
  /**
36
- * Suggested H2 or H3 heading.
37
+ * Suggested subheading, for an H2 or H3 element of the page.
37
38
  * @readonly
38
39
  */
39
40
  h2OrH3?: TextSuggestion;
40
41
  /**
41
- * Suggested body text rewrites.
42
+ * Suggested rewrites of the page's body text, one per text element.
42
43
  * @readonly
43
44
  * @maxSize 100
44
45
  */
@@ -62,7 +63,7 @@ interface TextSuggestion {
62
63
  }
63
64
  interface TriggerPageOptimizationRequest {
64
65
  /**
65
- * ID of the site page to optimize.
66
+ * ID of the site page to optimize. The page's focus keyword must be set.
66
67
  * @maxLength 1000
67
68
  * @minLength 1
68
69
  */
@@ -107,7 +108,8 @@ interface TriggerHomePageOptimizationResponse {
107
108
  }
108
109
  interface GetPageOptimizationResultsRequest {
109
110
  /**
110
- * ID of the generation job, from the trigger call.
111
+ * ID of the generation job, from the trigger call. Can be looked up for 2
112
+ * hours after the trigger call.
111
113
  * @maxLength 200
112
114
  */
113
115
  predictionId?: string | null;
@@ -129,6 +131,7 @@ interface GetPageOptimizationResultsResponse {
129
131
  }
130
132
  /** Status of a page optimization generation job. */
131
133
  declare enum OptimizationStatus {
134
+ /** Unknown status. */
132
135
  UNKNOWN_OPTIMIZATION_STATUS = "UNKNOWN_OPTIMIZATION_STATUS",
133
136
  /**
134
137
  * No generation job matches the lookup. It never existed, or a later
@@ -16,9 +16,9 @@ interface TriggerPageOptimizationSignature {
16
16
  * progress, calling again returns the same `predictionId` instead of
17
17
  * starting a new job, unless the page's focus keyword changed since the
18
18
  * job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.
19
- * @param - ID of the site page to optimize.
19
+ * @param - ID of the site page to optimize. The page's focus keyword must be set.
20
20
  */
21
- (pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {
21
+ (pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 0> & {
22
22
  __applicationErrorsType?: TriggerPageOptimizationApplicationErrors;
23
23
  }>;
24
24
  }
@@ -34,7 +34,7 @@ interface TriggerHomePageOptimizationSignature {
34
34
  * and triggering is idempotent per page while a job is in progress.
35
35
  * @param - ID of the site's homepage.
36
36
  */
37
- (pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {
37
+ (pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 0> & {
38
38
  __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
39
39
  }>;
40
40
  }
@@ -51,9 +51,11 @@ interface GetPageOptimizationResultsSignature {
51
51
  * are stored per page, so a later trigger for the same page replaces them,
52
52
  * and a replaced job's lookup reports `NOT_FOUND`.
53
53
  *
54
- * Look up by `predictionId` (from the trigger call), or by `pageId`.
54
+ * Look up by `predictionId` (from the trigger call), or by `pageId`. A
55
+ * `predictionId` can be looked up for 2 hours after the trigger call; after
56
+ * that, look up by `pageId`, which returns the page's latest generation.
55
57
  */
56
- (options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 4> & {
58
+ (options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 2> & {
57
59
  __applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;
58
60
  }>;
59
61
  }
@@ -7,7 +7,8 @@ import { NonNullablePaths } from '@wix/sdk-types';
7
7
  * Each suggestion is a before/after pair: `before` is the page's current
8
8
  * text (empty when the page has none, such as a missing meta description),
9
9
  * and `after` is the suggested replacement. Locate the element to change by
10
- * its `before` text.
10
+ * its `before` text. Suggestions are stored per page, so a later generation
11
+ * for the same page replaces this set.
11
12
  */
12
13
  interface PageOptimization {
13
14
  /**
@@ -32,12 +33,12 @@ interface PageOptimization {
32
33
  */
33
34
  h1?: TextSuggestion;
34
35
  /**
35
- * Suggested H2 or H3 heading.
36
+ * Suggested subheading, for an H2 or H3 element of the page.
36
37
  * @readonly
37
38
  */
38
39
  h2OrH3?: TextSuggestion;
39
40
  /**
40
- * Suggested body text rewrites.
41
+ * Suggested rewrites of the page's body text, one per text element.
41
42
  * @readonly
42
43
  * @maxSize 100
43
44
  */
@@ -61,7 +62,7 @@ interface TextSuggestion {
61
62
  }
62
63
  interface TriggerPageOptimizationRequest {
63
64
  /**
64
- * ID of the site page to optimize.
65
+ * ID of the site page to optimize. The page's focus keyword must be set.
65
66
  * @maxLength 1000
66
67
  * @minLength 1
67
68
  */
@@ -106,7 +107,8 @@ interface TriggerHomePageOptimizationResponse {
106
107
  }
107
108
  interface GetPageOptimizationResultsRequest {
108
109
  /**
109
- * ID of the generation job, from the trigger call.
110
+ * ID of the generation job, from the trigger call. Can be looked up for 2
111
+ * hours after the trigger call.
110
112
  * @maxLength 200
111
113
  */
112
114
  predictionId?: string | null;
@@ -128,6 +130,7 @@ interface GetPageOptimizationResultsResponse {
128
130
  }
129
131
  /** Status of a page optimization generation job. */
130
132
  declare enum OptimizationStatus {
133
+ /** Unknown status. */
131
134
  UNKNOWN_OPTIMIZATION_STATUS = "UNKNOWN_OPTIMIZATION_STATUS",
132
135
  /**
133
136
  * No generation job matches the lookup. It never existed, or a later
@@ -217,7 +220,7 @@ type GetPageOptimizationResultsApplicationErrors = {
217
220
  * progress, calling again returns the same `predictionId` instead of
218
221
  * starting a new job, unless the page's focus keyword changed since the
219
222
  * job started, which returns a `SUGGESTIONS_ALREADY_IN_PROGRESS` error.
220
- * @param pageId - ID of the site page to optimize.
223
+ * @param pageId - ID of the site page to optimize. The page's focus keyword must be set.
221
224
  * @public
222
225
  * @documentationMaturity preview
223
226
  * @requiredField options
@@ -227,7 +230,7 @@ type GetPageOptimizationResultsApplicationErrors = {
227
230
  * @applicableIdentity APP
228
231
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerPageOptimization
229
232
  */
230
- declare function triggerPageOptimization(pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {
233
+ declare function triggerPageOptimization(pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 0> & {
231
234
  __applicationErrorsType?: TriggerPageOptimizationApplicationErrors;
232
235
  }>;
233
236
  interface TriggerPageOptimizationOptions {
@@ -257,7 +260,7 @@ interface TriggerPageOptimizationOptions {
257
260
  * @applicableIdentity APP
258
261
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization
259
262
  */
260
- declare function triggerHomePageOptimization(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {
263
+ declare function triggerHomePageOptimization(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 0> & {
261
264
  __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
262
265
  }>;
263
266
  interface TriggerHomePageOptimizationOptions {
@@ -279,19 +282,22 @@ interface TriggerHomePageOptimizationOptions {
279
282
  * are stored per page, so a later trigger for the same page replaces them,
280
283
  * and a replaced job's lookup reports `NOT_FOUND`.
281
284
  *
282
- * Look up by `predictionId` (from the trigger call), or by `pageId`.
285
+ * Look up by `predictionId` (from the trigger call), or by `pageId`. A
286
+ * `predictionId` can be looked up for 2 hours after the trigger call; after
287
+ * that, look up by `pageId`, which returns the page's latest generation.
283
288
  * @public
284
289
  * @documentationMaturity preview
285
290
  * @permissionId seo:suggestions:v1:page_optimization:get_page_optimization_results
286
291
  * @applicableIdentity APP
287
292
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.GetPageOptimizationResults
288
293
  */
289
- declare function getPageOptimizationResults(options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 4> & {
294
+ declare function getPageOptimizationResults(options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 2> & {
290
295
  __applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;
291
296
  }>;
292
297
  interface GetPageOptimizationResultsOptions {
293
298
  /**
294
- * ID of the generation job, from the trigger call.
299
+ * ID of the generation job, from the trigger call. Can be looked up for 2
300
+ * hours after the trigger call.
295
301
  * @maxLength 200
296
302
  */
297
303
  predictionId?: string | null;
@@ -8,7 +8,8 @@ import '@wix/sdk-types';
8
8
  * Each suggestion is a before/after pair: `before` is the page's current
9
9
  * text (empty when the page has none, such as a missing meta description),
10
10
  * and `after` is the suggested replacement. Locate the element to change by
11
- * its `before` text.
11
+ * its `before` text. Suggestions are stored per page, so a later generation
12
+ * for the same page replaces this set.
12
13
  */
13
14
  interface PageOptimization {
14
15
  /**
@@ -33,12 +34,12 @@ interface PageOptimization {
33
34
  */
34
35
  h1?: TextSuggestion;
35
36
  /**
36
- * Suggested H2 or H3 heading.
37
+ * Suggested subheading, for an H2 or H3 element of the page.
37
38
  * @readonly
38
39
  */
39
40
  h2OrH3?: TextSuggestion;
40
41
  /**
41
- * Suggested body text rewrites.
42
+ * Suggested rewrites of the page's body text, one per text element.
42
43
  * @readonly
43
44
  * @maxSize 100
44
45
  */
@@ -62,7 +63,7 @@ interface TextSuggestion {
62
63
  }
63
64
  interface TriggerPageOptimizationRequest {
64
65
  /**
65
- * ID of the site page to optimize.
66
+ * ID of the site page to optimize. The page's focus keyword must be set.
66
67
  * @maxLength 1000
67
68
  * @minLength 1
68
69
  */
@@ -107,7 +108,8 @@ interface TriggerHomePageOptimizationResponse {
107
108
  }
108
109
  interface GetPageOptimizationResultsRequest {
109
110
  /**
110
- * ID of the generation job, from the trigger call.
111
+ * ID of the generation job, from the trigger call. Can be looked up for 2
112
+ * hours after the trigger call.
111
113
  * @maxLength 200
112
114
  */
113
115
  predictionId?: string | null;
@@ -129,6 +131,7 @@ interface GetPageOptimizationResultsResponse {
129
131
  }
130
132
  /** Status of a page optimization generation job. */
131
133
  declare enum OptimizationStatus {
134
+ /** Unknown status. */
132
135
  UNKNOWN_OPTIMIZATION_STATUS = "UNKNOWN_OPTIMIZATION_STATUS",
133
136
  /**
134
137
  * No generation job matches the lookup. It never existed, or a later
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_seo_page-optimization",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -50,5 +50,5 @@
50
50
  "fqdn": "wix.seo.suggestions.v1.page_optimization"
51
51
  }
52
52
  },
53
- "falconPackageHash": "e4c887bdd8286555d510f6f1f09abe13e26e50969ff133de91a6cf6c"
53
+ "falconPackageHash": "0413a5094b1c80cd227354c4736ebb2981d8fd867782d969f95878c7"
54
54
  }