@wix/auto_sdk_seo_page-optimization 1.0.5 → 1.0.7

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.
@@ -1,5 +1,5 @@
1
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';
2
+ import { TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerHomePageOptimizationResponse, TriggerHomePageOptimizationApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, GetPageOptimizationResultsApplicationErrors } from './index.typings.js';
3
3
  export { GetPageOptimizationResultsRequest, OptimizationStatus, OptimizationStatusWithLiterals, PageOptimization, TextSuggestion, TriggerHomePageOptimizationRequest, TriggerPageOptimizationRequest } from './index.typings.js';
4
4
 
5
5
  declare function triggerPageOptimization$1(httpClient: HttpClient): TriggerPageOptimizationSignature;
@@ -32,9 +32,12 @@ interface TriggerHomePageOptimizationSignature {
32
32
  * topic. Same contract as Trigger Page Optimization: the homepage's focus
33
33
  * keyword must be set first, the call returns a `predictionId` to poll,
34
34
  * and triggering is idempotent per page while a job is in progress.
35
- * @param - ID of the site's homepage.
35
+ *
36
+ * The method takes no parameters. Wix resolves which page is the site's
37
+ * homepage, so callers don't have to identify it. The response returns the
38
+ * resolved `pageId`, for later lookups with Get Page Optimization Results.
36
39
  */
37
- (pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 0> & {
40
+ (): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId` | `pageId`, 0> & {
38
41
  __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
39
42
  }>;
40
43
  }
@@ -64,4 +67,4 @@ declare const triggerPageOptimization: MaybeContext<BuildRESTFunction<typeof tri
64
67
  declare const triggerHomePageOptimization: MaybeContext<BuildRESTFunction<typeof triggerHomePageOptimization$1> & typeof triggerHomePageOptimization$1>;
65
68
  declare const getPageOptimizationResults: MaybeContext<BuildRESTFunction<typeof getPageOptimizationResults$1> & typeof getPageOptimizationResults$1>;
66
69
 
67
- export { GetPageOptimizationResultsApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, TriggerHomePageOptimizationApplicationErrors, TriggerHomePageOptimizationOptions, TriggerHomePageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
70
+ export { GetPageOptimizationResultsApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, TriggerHomePageOptimizationApplicationErrors, TriggerHomePageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
@@ -84,18 +84,6 @@ interface TriggerPageOptimizationResponse {
84
84
  predictionId?: string;
85
85
  }
86
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
87
  }
100
88
  interface TriggerHomePageOptimizationResponse {
101
89
  /**
@@ -104,6 +92,14 @@ interface TriggerHomePageOptimizationResponse {
104
92
  * @maxLength 200
105
93
  */
106
94
  predictionId?: string;
95
+ /**
96
+ * ID of the page the service resolved as the site's homepage. Pass to Get
97
+ * Page Optimization Results to retrieve the homepage's latest generation
98
+ * after the `predictionId` expires.
99
+ * @readonly
100
+ * @maxLength 1000
101
+ */
102
+ pageId?: string;
107
103
  }
108
104
  interface GetPageOptimizationResultsRequest {
109
105
  /**
@@ -250,27 +246,19 @@ interface TriggerPageOptimizationOptions {
250
246
  * topic. Same contract as Trigger Page Optimization: the homepage's focus
251
247
  * keyword must be set first, the call returns a `predictionId` to poll,
252
248
  * and triggering is idempotent per page while a job is in progress.
253
- * @param pageId - ID of the site's homepage.
249
+ *
250
+ * The method takes no parameters. Wix resolves which page is the site's
251
+ * homepage, so callers don't have to identify it. The response returns the
252
+ * resolved `pageId`, for later lookups with Get Page Optimization Results.
254
253
  * @public
255
254
  * @documentationMaturity preview
256
- * @requiredField options
257
- * @requiredField options.pagePath
258
- * @requiredField pageId
259
255
  * @permissionId seo:suggestions:v1:page_optimization:trigger_home_page_optimization
260
256
  * @applicableIdentity APP
261
257
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization
262
258
  */
263
- declare function triggerHomePageOptimization(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 0> & {
259
+ declare function triggerHomePageOptimization(): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId` | `pageId`, 0> & {
264
260
  __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
265
261
  }>;
266
- interface TriggerHomePageOptimizationOptions {
267
- /**
268
- * URL path of the homepage. Usually `/`.
269
- * @maxLength 1000
270
- * @minLength 1
271
- */
272
- pagePath: string;
273
- }
274
262
  /**
275
263
  * Retrieves the optimization suggestions generated for a page.
276
264
  *
@@ -309,4 +297,4 @@ interface GetPageOptimizationResultsOptions {
309
297
  pageId?: string | null;
310
298
  }
311
299
 
312
- 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 };
300
+ export { type GetPageOptimizationResultsApplicationErrors, type GetPageOptimizationResultsOptions, type GetPageOptimizationResultsRequest, type GetPageOptimizationResultsResponse, OptimizationStatus, type OptimizationStatusWithLiterals, type PageOptimization, type TextSuggestion, type TriggerHomePageOptimizationApplicationErrors, type TriggerHomePageOptimizationRequest, type TriggerHomePageOptimizationResponse, type TriggerPageOptimizationApplicationErrors, type TriggerPageOptimizationOptions, type TriggerPageOptimizationRequest, type TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
@@ -85,18 +85,6 @@ interface TriggerPageOptimizationResponse {
85
85
  predictionId?: string;
86
86
  }
87
87
  interface TriggerHomePageOptimizationRequest {
88
- /**
89
- * ID of the site's homepage.
90
- * @maxLength 1000
91
- * @minLength 1
92
- */
93
- pageId: string;
94
- /**
95
- * URL path of the homepage. Usually `/`.
96
- * @maxLength 1000
97
- * @minLength 1
98
- */
99
- pagePath: string;
100
88
  }
101
89
  interface TriggerHomePageOptimizationResponse {
102
90
  /**
@@ -105,6 +93,14 @@ interface TriggerHomePageOptimizationResponse {
105
93
  * @maxLength 200
106
94
  */
107
95
  predictionId?: string;
96
+ /**
97
+ * ID of the page the service resolved as the site's homepage. Pass to Get
98
+ * Page Optimization Results to retrieve the homepage's latest generation
99
+ * after the `predictionId` expires.
100
+ * @readonly
101
+ * @maxLength 1000
102
+ */
103
+ pageId?: string;
108
104
  }
109
105
  interface GetPageOptimizationResultsRequest {
110
106
  /**
@@ -1,5 +1,5 @@
1
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';
2
+ import { TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerHomePageOptimizationResponse, TriggerHomePageOptimizationApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, GetPageOptimizationResultsApplicationErrors } from './index.typings.mjs';
3
3
  export { GetPageOptimizationResultsRequest, OptimizationStatus, OptimizationStatusWithLiterals, PageOptimization, TextSuggestion, TriggerHomePageOptimizationRequest, TriggerPageOptimizationRequest } from './index.typings.mjs';
4
4
 
5
5
  declare function triggerPageOptimization$1(httpClient: HttpClient): TriggerPageOptimizationSignature;
@@ -32,9 +32,12 @@ interface TriggerHomePageOptimizationSignature {
32
32
  * topic. Same contract as Trigger Page Optimization: the homepage's focus
33
33
  * keyword must be set first, the call returns a `predictionId` to poll,
34
34
  * and triggering is idempotent per page while a job is in progress.
35
- * @param - ID of the site's homepage.
35
+ *
36
+ * The method takes no parameters. Wix resolves which page is the site's
37
+ * homepage, so callers don't have to identify it. The response returns the
38
+ * resolved `pageId`, for later lookups with Get Page Optimization Results.
36
39
  */
37
- (pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 0> & {
40
+ (): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId` | `pageId`, 0> & {
38
41
  __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
39
42
  }>;
40
43
  }
@@ -64,4 +67,4 @@ declare const triggerPageOptimization: MaybeContext<BuildRESTFunction<typeof tri
64
67
  declare const triggerHomePageOptimization: MaybeContext<BuildRESTFunction<typeof triggerHomePageOptimization$1> & typeof triggerHomePageOptimization$1>;
65
68
  declare const getPageOptimizationResults: MaybeContext<BuildRESTFunction<typeof getPageOptimizationResults$1> & typeof getPageOptimizationResults$1>;
66
69
 
67
- export { GetPageOptimizationResultsApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, TriggerHomePageOptimizationApplicationErrors, TriggerHomePageOptimizationOptions, TriggerHomePageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
70
+ export { GetPageOptimizationResultsApplicationErrors, GetPageOptimizationResultsOptions, GetPageOptimizationResultsResponse, TriggerHomePageOptimizationApplicationErrors, TriggerHomePageOptimizationResponse, TriggerPageOptimizationApplicationErrors, TriggerPageOptimizationOptions, TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
@@ -84,18 +84,6 @@ interface TriggerPageOptimizationResponse {
84
84
  predictionId?: string;
85
85
  }
86
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
87
  }
100
88
  interface TriggerHomePageOptimizationResponse {
101
89
  /**
@@ -104,6 +92,14 @@ interface TriggerHomePageOptimizationResponse {
104
92
  * @maxLength 200
105
93
  */
106
94
  predictionId?: string;
95
+ /**
96
+ * ID of the page the service resolved as the site's homepage. Pass to Get
97
+ * Page Optimization Results to retrieve the homepage's latest generation
98
+ * after the `predictionId` expires.
99
+ * @readonly
100
+ * @maxLength 1000
101
+ */
102
+ pageId?: string;
107
103
  }
108
104
  interface GetPageOptimizationResultsRequest {
109
105
  /**
@@ -250,27 +246,19 @@ interface TriggerPageOptimizationOptions {
250
246
  * topic. Same contract as Trigger Page Optimization: the homepage's focus
251
247
  * keyword must be set first, the call returns a `predictionId` to poll,
252
248
  * and triggering is idempotent per page while a job is in progress.
253
- * @param pageId - ID of the site's homepage.
249
+ *
250
+ * The method takes no parameters. Wix resolves which page is the site's
251
+ * homepage, so callers don't have to identify it. The response returns the
252
+ * resolved `pageId`, for later lookups with Get Page Optimization Results.
254
253
  * @public
255
254
  * @documentationMaturity preview
256
- * @requiredField options
257
- * @requiredField options.pagePath
258
- * @requiredField pageId
259
255
  * @permissionId seo:suggestions:v1:page_optimization:trigger_home_page_optimization
260
256
  * @applicableIdentity APP
261
257
  * @fqn wix.seo.suggestions.v1.PageOptimizationService.TriggerHomePageOptimization
262
258
  */
263
- declare function triggerHomePageOptimization(pageId: string, options: NonNullablePaths<TriggerHomePageOptimizationOptions, `pagePath`, 0>): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId`, 0> & {
259
+ declare function triggerHomePageOptimization(): Promise<NonNullablePaths<TriggerHomePageOptimizationResponse, `predictionId` | `pageId`, 0> & {
264
260
  __applicationErrorsType?: TriggerHomePageOptimizationApplicationErrors;
265
261
  }>;
266
- interface TriggerHomePageOptimizationOptions {
267
- /**
268
- * URL path of the homepage. Usually `/`.
269
- * @maxLength 1000
270
- * @minLength 1
271
- */
272
- pagePath: string;
273
- }
274
262
  /**
275
263
  * Retrieves the optimization suggestions generated for a page.
276
264
  *
@@ -309,4 +297,4 @@ interface GetPageOptimizationResultsOptions {
309
297
  pageId?: string | null;
310
298
  }
311
299
 
312
- 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 };
300
+ export { type GetPageOptimizationResultsApplicationErrors, type GetPageOptimizationResultsOptions, type GetPageOptimizationResultsRequest, type GetPageOptimizationResultsResponse, OptimizationStatus, type OptimizationStatusWithLiterals, type PageOptimization, type TextSuggestion, type TriggerHomePageOptimizationApplicationErrors, type TriggerHomePageOptimizationRequest, type TriggerHomePageOptimizationResponse, type TriggerPageOptimizationApplicationErrors, type TriggerPageOptimizationOptions, type TriggerPageOptimizationRequest, type TriggerPageOptimizationResponse, getPageOptimizationResults, triggerHomePageOptimization, triggerPageOptimization };
@@ -85,18 +85,6 @@ interface TriggerPageOptimizationResponse {
85
85
  predictionId?: string;
86
86
  }
87
87
  interface TriggerHomePageOptimizationRequest {
88
- /**
89
- * ID of the site's homepage.
90
- * @maxLength 1000
91
- * @minLength 1
92
- */
93
- pageId: string;
94
- /**
95
- * URL path of the homepage. Usually `/`.
96
- * @maxLength 1000
97
- * @minLength 1
98
- */
99
- pagePath: string;
100
88
  }
101
89
  interface TriggerHomePageOptimizationResponse {
102
90
  /**
@@ -105,6 +93,14 @@ interface TriggerHomePageOptimizationResponse {
105
93
  * @maxLength 200
106
94
  */
107
95
  predictionId?: string;
96
+ /**
97
+ * ID of the page the service resolved as the site's homepage. Pass to Get
98
+ * Page Optimization Results to retrieve the homepage's latest generation
99
+ * after the `predictionId` expires.
100
+ * @readonly
101
+ * @maxLength 1000
102
+ */
103
+ pageId?: string;
108
104
  }
109
105
  interface GetPageOptimizationResultsRequest {
110
106
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_seo_page-optimization",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -29,7 +29,7 @@
29
29
  "service-plugins"
30
30
  ],
31
31
  "dependencies": {
32
- "@wix/sdk-runtime": "^1.0.24",
32
+ "@wix/sdk-runtime": "^1.0.28",
33
33
  "@wix/sdk-types": "^1.17.11"
34
34
  },
35
35
  "devDependencies": {
@@ -50,5 +50,5 @@
50
50
  "fqdn": "wix.seo.suggestions.v1.page_optimization"
51
51
  }
52
52
  },
53
- "falconPackageHash": "0413a5094b1c80cd227354c4736ebb2981d8fd867782d969f95878c7"
53
+ "falconPackageHash": "3144ec51e9a9eaacd8a3149b3226f692784704781a09e172710b0896"
54
54
  }