@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,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.mjs';
|
|
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 };
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wix/auto_sdk_seo_page-optimization",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/",
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"main": "./build/cjs/index.js",
|
|
12
|
+
"types": "./build/cjs/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./build/es/index.mjs",
|
|
16
|
+
"require": "./build/cjs/index.js",
|
|
17
|
+
"types": "./build/es/index.d.mts"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json",
|
|
20
|
+
"./meta": {
|
|
21
|
+
"import": "./build/es/meta.mjs",
|
|
22
|
+
"require": "./build/cjs/meta.js",
|
|
23
|
+
"types": "./build/es/meta.d.mts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"build",
|
|
28
|
+
"meta",
|
|
29
|
+
"service-plugins"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@wix/sdk-runtime": "^1.0.24",
|
|
33
|
+
"@wix/sdk-types": "^1.17.11"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"tsup": "^8.4.0",
|
|
37
|
+
"typescript": "^5.3.2"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsup",
|
|
41
|
+
"test": ":"
|
|
42
|
+
},
|
|
43
|
+
"wix": {
|
|
44
|
+
"artifact": {
|
|
45
|
+
"artifactId": "auto-sdk-seo-page-optimization",
|
|
46
|
+
"groupId": "com.wixpress.public-sdk-dependencies"
|
|
47
|
+
},
|
|
48
|
+
"sdkDependency": {
|
|
49
|
+
"fqdnNamespace": "pageOptimization",
|
|
50
|
+
"fqdn": "wix.seo.suggestions.v1.page_optimization"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"falconPackageHash": "1111cf88f4c87271e3e5af766a0e1f258249ff74ca9014705b3435d3"
|
|
54
|
+
}
|