@wix/auto_sdk_seo_page-optimization 1.0.3 → 1.0.4

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,9 @@ 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
+ *
224
+ * Must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). Calls made with an API key fail.
225
+ * @param pageId - ID of the site page to optimize. The page's focus keyword must be set.
221
226
  * @public
222
227
  * @documentationMaturity preview
223
228
  * @requiredField options
@@ -247,6 +252,8 @@ interface TriggerPageOptimizationOptions {
247
252
  * topic. Same contract as Trigger Page Optimization: the homepage's focus
248
253
  * keyword must be set first, the call returns a `predictionId` to poll,
249
254
  * and triggering is idempotent per page while a job is in progress.
255
+ *
256
+ * Must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). Calls made with an API key fail.
250
257
  * @param pageId - ID of the site's homepage.
251
258
  * @public
252
259
  * @documentationMaturity preview
@@ -279,7 +286,9 @@ interface TriggerHomePageOptimizationOptions {
279
286
  * are stored per page, so a later trigger for the same page replaces them,
280
287
  * and a replaced job's lookup reports `NOT_FOUND`.
281
288
  *
282
- * Look up by `predictionId` (from the trigger call), or by `pageId`.
289
+ * Look up by `predictionId` (from the trigger call), or by `pageId`. A
290
+ * `predictionId` can be looked up for 2 hours after the trigger call; after
291
+ * that, look up by `pageId`, which returns the page's latest generation.
283
292
  * @public
284
293
  * @documentationMaturity preview
285
294
  * @permissionId seo:suggestions:v1:page_optimization:get_page_optimization_results
@@ -291,7 +300,8 @@ declare function getPageOptimizationResults(options?: GetPageOptimizationResults
291
300
  }>;
292
301
  interface GetPageOptimizationResultsOptions {
293
302
  /**
294
- * ID of the generation job, from the trigger call.
303
+ * ID of the generation job, from the trigger call. Can be looked up for 2
304
+ * hours after the trigger call.
295
305
  * @maxLength 200
296
306
  */
297
307
  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,7 +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
+ *
20
+ * Must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). Calls made with an API key fail.
21
+ * @param - ID of the site page to optimize. The page's focus keyword must be set.
20
22
  */
21
23
  (pageId: string, options: NonNullablePaths<TriggerPageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerPageOptimizationResponse, `predictionId`, 2> & {
22
24
  __applicationErrorsType?: TriggerPageOptimizationApplicationErrors;
@@ -32,6 +34,8 @@ interface TriggerHomePageOptimizationSignature {
32
34
  * topic. Same contract as Trigger Page Optimization: the homepage's focus
33
35
  * keyword must be set first, the call returns a `predictionId` to poll,
34
36
  * and triggering is idempotent per page while a job is in progress.
37
+ *
38
+ * Must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). Calls made with an API key fail.
35
39
  * @param - ID of the site's homepage.
36
40
  */
37
41
  (pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 2>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 2> & {
@@ -51,7 +55,9 @@ interface GetPageOptimizationResultsSignature {
51
55
  * are stored per page, so a later trigger for the same page replaces them,
52
56
  * and a replaced job's lookup reports `NOT_FOUND`.
53
57
  *
54
- * Look up by `predictionId` (from the trigger call), or by `pageId`.
58
+ * Look up by `predictionId` (from the trigger call), or by `pageId`. A
59
+ * `predictionId` can be looked up for 2 hours after the trigger call; after
60
+ * that, look up by `pageId`, which returns the page's latest generation.
55
61
  */
56
62
  (options?: GetPageOptimizationResultsOptions): Promise<NonNullablePaths<GetPageOptimizationResultsResponse, `pageOptimization.metaTitle.after` | `pageOptimization.content` | `status`, 4> & {
57
63
  __applicationErrorsType?: GetPageOptimizationResultsApplicationErrors;
@@ -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,9 @@ 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
+ *
224
+ * Must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). Calls made with an API key fail.
225
+ * @param pageId - ID of the site page to optimize. The page's focus keyword must be set.
221
226
  * @public
222
227
  * @documentationMaturity preview
223
228
  * @requiredField options
@@ -247,6 +252,8 @@ interface TriggerPageOptimizationOptions {
247
252
  * topic. Same contract as Trigger Page Optimization: the homepage's focus
248
253
  * keyword must be set first, the call returns a `predictionId` to poll,
249
254
  * and triggering is idempotent per page while a job is in progress.
255
+ *
256
+ * Must be called with a [Wix user identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). Calls made with an API key fail.
250
257
  * @param pageId - ID of the site's homepage.
251
258
  * @public
252
259
  * @documentationMaturity preview
@@ -279,7 +286,9 @@ interface TriggerHomePageOptimizationOptions {
279
286
  * are stored per page, so a later trigger for the same page replaces them,
280
287
  * and a replaced job's lookup reports `NOT_FOUND`.
281
288
  *
282
- * Look up by `predictionId` (from the trigger call), or by `pageId`.
289
+ * Look up by `predictionId` (from the trigger call), or by `pageId`. A
290
+ * `predictionId` can be looked up for 2 hours after the trigger call; after
291
+ * that, look up by `pageId`, which returns the page's latest generation.
283
292
  * @public
284
293
  * @documentationMaturity preview
285
294
  * @permissionId seo:suggestions:v1:page_optimization:get_page_optimization_results
@@ -291,7 +300,8 @@ declare function getPageOptimizationResults(options?: GetPageOptimizationResults
291
300
  }>;
292
301
  interface GetPageOptimizationResultsOptions {
293
302
  /**
294
- * ID of the generation job, from the trigger call.
303
+ * ID of the generation job, from the trigger call. Can be looked up for 2
304
+ * hours after the trigger call.
295
305
  * @maxLength 200
296
306
  */
297
307
  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.4",
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": "77368f80a624ff04509ce5ff9f80ec4e013ee158bcb3b07bf616dd7e"
54
54
  }