@wix/auto_sdk_seo_keyword-research 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 +101 -0
- package/build/cjs/index.js +372 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +672 -0
- package/build/cjs/index.typings.js +340 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +527 -0
- package/build/cjs/meta.js +301 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +101 -0
- package/build/es/index.mjs +346 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +672 -0
- package/build/es/index.typings.mjs +314 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +527 -0
- package/build/es/meta.mjs +272 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +101 -0
- package/build/internal/cjs/index.typings.d.ts +684 -0
- package/build/internal/cjs/meta.d.ts +539 -0
- package/build/internal/es/index.d.mts +101 -0
- package/build/internal/es/index.typings.d.mts +684 -0
- package/build/internal/es/meta.d.mts +539 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A keyword research item is one target keyword in a site's content plan,
|
|
5
|
+
* together with the search data behind it and the page it belongs to.
|
|
6
|
+
*
|
|
7
|
+
* The content plan pipeline generates a set of these for a site. A site owner
|
|
8
|
+
* can then refine them, and the blog post briefs are built from the result.
|
|
9
|
+
*
|
|
10
|
+
* Items are grouped into clusters. Each site page has one main keyword, marked
|
|
11
|
+
* by `primary`, and the other keywords in that cluster support it.
|
|
12
|
+
*/
|
|
13
|
+
interface KeywordResearch {
|
|
14
|
+
/**
|
|
15
|
+
* Keyword research item ID.
|
|
16
|
+
* @format GUID
|
|
17
|
+
* @readonly
|
|
18
|
+
*/
|
|
19
|
+
_id?: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* The keyword itself.
|
|
22
|
+
*
|
|
23
|
+
* An update is rejected if the new keyword is longer than 80 characters, or
|
|
24
|
+
* if it duplicates another keyword in the same research.
|
|
25
|
+
* @maxLength 1000
|
|
26
|
+
*/
|
|
27
|
+
keyword?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the site page the keyword is assigned to.
|
|
30
|
+
* @maxLength 1000
|
|
31
|
+
*/
|
|
32
|
+
pageId?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Type of the site page the keyword is assigned to, such as a static
|
|
35
|
+
* page or a blog post.
|
|
36
|
+
* @maxLength 1000
|
|
37
|
+
*/
|
|
38
|
+
itemType?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* URL of the site page the keyword is assigned to.
|
|
41
|
+
* @maxLength 1000
|
|
42
|
+
*/
|
|
43
|
+
pageUrl?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* How hard it is to rank for the keyword, on a scale where a higher
|
|
46
|
+
* number means more competition.
|
|
47
|
+
*
|
|
48
|
+
* Recalculated when `keyword` changes, even if you don't name this field
|
|
49
|
+
* in the field mask.
|
|
50
|
+
*/
|
|
51
|
+
competition?: number | null;
|
|
52
|
+
/**
|
|
53
|
+
* Estimated number of searches for the keyword per month.
|
|
54
|
+
*
|
|
55
|
+
* Recalculated when `keyword` changes, even if you don't name this field
|
|
56
|
+
* in the field mask.
|
|
57
|
+
*/
|
|
58
|
+
searchVolume?: number | null;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the site page this keyword is assigned to has been deleted.
|
|
61
|
+
*
|
|
62
|
+
* A keyword assigned to a deleted page stays in the research.
|
|
63
|
+
*/
|
|
64
|
+
pageDeleted?: boolean | null;
|
|
65
|
+
/**
|
|
66
|
+
* Whether this keyword is the main keyword for its page.
|
|
67
|
+
*
|
|
68
|
+
* A page has a single main keyword, and the other keywords in its cluster
|
|
69
|
+
* support it.
|
|
70
|
+
*/
|
|
71
|
+
primary?: boolean | null;
|
|
72
|
+
/**
|
|
73
|
+
* Name of the cluster that groups this keyword with the others covering
|
|
74
|
+
* the same topic.
|
|
75
|
+
* @maxLength 1000
|
|
76
|
+
*/
|
|
77
|
+
clusterName?: string | null;
|
|
78
|
+
}
|
|
79
|
+
interface GetKeywordResearchItemsByPageIdRequest {
|
|
80
|
+
/**
|
|
81
|
+
* ID of the page to retrieve keywords for. Required.
|
|
82
|
+
* @maxLength 1000
|
|
83
|
+
*/
|
|
84
|
+
pageId?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Type of the page. Required. Must match a stored item type.
|
|
87
|
+
* Unmatched value returns NOT_FOUND unless a main keyword was already set.
|
|
88
|
+
* @maxLength 1000
|
|
89
|
+
*/
|
|
90
|
+
itemType?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional. The handler currently resolves the site's latest keyword
|
|
93
|
+
* research and does not read this field. Kept for future use: when the
|
|
94
|
+
* handler is updated to support per-flow lookups, callers will be able to
|
|
95
|
+
* target a specific flow's research instead of always getting the latest.
|
|
96
|
+
* @format GUID
|
|
97
|
+
*/
|
|
98
|
+
contentPlanFlowId?: string | null;
|
|
99
|
+
}
|
|
100
|
+
interface GetKeywordResearchItemsByPageIdResponse {
|
|
101
|
+
/**
|
|
102
|
+
* keywords related to the page
|
|
103
|
+
* @maxSize 1000
|
|
104
|
+
*/
|
|
105
|
+
keywordResearchItems?: KeywordResearch[];
|
|
106
|
+
/**
|
|
107
|
+
* id of the main keyword for this page
|
|
108
|
+
* @format GUID
|
|
109
|
+
*/
|
|
110
|
+
mainKeywordId?: string | null;
|
|
111
|
+
}
|
|
112
|
+
interface ListKeywordResearchItemsRequest {
|
|
113
|
+
/**
|
|
114
|
+
* Reserved for future use.
|
|
115
|
+
*
|
|
116
|
+
* This method currently resolves the site's most recent keyword research,
|
|
117
|
+
* and this field is ignored.
|
|
118
|
+
* @format GUID
|
|
119
|
+
*/
|
|
120
|
+
contentPlanFlowId?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Cursor paging. Omit for the first page.
|
|
123
|
+
*
|
|
124
|
+
* Omit this object entirely to return every item in a single response.
|
|
125
|
+
*/
|
|
126
|
+
paging?: CursorPaging;
|
|
127
|
+
}
|
|
128
|
+
interface CursorPaging {
|
|
129
|
+
/**
|
|
130
|
+
* Max items per page. Default 50, max 100.
|
|
131
|
+
* @max 100
|
|
132
|
+
*/
|
|
133
|
+
limit?: number | null;
|
|
134
|
+
/**
|
|
135
|
+
* Cursor from a previous response. Omit for the first page.
|
|
136
|
+
* @maxLength 16000
|
|
137
|
+
*/
|
|
138
|
+
cursor?: string | null;
|
|
139
|
+
}
|
|
140
|
+
interface ListKeywordResearchItemsResponse {
|
|
141
|
+
/**
|
|
142
|
+
* Retrieved keyword research items.
|
|
143
|
+
* @maxSize 1000
|
|
144
|
+
*/
|
|
145
|
+
keywordResearchItems?: KeywordResearch[];
|
|
146
|
+
/**
|
|
147
|
+
* ID of the keyword research these items belong to.
|
|
148
|
+
*
|
|
149
|
+
* Send this ID when you update an item. Compare it across reads to detect
|
|
150
|
+
* that a newer generation replaced the research.
|
|
151
|
+
* @format GUID
|
|
152
|
+
*/
|
|
153
|
+
keywordResearchId?: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* Whether this research has been edited.
|
|
156
|
+
*
|
|
157
|
+
* `false` means the research is exactly as the content plan generated it,
|
|
158
|
+
* so the next edit copies it onto a new `keywordResearchId`.
|
|
159
|
+
*/
|
|
160
|
+
createdByUser?: boolean | null;
|
|
161
|
+
/**
|
|
162
|
+
* ID of the main keyword for each page, keyed by page ID.
|
|
163
|
+
*
|
|
164
|
+
* Built from the site's full item set, so on a paged response it can name
|
|
165
|
+
* items that aren't in `keywordResearchItems`.
|
|
166
|
+
*/
|
|
167
|
+
mainKeywordMap?: Record<string, string>;
|
|
168
|
+
/** Paging metadata. */
|
|
169
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
170
|
+
}
|
|
171
|
+
interface CursorPagingMetadata {
|
|
172
|
+
/** Items returned in this page. */
|
|
173
|
+
count?: number | null;
|
|
174
|
+
/** Cursors for next/previous page. */
|
|
175
|
+
cursors?: Cursors;
|
|
176
|
+
/** Whether there are more pages. */
|
|
177
|
+
hasNext?: boolean | null;
|
|
178
|
+
}
|
|
179
|
+
interface Cursors {
|
|
180
|
+
/**
|
|
181
|
+
* Cursor for the next page.
|
|
182
|
+
* @maxLength 16000
|
|
183
|
+
*/
|
|
184
|
+
next?: string | null;
|
|
185
|
+
/**
|
|
186
|
+
* Cursor for the previous page.
|
|
187
|
+
* @maxLength 16000
|
|
188
|
+
*/
|
|
189
|
+
prev?: string | null;
|
|
190
|
+
}
|
|
191
|
+
/** Deprecated alias request. Same fields as ListKeywordResearchItemsRequest. */
|
|
192
|
+
interface GetKeywordResearchItemsRequest {
|
|
193
|
+
/**
|
|
194
|
+
* Deprecated. Ignored by the handler.
|
|
195
|
+
* @format GUID
|
|
196
|
+
*/
|
|
197
|
+
contentPlanFlowId?: string | null;
|
|
198
|
+
/** Cursor paging. */
|
|
199
|
+
paging?: CursorPaging;
|
|
200
|
+
}
|
|
201
|
+
/** Deprecated alias response. Same fields as ListKeywordResearchItemsResponse. */
|
|
202
|
+
interface GetKeywordResearchItemsResponse {
|
|
203
|
+
/**
|
|
204
|
+
* Keyword research items.
|
|
205
|
+
* @maxSize 1000
|
|
206
|
+
*/
|
|
207
|
+
keywordResearchItems?: KeywordResearch[];
|
|
208
|
+
/**
|
|
209
|
+
* ID of the keyword research.
|
|
210
|
+
* @format GUID
|
|
211
|
+
*/
|
|
212
|
+
keywordResearchId?: string | null;
|
|
213
|
+
/** Whether the research was user-created. */
|
|
214
|
+
createdByUser?: boolean | null;
|
|
215
|
+
/** Main keyword IDs by page ID. */
|
|
216
|
+
mainKeywordMap?: Record<string, string>;
|
|
217
|
+
/** Paging metadata. */
|
|
218
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
219
|
+
}
|
|
220
|
+
interface GetDraftKeywordResearchItemsRequest {
|
|
221
|
+
/**
|
|
222
|
+
* id of the content plan flow this keyword research belongs to
|
|
223
|
+
* @format GUID
|
|
224
|
+
*/
|
|
225
|
+
contentPlanFlowId?: string | null;
|
|
226
|
+
}
|
|
227
|
+
interface GetDraftKeywordResearchItemsResponse {
|
|
228
|
+
/**
|
|
229
|
+
* keyword research items
|
|
230
|
+
* @maxSize 1000
|
|
231
|
+
*/
|
|
232
|
+
keywordResearchItems?: KeywordResearch[];
|
|
233
|
+
/**
|
|
234
|
+
* id of the keyword research that was returned
|
|
235
|
+
* @format GUID
|
|
236
|
+
*/
|
|
237
|
+
keywordResearchId?: string | null;
|
|
238
|
+
/** whether the keyword research was created by the user */
|
|
239
|
+
createdByUser?: boolean | null;
|
|
240
|
+
/** map of ids of the main keywords by page id */
|
|
241
|
+
mainKeywordMap?: Record<string, string>;
|
|
242
|
+
}
|
|
243
|
+
interface UpdateKeywordResearchItemsRequest {
|
|
244
|
+
/**
|
|
245
|
+
* updated keyword research items
|
|
246
|
+
* @maxSize 1000
|
|
247
|
+
*/
|
|
248
|
+
updatedItems?: UpdatedKeywordResearch[];
|
|
249
|
+
/**
|
|
250
|
+
* deleted keyword research items
|
|
251
|
+
* @maxSize 1000
|
|
252
|
+
*/
|
|
253
|
+
deletedItems?: DeletedKeywordResearch[];
|
|
254
|
+
/**
|
|
255
|
+
* added keyword research items
|
|
256
|
+
* @maxSize 1000
|
|
257
|
+
*/
|
|
258
|
+
addedItems?: AddedKeywordResearch[];
|
|
259
|
+
/**
|
|
260
|
+
* id of the keyword research to be updated
|
|
261
|
+
* @format GUID
|
|
262
|
+
*/
|
|
263
|
+
keywordResearchId?: string | null;
|
|
264
|
+
}
|
|
265
|
+
interface UpdatedKeywordResearch {
|
|
266
|
+
/**
|
|
267
|
+
* ID of the keyword research item to update.
|
|
268
|
+
* @format GUID
|
|
269
|
+
*/
|
|
270
|
+
_id?: string | null;
|
|
271
|
+
/**
|
|
272
|
+
* New keyword.
|
|
273
|
+
*
|
|
274
|
+
* Rejected if it's longer than 80 characters, or if it duplicates another
|
|
275
|
+
* keyword in the same research. Changing it also refreshes the item's
|
|
276
|
+
* `searchVolume` and `competition`.
|
|
277
|
+
* @maxLength 1000
|
|
278
|
+
*/
|
|
279
|
+
keyword?: string | null;
|
|
280
|
+
/**
|
|
281
|
+
* Whether to make this item its page's main keyword.
|
|
282
|
+
*
|
|
283
|
+
* Set to `true` to promote it. `false` and omitting the field both leave
|
|
284
|
+
* the current main keyword unchanged, so this field can't demote one.
|
|
285
|
+
*/
|
|
286
|
+
mainKeyword?: boolean | null;
|
|
287
|
+
}
|
|
288
|
+
interface DeletedKeywordResearch {
|
|
289
|
+
/**
|
|
290
|
+
* ID of the keyword research item to delete.
|
|
291
|
+
* @format GUID
|
|
292
|
+
*/
|
|
293
|
+
_id?: string | null;
|
|
294
|
+
}
|
|
295
|
+
interface AddedKeywordResearch {
|
|
296
|
+
/**
|
|
297
|
+
* keyword of the keyword research item
|
|
298
|
+
* @maxLength 1000
|
|
299
|
+
*/
|
|
300
|
+
keyword?: string | null;
|
|
301
|
+
/**
|
|
302
|
+
* page id the keyword relates to
|
|
303
|
+
* @maxLength 1000
|
|
304
|
+
*/
|
|
305
|
+
pageId?: string | null;
|
|
306
|
+
/** is the keyword the main keyword for it's page */
|
|
307
|
+
mainKeyword?: boolean | null;
|
|
308
|
+
}
|
|
309
|
+
interface UpdateKeywordResearchItemsResponse {
|
|
310
|
+
/**
|
|
311
|
+
* keyword research items
|
|
312
|
+
* @maxSize 1000
|
|
313
|
+
*/
|
|
314
|
+
keywordResearchItems?: KeywordResearch[];
|
|
315
|
+
/**
|
|
316
|
+
* id of the keyword research that was returned
|
|
317
|
+
* @format GUID
|
|
318
|
+
*/
|
|
319
|
+
keywordResearchId?: string | null;
|
|
320
|
+
/** whether the keyword research was created by the user */
|
|
321
|
+
createdByUser?: boolean | null;
|
|
322
|
+
/** map of ids of the main keywords by page id */
|
|
323
|
+
mainKeywordMap?: Record<string, string>;
|
|
324
|
+
}
|
|
325
|
+
interface UpdateKeywordResearchItemRequest {
|
|
326
|
+
/**
|
|
327
|
+
* ID of the keyword research the item belongs to.
|
|
328
|
+
*
|
|
329
|
+
* Use the `keywordResearchId` from your most recent read or write.
|
|
330
|
+
* @format GUID
|
|
331
|
+
*/
|
|
332
|
+
keywordResearchId: string | null;
|
|
333
|
+
/** Keyword research item to update. */
|
|
334
|
+
item: UpdatedKeywordResearch;
|
|
335
|
+
/**
|
|
336
|
+
* Fields to update.
|
|
337
|
+
*
|
|
338
|
+
* Must name at least one of `keyword` or `mainKeyword`, the only writable
|
|
339
|
+
* fields. An omitted or empty mask is rejected.
|
|
340
|
+
*/
|
|
341
|
+
fieldMask: string[];
|
|
342
|
+
}
|
|
343
|
+
interface UpdateKeywordResearchItemResponse {
|
|
344
|
+
/** Updated keyword research item. */
|
|
345
|
+
keywordResearchItem?: KeywordResearch;
|
|
346
|
+
/**
|
|
347
|
+
* ID of the keyword research holding the updated item.
|
|
348
|
+
*
|
|
349
|
+
* This can differ from the ID you sent, because the first edit to
|
|
350
|
+
* generated research copies it. Use this value for your next write.
|
|
351
|
+
* @format GUID
|
|
352
|
+
*/
|
|
353
|
+
keywordResearchId?: string | null;
|
|
354
|
+
}
|
|
355
|
+
interface BulkUpdateKeywordResearchItemsRequest {
|
|
356
|
+
/**
|
|
357
|
+
* ID of the keyword research the items belong to.
|
|
358
|
+
*
|
|
359
|
+
* Use the `keywordResearchId` from your most recent read or write.
|
|
360
|
+
* @format GUID
|
|
361
|
+
*/
|
|
362
|
+
keywordResearchId: string | null;
|
|
363
|
+
/**
|
|
364
|
+
* Keyword research items to update.
|
|
365
|
+
*
|
|
366
|
+
* Each item ID must appear at most once. The research holds at most 30
|
|
367
|
+
* keywords once the update is applied.
|
|
368
|
+
* @minSize 1
|
|
369
|
+
* @maxSize 1000
|
|
370
|
+
*/
|
|
371
|
+
items?: UpdatedKeywordResearch[];
|
|
372
|
+
}
|
|
373
|
+
interface BulkUpdateKeywordResearchItemsResponse {
|
|
374
|
+
/**
|
|
375
|
+
* Result for each entry, correlated by `itemMetadata.originalIndex`.
|
|
376
|
+
* @maxSize 1000
|
|
377
|
+
*/
|
|
378
|
+
results?: BulkKeywordResearchItemResult[];
|
|
379
|
+
/** How many entries succeeded and how many failed. */
|
|
380
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
381
|
+
/**
|
|
382
|
+
* The full set of keyword research items after the update.
|
|
383
|
+
* @maxSize 1000
|
|
384
|
+
*/
|
|
385
|
+
keywordResearchItems?: KeywordResearch[];
|
|
386
|
+
/**
|
|
387
|
+
* ID of the keyword research holding the updated items.
|
|
388
|
+
*
|
|
389
|
+
* This can differ from the ID you sent, because the first edit to
|
|
390
|
+
* generated research copies it. Use this value for your next write.
|
|
391
|
+
* @format GUID
|
|
392
|
+
*/
|
|
393
|
+
keywordResearchId?: string | null;
|
|
394
|
+
/** ID of the main keyword for each page, keyed by page ID. */
|
|
395
|
+
mainKeywordMap?: Record<string, string>;
|
|
396
|
+
}
|
|
397
|
+
interface ItemMetadata {
|
|
398
|
+
/**
|
|
399
|
+
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
400
|
+
* @maxLength 100
|
|
401
|
+
*/
|
|
402
|
+
_id?: string | null;
|
|
403
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
404
|
+
originalIndex?: number;
|
|
405
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
406
|
+
success?: boolean;
|
|
407
|
+
/** Details about the error in case of failure. */
|
|
408
|
+
error?: ApplicationError;
|
|
409
|
+
}
|
|
410
|
+
interface ApplicationError {
|
|
411
|
+
/** Error code. */
|
|
412
|
+
code?: string;
|
|
413
|
+
/** Description of the error. */
|
|
414
|
+
description?: string;
|
|
415
|
+
/** Data related to the error. */
|
|
416
|
+
data?: Record<string, any> | null;
|
|
417
|
+
}
|
|
418
|
+
interface BulkKeywordResearchItemResult {
|
|
419
|
+
/** Success/failure and error detail for this entry. */
|
|
420
|
+
itemMetadata?: ItemMetadata;
|
|
421
|
+
}
|
|
422
|
+
interface BulkActionMetadata {
|
|
423
|
+
/** Number of items that were successfully processed. */
|
|
424
|
+
totalSuccesses?: number;
|
|
425
|
+
/** Number of items that couldn't be processed. */
|
|
426
|
+
totalFailures?: number;
|
|
427
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
428
|
+
undetailedFailures?: number;
|
|
429
|
+
}
|
|
430
|
+
interface RevertKeywordResearchRequest {
|
|
431
|
+
/**
|
|
432
|
+
* id of the keyword research to revert
|
|
433
|
+
* @format GUID
|
|
434
|
+
*/
|
|
435
|
+
keywordResearchId?: string | null;
|
|
436
|
+
}
|
|
437
|
+
interface RevertKeywordResearchResponse {
|
|
438
|
+
/**
|
|
439
|
+
* keyword research items
|
|
440
|
+
* @maxSize 1000
|
|
441
|
+
*/
|
|
442
|
+
keywordResearchItems?: KeywordResearch[];
|
|
443
|
+
/**
|
|
444
|
+
* id of the keyword research that was returned
|
|
445
|
+
* @format GUID
|
|
446
|
+
*/
|
|
447
|
+
keywordResearchId?: string | null;
|
|
448
|
+
}
|
|
449
|
+
interface DistributeKeywordsToPagesRequest {
|
|
450
|
+
/**
|
|
451
|
+
* Keywords to distribute
|
|
452
|
+
* @maxSize 1000
|
|
453
|
+
* @maxLength 1000
|
|
454
|
+
*/
|
|
455
|
+
keywords?: string[];
|
|
456
|
+
/**
|
|
457
|
+
* Page essences to match keywords to
|
|
458
|
+
* @maxSize 1000
|
|
459
|
+
*/
|
|
460
|
+
pageEssences?: PageEssenceInput[];
|
|
461
|
+
/**
|
|
462
|
+
* Embedding dimensions (e.g., "256", "512", "1024", "3072")
|
|
463
|
+
* @maxLength 4
|
|
464
|
+
*/
|
|
465
|
+
dimensions?: string | null;
|
|
466
|
+
/** Similarity threshold (default 0.5) */
|
|
467
|
+
similarityThreshold?: number | null;
|
|
468
|
+
}
|
|
469
|
+
interface PageEssenceInput {
|
|
470
|
+
/**
|
|
471
|
+
* Page name
|
|
472
|
+
* @maxLength 1000
|
|
473
|
+
*/
|
|
474
|
+
pageName?: string;
|
|
475
|
+
/**
|
|
476
|
+
* Page ID
|
|
477
|
+
* @maxLength 1000
|
|
478
|
+
*/
|
|
479
|
+
pageId?: string;
|
|
480
|
+
/**
|
|
481
|
+
* Page essence (semantic summary)
|
|
482
|
+
* @maxLength 1000
|
|
483
|
+
*/
|
|
484
|
+
pageEssence?: string;
|
|
485
|
+
/** Is homepage */
|
|
486
|
+
homepage?: boolean;
|
|
487
|
+
}
|
|
488
|
+
interface DistributeKeywordsToPagesResponse {
|
|
489
|
+
/**
|
|
490
|
+
* Distributed keywords with their assigned pages
|
|
491
|
+
* @maxSize 1000
|
|
492
|
+
*/
|
|
493
|
+
distributedKeywords?: DistributedKeyword[];
|
|
494
|
+
}
|
|
495
|
+
interface DistributedKeyword {
|
|
496
|
+
/**
|
|
497
|
+
* The keyword
|
|
498
|
+
* @maxLength 1000
|
|
499
|
+
*/
|
|
500
|
+
keyword?: string;
|
|
501
|
+
/**
|
|
502
|
+
* The assigned page ID
|
|
503
|
+
* @maxLength 1000
|
|
504
|
+
*/
|
|
505
|
+
pageId?: string;
|
|
506
|
+
/** The similarity score */
|
|
507
|
+
score?: number;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Retrieves the keyword research behind the site's current content plan.
|
|
511
|
+
*
|
|
512
|
+
* Returns the research produced by the last completed generation. Research
|
|
513
|
+
* from a generation that's still running, or that failed, isn't readable.
|
|
514
|
+
* Poll Get Content Plan Flow until its status is `SUCCESS`, then call this
|
|
515
|
+
* method.
|
|
516
|
+
*
|
|
517
|
+
* The result is scoped to the site rather than to a flow. This method
|
|
518
|
+
* always returns the site's most recent research and can't target an
|
|
519
|
+
* earlier one. If another generation finishes between your trigger and this
|
|
520
|
+
* read, you receive the newer research instead. Compare `keywordResearchId`
|
|
521
|
+
* across reads to detect that the research was replaced.
|
|
522
|
+
*
|
|
523
|
+
* Omit `paging` to return every item in a single response. When `paging` is
|
|
524
|
+
* present, `limit` accepts 1 to 100 and defaults to 50.
|
|
525
|
+
*
|
|
526
|
+
* A site with no keyword research returns a not found error rather than an
|
|
527
|
+
* empty list.
|
|
528
|
+
* @public
|
|
529
|
+
* @documentationMaturity preview
|
|
530
|
+
* @permissionId promote:seo:v1:content_plan_keyword_research:list_keyword_research_items
|
|
531
|
+
* @applicableIdentity APP
|
|
532
|
+
* @fqn wix.promote.seo.content.plan.v1.KeywordResearchServiceV1.ListKeywordResearchItems
|
|
533
|
+
*/
|
|
534
|
+
declare function listKeywordResearchItems(options?: ListKeywordResearchItemsOptions): Promise<NonNullablePaths<ListKeywordResearchItemsResponse, `keywordResearchItems`, 2>>;
|
|
535
|
+
interface ListKeywordResearchItemsOptions {
|
|
536
|
+
/**
|
|
537
|
+
* Reserved for future use.
|
|
538
|
+
*
|
|
539
|
+
* This method currently resolves the site's most recent keyword research,
|
|
540
|
+
* and this field is ignored.
|
|
541
|
+
* @format GUID
|
|
542
|
+
*/
|
|
543
|
+
contentPlanFlowId?: string | null;
|
|
544
|
+
/**
|
|
545
|
+
* Cursor paging. Omit for the first page.
|
|
546
|
+
*
|
|
547
|
+
* Omit this object entirely to return every item in a single response.
|
|
548
|
+
*/
|
|
549
|
+
paging?: CursorPaging;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Updates a keyword research item.
|
|
553
|
+
*
|
|
554
|
+
* `fieldMask` is required and must name at least one of `keyword` or
|
|
555
|
+
* `mainKeyword`. Those are the only writable fields, and an omitted or
|
|
556
|
+
* empty mask is rejected rather than treated as a request to write
|
|
557
|
+
* everything.
|
|
558
|
+
*
|
|
559
|
+
* `mainKeyword` only promotes. Set it to `true` to make the item its page's
|
|
560
|
+
* main keyword. Setting it to `false`, or leaving it out, changes nothing,
|
|
561
|
+
* so a main keyword can't be demoted with this method.
|
|
562
|
+
*
|
|
563
|
+
* This method updates an item that already exists. It can't add or delete a
|
|
564
|
+
* keyword.
|
|
565
|
+
*
|
|
566
|
+
* The first write to AI-generated research copies that research instead of
|
|
567
|
+
* changing it, so the response can carry a different `keywordResearchId`.
|
|
568
|
+
* Always send the ID from the most recent response on your next write.
|
|
569
|
+
* Sending the original ID again copies the research again.
|
|
570
|
+
*
|
|
571
|
+
* Changing `keyword` also refreshes that item's `searchVolume` and
|
|
572
|
+
* `competition`, even though the mask doesn't name them.
|
|
573
|
+
*
|
|
574
|
+
* Edits don't survive a later generation. A generation that completes after
|
|
575
|
+
* your edit produces fresh research that replaces the edited copy in every
|
|
576
|
+
* read.
|
|
577
|
+
*
|
|
578
|
+
* To update multiple keyword research items in a single API call, call
|
|
579
|
+
* [Bulk Update Keyword Research Items](https://dev.wix.com/docs/api-reference/business-management/seo/content-plan-keyword-research-v1/bulk-update-keyword-research-items).
|
|
580
|
+
* @param _id - ID of the keyword research item to update.
|
|
581
|
+
* @param keywordResearchId - ID of the keyword research the item belongs to.
|
|
582
|
+
*
|
|
583
|
+
* Use the `keywordResearchId` from your most recent read or write.
|
|
584
|
+
* @public
|
|
585
|
+
* @documentationMaturity preview
|
|
586
|
+
* @requiredField _id
|
|
587
|
+
* @requiredField keywordResearchId
|
|
588
|
+
* @requiredField options
|
|
589
|
+
* @requiredField options.fieldMask
|
|
590
|
+
* @requiredField options.item
|
|
591
|
+
* @permissionId promote:seo:v1:content_plan_keyword_research:update_keyword_research_item
|
|
592
|
+
* @applicableIdentity APP
|
|
593
|
+
* @fqn wix.promote.seo.content.plan.v1.KeywordResearchServiceV1.UpdateKeywordResearchItem
|
|
594
|
+
*/
|
|
595
|
+
declare function updateKeywordResearchItem(_id: string, keywordResearchId: string, options: NonNullablePaths<UpdateKeywordResearchItemOptions, `fieldMask` | `item`, 2>): Promise<UpdateKeywordResearchItemResponse>;
|
|
596
|
+
interface UpdateKeywordResearchItemOptions {
|
|
597
|
+
item: {
|
|
598
|
+
/**
|
|
599
|
+
* ID of the keyword research item to update.
|
|
600
|
+
* @format GUID
|
|
601
|
+
*/
|
|
602
|
+
_id?: string | null;
|
|
603
|
+
/**
|
|
604
|
+
* New keyword.
|
|
605
|
+
*
|
|
606
|
+
* Rejected if it's longer than 80 characters, or if it duplicates another
|
|
607
|
+
* keyword in the same research. Changing it also refreshes the item's
|
|
608
|
+
* `searchVolume` and `competition`.
|
|
609
|
+
* @maxLength 1000
|
|
610
|
+
*/
|
|
611
|
+
keyword?: string | null;
|
|
612
|
+
/**
|
|
613
|
+
* Whether to make this item its page's main keyword.
|
|
614
|
+
*
|
|
615
|
+
* Set to `true` to promote it. `false` and omitting the field both leave
|
|
616
|
+
* the current main keyword unchanged, so this field can't demote one.
|
|
617
|
+
*/
|
|
618
|
+
mainKeyword?: boolean | null;
|
|
619
|
+
};
|
|
620
|
+
/**
|
|
621
|
+
* Fields to update.
|
|
622
|
+
*
|
|
623
|
+
* Must name at least one of `keyword` or `mainKeyword`, the only writable
|
|
624
|
+
* fields. An omitted or empty mask is rejected.
|
|
625
|
+
*/
|
|
626
|
+
fieldMask: string[];
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Updates multiple keyword research items.
|
|
630
|
+
*
|
|
631
|
+
* This method has no field mask and writes every field present on each
|
|
632
|
+
* entry. `keyword` and `mainKeyword` remain the only writable fields, and
|
|
633
|
+
* `mainKeyword` only promotes, as it does for a single item. Repeating an
|
|
634
|
+
* item ID within one call is rejected.
|
|
635
|
+
*
|
|
636
|
+
* Validation runs across the whole request before anything is written, so a
|
|
637
|
+
* problem rejects the entire call rather than failing one entry. Every
|
|
638
|
+
* returned entry therefore reports success.
|
|
639
|
+
*
|
|
640
|
+
* A keyword research holds at most 30 keywords, counted after the update.
|
|
641
|
+
* That limit is reached well before the request's own item limit.
|
|
642
|
+
*
|
|
643
|
+
* This method copies AI-generated research the same way a single-item
|
|
644
|
+
* update does, so send the `keywordResearchId` from the response on your
|
|
645
|
+
* next write. Edits don't survive a later generation.
|
|
646
|
+
*
|
|
647
|
+
* To update a single keyword research item, call
|
|
648
|
+
* [Update Keyword Research Item](https://dev.wix.com/docs/api-reference/business-management/seo/content-plan-keyword-research-v1/update-keyword-research-item).
|
|
649
|
+
* @param keywordResearchId - ID of the keyword research the items belong to.
|
|
650
|
+
*
|
|
651
|
+
* Use the `keywordResearchId` from your most recent read or write.
|
|
652
|
+
* @public
|
|
653
|
+
* @documentationMaturity preview
|
|
654
|
+
* @requiredField keywordResearchId
|
|
655
|
+
* @permissionId promote:seo:v1:content_plan_keyword_research:bulk_update_keyword_research_items
|
|
656
|
+
* @applicableIdentity APP
|
|
657
|
+
* @fqn wix.promote.seo.content.plan.v1.KeywordResearchServiceV1.BulkUpdateKeywordResearchItems
|
|
658
|
+
*/
|
|
659
|
+
declare function bulkUpdateKeywordResearchItems(keywordResearchId: string, options?: BulkUpdateKeywordResearchItemsOptions): Promise<NonNullablePaths<BulkUpdateKeywordResearchItemsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures` | `keywordResearchItems`, 6>>;
|
|
660
|
+
interface BulkUpdateKeywordResearchItemsOptions {
|
|
661
|
+
/**
|
|
662
|
+
* Keyword research items to update.
|
|
663
|
+
*
|
|
664
|
+
* Each item ID must appear at most once. The research holds at most 30
|
|
665
|
+
* keywords once the update is applied.
|
|
666
|
+
* @minSize 1
|
|
667
|
+
* @maxSize 1000
|
|
668
|
+
*/
|
|
669
|
+
items?: UpdatedKeywordResearch[];
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export { type AddedKeywordResearch, type ApplicationError, type BulkActionMetadata, type BulkKeywordResearchItemResult, type BulkUpdateKeywordResearchItemsOptions, type BulkUpdateKeywordResearchItemsRequest, type BulkUpdateKeywordResearchItemsResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeletedKeywordResearch, type DistributeKeywordsToPagesRequest, type DistributeKeywordsToPagesResponse, type DistributedKeyword, type GetDraftKeywordResearchItemsRequest, type GetDraftKeywordResearchItemsResponse, type GetKeywordResearchItemsByPageIdRequest, type GetKeywordResearchItemsByPageIdResponse, type GetKeywordResearchItemsRequest, type GetKeywordResearchItemsResponse, type ItemMetadata, type KeywordResearch, type ListKeywordResearchItemsOptions, type ListKeywordResearchItemsRequest, type ListKeywordResearchItemsResponse, type PageEssenceInput, type RevertKeywordResearchRequest, type RevertKeywordResearchResponse, type UpdateKeywordResearchItemOptions, type UpdateKeywordResearchItemRequest, type UpdateKeywordResearchItemResponse, type UpdateKeywordResearchItemsRequest, type UpdateKeywordResearchItemsResponse, type UpdatedKeywordResearch, bulkUpdateKeywordResearchItems, listKeywordResearchItems, updateKeywordResearchItem };
|