@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.
@@ -0,0 +1,527 @@
1
+ import { ListKeywordResearchItemsRequest as ListKeywordResearchItemsRequest$1, ListKeywordResearchItemsResponse as ListKeywordResearchItemsResponse$1, UpdateKeywordResearchItemRequest as UpdateKeywordResearchItemRequest$1, UpdateKeywordResearchItemResponse as UpdateKeywordResearchItemResponse$1, BulkUpdateKeywordResearchItemsRequest as BulkUpdateKeywordResearchItemsRequest$1, BulkUpdateKeywordResearchItemsResponse as BulkUpdateKeywordResearchItemsResponse$1 } from './index.typings.js';
2
+ import '@wix/sdk-types';
3
+
4
+ /**
5
+ * A keyword research item is one target keyword in a site's content plan,
6
+ * together with the search data behind it and the page it belongs to.
7
+ *
8
+ * The content plan pipeline generates a set of these for a site. A site owner
9
+ * can then refine them, and the blog post briefs are built from the result.
10
+ *
11
+ * Items are grouped into clusters. Each site page has one main keyword, marked
12
+ * by `primary`, and the other keywords in that cluster support it.
13
+ */
14
+ interface KeywordResearch {
15
+ /**
16
+ * Keyword research item ID.
17
+ * @format GUID
18
+ * @readonly
19
+ */
20
+ id?: string | null;
21
+ /**
22
+ * The keyword itself.
23
+ *
24
+ * An update is rejected if the new keyword is longer than 80 characters, or
25
+ * if it duplicates another keyword in the same research.
26
+ * @maxLength 1000
27
+ */
28
+ keyword?: string | null;
29
+ /**
30
+ * ID of the site page the keyword is assigned to.
31
+ * @maxLength 1000
32
+ */
33
+ pageId?: string | null;
34
+ /**
35
+ * Type of the site page the keyword is assigned to, such as a static
36
+ * page or a blog post.
37
+ * @maxLength 1000
38
+ */
39
+ itemType?: string | null;
40
+ /**
41
+ * URL of the site page the keyword is assigned to.
42
+ * @maxLength 1000
43
+ */
44
+ pageUrl?: string | null;
45
+ /**
46
+ * How hard it is to rank for the keyword, on a scale where a higher
47
+ * number means more competition.
48
+ *
49
+ * Recalculated when `keyword` changes, even if you don't name this field
50
+ * in the field mask.
51
+ */
52
+ competition?: number | null;
53
+ /**
54
+ * Estimated number of searches for the keyword per month.
55
+ *
56
+ * Recalculated when `keyword` changes, even if you don't name this field
57
+ * in the field mask.
58
+ */
59
+ searchVolume?: number | null;
60
+ /**
61
+ * Whether the site page this keyword is assigned to has been deleted.
62
+ *
63
+ * A keyword assigned to a deleted page stays in the research.
64
+ */
65
+ pageDeleted?: boolean | null;
66
+ /**
67
+ * Whether this keyword is the main keyword for its page.
68
+ *
69
+ * A page has a single main keyword, and the other keywords in its cluster
70
+ * support it.
71
+ */
72
+ primary?: boolean | null;
73
+ /**
74
+ * Name of the cluster that groups this keyword with the others covering
75
+ * the same topic.
76
+ * @maxLength 1000
77
+ */
78
+ clusterName?: string | null;
79
+ }
80
+ interface GetKeywordResearchItemsByPageIdRequest {
81
+ /**
82
+ * ID of the page to retrieve keywords for. Required.
83
+ * @maxLength 1000
84
+ */
85
+ pageId?: string;
86
+ /**
87
+ * Type of the page. Required. Must match a stored item type.
88
+ * Unmatched value returns NOT_FOUND unless a main keyword was already set.
89
+ * @maxLength 1000
90
+ */
91
+ itemType?: string;
92
+ /**
93
+ * Optional. The handler currently resolves the site's latest keyword
94
+ * research and does not read this field. Kept for future use: when the
95
+ * handler is updated to support per-flow lookups, callers will be able to
96
+ * target a specific flow's research instead of always getting the latest.
97
+ * @format GUID
98
+ */
99
+ contentPlanFlowId?: string | null;
100
+ }
101
+ interface GetKeywordResearchItemsByPageIdResponse {
102
+ /**
103
+ * keywords related to the page
104
+ * @maxSize 1000
105
+ */
106
+ keywordResearchItems?: KeywordResearch[];
107
+ /**
108
+ * id of the main keyword for this page
109
+ * @format GUID
110
+ */
111
+ mainKeywordId?: string | null;
112
+ }
113
+ interface ListKeywordResearchItemsRequest {
114
+ /**
115
+ * Reserved for future use.
116
+ *
117
+ * This method currently resolves the site's most recent keyword research,
118
+ * and this field is ignored.
119
+ * @format GUID
120
+ */
121
+ contentPlanFlowId?: string | null;
122
+ /**
123
+ * Cursor paging. Omit for the first page.
124
+ *
125
+ * Omit this object entirely to return every item in a single response.
126
+ */
127
+ paging?: CursorPaging;
128
+ }
129
+ interface CursorPaging {
130
+ /**
131
+ * Max items per page. Default 50, max 100.
132
+ * @max 100
133
+ */
134
+ limit?: number | null;
135
+ /**
136
+ * Cursor from a previous response. Omit for the first page.
137
+ * @maxLength 16000
138
+ */
139
+ cursor?: string | null;
140
+ }
141
+ interface ListKeywordResearchItemsResponse {
142
+ /**
143
+ * Retrieved keyword research items.
144
+ * @maxSize 1000
145
+ */
146
+ keywordResearchItems?: KeywordResearch[];
147
+ /**
148
+ * ID of the keyword research these items belong to.
149
+ *
150
+ * Send this ID when you update an item. Compare it across reads to detect
151
+ * that a newer generation replaced the research.
152
+ * @format GUID
153
+ */
154
+ keywordResearchId?: string | null;
155
+ /**
156
+ * Whether this research has been edited.
157
+ *
158
+ * `false` means the research is exactly as the content plan generated it,
159
+ * so the next edit copies it onto a new `keywordResearchId`.
160
+ */
161
+ createdByUser?: boolean | null;
162
+ /**
163
+ * ID of the main keyword for each page, keyed by page ID.
164
+ *
165
+ * Built from the site's full item set, so on a paged response it can name
166
+ * items that aren't in `keywordResearchItems`.
167
+ */
168
+ mainKeywordMap?: Record<string, string>;
169
+ /** Paging metadata. */
170
+ pagingMetadata?: CursorPagingMetadata;
171
+ }
172
+ interface CursorPagingMetadata {
173
+ /** Items returned in this page. */
174
+ count?: number | null;
175
+ /** Cursors for next/previous page. */
176
+ cursors?: Cursors;
177
+ /** Whether there are more pages. */
178
+ hasNext?: boolean | null;
179
+ }
180
+ interface Cursors {
181
+ /**
182
+ * Cursor for the next page.
183
+ * @maxLength 16000
184
+ */
185
+ next?: string | null;
186
+ /**
187
+ * Cursor for the previous page.
188
+ * @maxLength 16000
189
+ */
190
+ prev?: string | null;
191
+ }
192
+ /** Deprecated alias request. Same fields as ListKeywordResearchItemsRequest. */
193
+ interface GetKeywordResearchItemsRequest {
194
+ /**
195
+ * Deprecated. Ignored by the handler.
196
+ * @format GUID
197
+ */
198
+ contentPlanFlowId?: string | null;
199
+ /** Cursor paging. */
200
+ paging?: CursorPaging;
201
+ }
202
+ /** Deprecated alias response. Same fields as ListKeywordResearchItemsResponse. */
203
+ interface GetKeywordResearchItemsResponse {
204
+ /**
205
+ * Keyword research items.
206
+ * @maxSize 1000
207
+ */
208
+ keywordResearchItems?: KeywordResearch[];
209
+ /**
210
+ * ID of the keyword research.
211
+ * @format GUID
212
+ */
213
+ keywordResearchId?: string | null;
214
+ /** Whether the research was user-created. */
215
+ createdByUser?: boolean | null;
216
+ /** Main keyword IDs by page ID. */
217
+ mainKeywordMap?: Record<string, string>;
218
+ /** Paging metadata. */
219
+ pagingMetadata?: CursorPagingMetadata;
220
+ }
221
+ interface GetDraftKeywordResearchItemsRequest {
222
+ /**
223
+ * id of the content plan flow this keyword research belongs to
224
+ * @format GUID
225
+ */
226
+ contentPlanFlowId?: string | null;
227
+ }
228
+ interface GetDraftKeywordResearchItemsResponse {
229
+ /**
230
+ * keyword research items
231
+ * @maxSize 1000
232
+ */
233
+ keywordResearchItems?: KeywordResearch[];
234
+ /**
235
+ * id of the keyword research that was returned
236
+ * @format GUID
237
+ */
238
+ keywordResearchId?: string | null;
239
+ /** whether the keyword research was created by the user */
240
+ createdByUser?: boolean | null;
241
+ /** map of ids of the main keywords by page id */
242
+ mainKeywordMap?: Record<string, string>;
243
+ }
244
+ interface UpdateKeywordResearchItemsRequest {
245
+ /**
246
+ * updated keyword research items
247
+ * @maxSize 1000
248
+ */
249
+ updatedItems?: UpdatedKeywordResearch[];
250
+ /**
251
+ * deleted keyword research items
252
+ * @maxSize 1000
253
+ */
254
+ deletedItems?: DeletedKeywordResearch[];
255
+ /**
256
+ * added keyword research items
257
+ * @maxSize 1000
258
+ */
259
+ addedItems?: AddedKeywordResearch[];
260
+ /**
261
+ * id of the keyword research to be updated
262
+ * @format GUID
263
+ */
264
+ keywordResearchId?: string | null;
265
+ }
266
+ interface UpdatedKeywordResearch {
267
+ /**
268
+ * ID of the keyword research item to update.
269
+ * @format GUID
270
+ */
271
+ id?: string | null;
272
+ /**
273
+ * New keyword.
274
+ *
275
+ * Rejected if it's longer than 80 characters, or if it duplicates another
276
+ * keyword in the same research. Changing it also refreshes the item's
277
+ * `searchVolume` and `competition`.
278
+ * @maxLength 1000
279
+ */
280
+ keyword?: string | null;
281
+ /**
282
+ * Whether to make this item its page's main keyword.
283
+ *
284
+ * Set to `true` to promote it. `false` and omitting the field both leave
285
+ * the current main keyword unchanged, so this field can't demote one.
286
+ */
287
+ mainKeyword?: boolean | null;
288
+ }
289
+ interface DeletedKeywordResearch {
290
+ /**
291
+ * ID of the keyword research item to delete.
292
+ * @format GUID
293
+ */
294
+ id?: string | null;
295
+ }
296
+ interface AddedKeywordResearch {
297
+ /**
298
+ * keyword of the keyword research item
299
+ * @maxLength 1000
300
+ */
301
+ keyword?: string | null;
302
+ /**
303
+ * page id the keyword relates to
304
+ * @maxLength 1000
305
+ */
306
+ pageId?: string | null;
307
+ /** is the keyword the main keyword for it's page */
308
+ mainKeyword?: boolean | null;
309
+ }
310
+ interface UpdateKeywordResearchItemsResponse {
311
+ /**
312
+ * keyword research items
313
+ * @maxSize 1000
314
+ */
315
+ keywordResearchItems?: KeywordResearch[];
316
+ /**
317
+ * id of the keyword research that was returned
318
+ * @format GUID
319
+ */
320
+ keywordResearchId?: string | null;
321
+ /** whether the keyword research was created by the user */
322
+ createdByUser?: boolean | null;
323
+ /** map of ids of the main keywords by page id */
324
+ mainKeywordMap?: Record<string, string>;
325
+ }
326
+ interface UpdateKeywordResearchItemRequest {
327
+ /**
328
+ * ID of the keyword research the item belongs to.
329
+ *
330
+ * Use the `keywordResearchId` from your most recent read or write.
331
+ * @format GUID
332
+ */
333
+ keywordResearchId: string | null;
334
+ /** Keyword research item to update. */
335
+ item: UpdatedKeywordResearch;
336
+ /**
337
+ * Fields to update.
338
+ *
339
+ * Must name at least one of `keyword` or `mainKeyword`, the only writable
340
+ * fields. An omitted or empty mask is rejected.
341
+ */
342
+ fieldMask: string[];
343
+ }
344
+ interface UpdateKeywordResearchItemResponse {
345
+ /** Updated keyword research item. */
346
+ keywordResearchItem?: KeywordResearch;
347
+ /**
348
+ * ID of the keyword research holding the updated item.
349
+ *
350
+ * This can differ from the ID you sent, because the first edit to
351
+ * generated research copies it. Use this value for your next write.
352
+ * @format GUID
353
+ */
354
+ keywordResearchId?: string | null;
355
+ }
356
+ interface BulkUpdateKeywordResearchItemsRequest {
357
+ /**
358
+ * ID of the keyword research the items belong to.
359
+ *
360
+ * Use the `keywordResearchId` from your most recent read or write.
361
+ * @format GUID
362
+ */
363
+ keywordResearchId: string | null;
364
+ /**
365
+ * Keyword research items to update.
366
+ *
367
+ * Each item ID must appear at most once. The research holds at most 30
368
+ * keywords once the update is applied.
369
+ * @minSize 1
370
+ * @maxSize 1000
371
+ */
372
+ items?: UpdatedKeywordResearch[];
373
+ }
374
+ interface BulkUpdateKeywordResearchItemsResponse {
375
+ /**
376
+ * Result for each entry, correlated by `itemMetadata.originalIndex`.
377
+ * @maxSize 1000
378
+ */
379
+ results?: BulkKeywordResearchItemResult[];
380
+ /** How many entries succeeded and how many failed. */
381
+ bulkActionMetadata?: BulkActionMetadata;
382
+ /**
383
+ * The full set of keyword research items after the update.
384
+ * @maxSize 1000
385
+ */
386
+ keywordResearchItems?: KeywordResearch[];
387
+ /**
388
+ * ID of the keyword research holding the updated items.
389
+ *
390
+ * This can differ from the ID you sent, because the first edit to
391
+ * generated research copies it. Use this value for your next write.
392
+ * @format GUID
393
+ */
394
+ keywordResearchId?: string | null;
395
+ /** ID of the main keyword for each page, keyed by page ID. */
396
+ mainKeywordMap?: Record<string, string>;
397
+ }
398
+ interface ItemMetadata {
399
+ /**
400
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
401
+ * @maxLength 100
402
+ */
403
+ id?: string | null;
404
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
405
+ originalIndex?: number;
406
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
407
+ success?: boolean;
408
+ /** Details about the error in case of failure. */
409
+ error?: ApplicationError;
410
+ }
411
+ interface ApplicationError {
412
+ /** Error code. */
413
+ code?: string;
414
+ /** Description of the error. */
415
+ description?: string;
416
+ /** Data related to the error. */
417
+ data?: Record<string, any> | null;
418
+ }
419
+ interface BulkKeywordResearchItemResult {
420
+ /** Success/failure and error detail for this entry. */
421
+ itemMetadata?: ItemMetadata;
422
+ }
423
+ interface BulkActionMetadata {
424
+ /** Number of items that were successfully processed. */
425
+ totalSuccesses?: number;
426
+ /** Number of items that couldn't be processed. */
427
+ totalFailures?: number;
428
+ /** Number of failures without details because detailed failure threshold was exceeded. */
429
+ undetailedFailures?: number;
430
+ }
431
+ interface RevertKeywordResearchRequest {
432
+ /**
433
+ * id of the keyword research to revert
434
+ * @format GUID
435
+ */
436
+ keywordResearchId?: string | null;
437
+ }
438
+ interface RevertKeywordResearchResponse {
439
+ /**
440
+ * keyword research items
441
+ * @maxSize 1000
442
+ */
443
+ keywordResearchItems?: KeywordResearch[];
444
+ /**
445
+ * id of the keyword research that was returned
446
+ * @format GUID
447
+ */
448
+ keywordResearchId?: string | null;
449
+ }
450
+ interface DistributeKeywordsToPagesRequest {
451
+ /**
452
+ * Keywords to distribute
453
+ * @maxSize 1000
454
+ * @maxLength 1000
455
+ */
456
+ keywords?: string[];
457
+ /**
458
+ * Page essences to match keywords to
459
+ * @maxSize 1000
460
+ */
461
+ pageEssences?: PageEssenceInput[];
462
+ /**
463
+ * Embedding dimensions (e.g., "256", "512", "1024", "3072")
464
+ * @maxLength 4
465
+ */
466
+ dimensions?: string | null;
467
+ /** Similarity threshold (default 0.5) */
468
+ similarityThreshold?: number | null;
469
+ }
470
+ interface PageEssenceInput {
471
+ /**
472
+ * Page name
473
+ * @maxLength 1000
474
+ */
475
+ pageName?: string;
476
+ /**
477
+ * Page ID
478
+ * @maxLength 1000
479
+ */
480
+ pageId?: string;
481
+ /**
482
+ * Page essence (semantic summary)
483
+ * @maxLength 1000
484
+ */
485
+ pageEssence?: string;
486
+ /** Is homepage */
487
+ homepage?: boolean;
488
+ }
489
+ interface DistributeKeywordsToPagesResponse {
490
+ /**
491
+ * Distributed keywords with their assigned pages
492
+ * @maxSize 1000
493
+ */
494
+ distributedKeywords?: DistributedKeyword[];
495
+ }
496
+ interface DistributedKeyword {
497
+ /**
498
+ * The keyword
499
+ * @maxLength 1000
500
+ */
501
+ keyword?: string;
502
+ /**
503
+ * The assigned page ID
504
+ * @maxLength 1000
505
+ */
506
+ pageId?: string;
507
+ /** The similarity score */
508
+ score?: number;
509
+ }
510
+
511
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
512
+ getUrl: (context: any) => string;
513
+ httpMethod: K;
514
+ path: string;
515
+ pathParams: M;
516
+ __requestType: T;
517
+ __originalRequestType: S;
518
+ __responseType: Q;
519
+ __originalResponseType: R;
520
+ };
521
+ declare function listKeywordResearchItems(): __PublicMethodMetaInfo<'GET', {}, ListKeywordResearchItemsRequest$1, ListKeywordResearchItemsRequest, ListKeywordResearchItemsResponse$1, ListKeywordResearchItemsResponse>;
522
+ declare function updateKeywordResearchItem(): __PublicMethodMetaInfo<'PATCH', {
523
+ itemId: string;
524
+ }, UpdateKeywordResearchItemRequest$1, UpdateKeywordResearchItemRequest, UpdateKeywordResearchItemResponse$1, UpdateKeywordResearchItemResponse>;
525
+ declare function bulkUpdateKeywordResearchItems(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateKeywordResearchItemsRequest$1, BulkUpdateKeywordResearchItemsRequest, BulkUpdateKeywordResearchItemsResponse$1, BulkUpdateKeywordResearchItemsResponse>;
526
+
527
+ export { type AddedKeywordResearch as AddedKeywordResearchOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkKeywordResearchItemResult as BulkKeywordResearchItemResultOriginal, type BulkUpdateKeywordResearchItemsRequest as BulkUpdateKeywordResearchItemsRequestOriginal, type BulkUpdateKeywordResearchItemsResponse as BulkUpdateKeywordResearchItemsResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DeletedKeywordResearch as DeletedKeywordResearchOriginal, type DistributeKeywordsToPagesRequest as DistributeKeywordsToPagesRequestOriginal, type DistributeKeywordsToPagesResponse as DistributeKeywordsToPagesResponseOriginal, type DistributedKeyword as DistributedKeywordOriginal, type GetDraftKeywordResearchItemsRequest as GetDraftKeywordResearchItemsRequestOriginal, type GetDraftKeywordResearchItemsResponse as GetDraftKeywordResearchItemsResponseOriginal, type GetKeywordResearchItemsByPageIdRequest as GetKeywordResearchItemsByPageIdRequestOriginal, type GetKeywordResearchItemsByPageIdResponse as GetKeywordResearchItemsByPageIdResponseOriginal, type GetKeywordResearchItemsRequest as GetKeywordResearchItemsRequestOriginal, type GetKeywordResearchItemsResponse as GetKeywordResearchItemsResponseOriginal, type ItemMetadata as ItemMetadataOriginal, type KeywordResearch as KeywordResearchOriginal, type ListKeywordResearchItemsRequest as ListKeywordResearchItemsRequestOriginal, type ListKeywordResearchItemsResponse as ListKeywordResearchItemsResponseOriginal, type PageEssenceInput as PageEssenceInputOriginal, type RevertKeywordResearchRequest as RevertKeywordResearchRequestOriginal, type RevertKeywordResearchResponse as RevertKeywordResearchResponseOriginal, type UpdateKeywordResearchItemRequest as UpdateKeywordResearchItemRequestOriginal, type UpdateKeywordResearchItemResponse as UpdateKeywordResearchItemResponseOriginal, type UpdateKeywordResearchItemsRequest as UpdateKeywordResearchItemsRequestOriginal, type UpdateKeywordResearchItemsResponse as UpdateKeywordResearchItemsResponseOriginal, type UpdatedKeywordResearch as UpdatedKeywordResearchOriginal, type __PublicMethodMetaInfo, bulkUpdateKeywordResearchItems, listKeywordResearchItems, updateKeywordResearchItem };