@wix/auto_sdk_seo_content-plan-flows 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,486 @@
1
+ import { GetContentPlanFlowRequest as GetContentPlanFlowRequest$1, GetContentPlanFlowResponse as GetContentPlanFlowResponse$1, TriggerContentPlanGenerationFlowRequest as TriggerContentPlanGenerationFlowRequest$1, TriggerContentPlanGenerationFlowResponse as TriggerContentPlanGenerationFlowResponse$1, CancelContentPlanFlowRequest as CancelContentPlanFlowRequest$1, CancelContentPlanFlowResponse as CancelContentPlanFlowResponse$1 } from './index.typings.mjs';
2
+ import '@wix/sdk-types';
3
+
4
+ /**
5
+ * A content plan flow tracks the generation of an SEO content plan for a site.
6
+ *
7
+ * A content plan is a set of blog post briefs built from the site's pages, its
8
+ * business category, and real search volume data. Generating one takes several
9
+ * minutes, so the flow runs asynchronously and reports its progress in `status`.
10
+ *
11
+ * A flow doesn't run to completion on its own. It stops at `KEYWORD_RESEARCH`
12
+ * and waits for a call to Create Content Plan before it continues.
13
+ */
14
+ interface ContentPlanFlow {
15
+ /**
16
+ * Content plan flow ID.
17
+ * @format GUID
18
+ * @readonly
19
+ */
20
+ id?: string | null;
21
+ /**
22
+ * Date and time the content plan flow was created.
23
+ * @maxLength 100
24
+ */
25
+ createdAt?: string | null;
26
+ /**
27
+ * Date and time the content plan flow was updated.
28
+ * @maxLength 100
29
+ */
30
+ updatedAt?: string | null;
31
+ /**
32
+ * Current status of the content plan flow.
33
+ *
34
+ * The status advances on its own as generation progresses, except at
35
+ * `KEYWORD_RESEARCH`, where the flow waits for a call to Create Content
36
+ * Plan.
37
+ */
38
+ status?: StatusWithLiterals;
39
+ /**
40
+ * What started the content plan flow. Flows started by an app are
41
+ * recorded as `AGENT`.
42
+ * @maxLength 100
43
+ */
44
+ origin?: string | null;
45
+ /**
46
+ * ID of the site content summary the flow produced.
47
+ * @format GUID
48
+ */
49
+ summaryId?: string | null;
50
+ /**
51
+ * ID of the keyword research the flow produced.
52
+ *
53
+ * Available once `status` is `KEYWORD_RESEARCH` or later.
54
+ * @format GUID
55
+ */
56
+ keywordResearchId?: string | null;
57
+ }
58
+ declare enum Status {
59
+ /** The flow is created and the generation pipeline is starting. */
60
+ CREATED = "CREATED",
61
+ /** The site's existing content is being summarized. */
62
+ SITE_SUMMARY = "SITE_SUMMARY",
63
+ /**
64
+ * Keyword research is complete and the flow is waiting. Call Create
65
+ * Content Plan to generate the blog post briefs and continue the flow.
66
+ */
67
+ KEYWORD_RESEARCH = "KEYWORD_RESEARCH",
68
+ /** Blog post briefs are being generated from the keyword research. */
69
+ CONTENT_PLAN = "CONTENT_PLAN",
70
+ /**
71
+ * Generation is complete. Retrieve the results with List Blog Post
72
+ * Candidates and List Keyword Research Items.
73
+ */
74
+ SUCCESS = "SUCCESS",
75
+ /** Generation failed. Trigger a flow to try again. */
76
+ FAIL = "FAIL",
77
+ /**
78
+ * The site is missing business information that keyword research
79
+ * requires. The flow resumes automatically once the information is
80
+ * added to the site.
81
+ */
82
+ PENDING_REQUIREMENTS = "PENDING_REQUIREMENTS",
83
+ /** The flow was canceled and can't be resumed. */
84
+ CANCELED = "CANCELED",
85
+ /** The site's pages are being analyzed. */
86
+ SITE_ANALYSIS = "SITE_ANALYSIS"
87
+ }
88
+ /** @enumType */
89
+ type StatusWithLiterals = Status | 'CREATED' | 'SITE_SUMMARY' | 'KEYWORD_RESEARCH' | 'CONTENT_PLAN' | 'SUCCESS' | 'FAIL' | 'PENDING_REQUIREMENTS' | 'CANCELED' | 'SITE_ANALYSIS';
90
+ interface GetContentPlanFlowRequest {
91
+ /**
92
+ * ID of the content plan flow to retrieve.
93
+ *
94
+ * Omit to retrieve the site's most recent successful flow.
95
+ * @format GUID
96
+ */
97
+ contentPlanFlowId: string | null;
98
+ }
99
+ interface GetContentPlanFlowResponse {
100
+ /** Retrieved content plan flow. */
101
+ contentPlanFlow?: ContentPlanFlow;
102
+ }
103
+ interface TriggerContentPlanGenerationFlowRequest {
104
+ }
105
+ interface TriggerContentPlanGenerationFlowResponse {
106
+ /**
107
+ * ID of the content plan flow that was created.
108
+ *
109
+ * Poll Get Content Plan Flow with this ID to follow the flow's progress.
110
+ * @format GUID
111
+ */
112
+ contentPlanFlowId?: string | null;
113
+ }
114
+ interface ExecuteActionRequest {
115
+ /**
116
+ * the execution id
117
+ * @format GUID
118
+ */
119
+ executionId?: string;
120
+ /**
121
+ * the action id
122
+ * @maxLength 1000
123
+ */
124
+ actionId?: string;
125
+ /** item data - if relevant */
126
+ item?: ItemData;
127
+ /** whether to reset the current content of the action */
128
+ reset?: boolean;
129
+ }
130
+ interface ItemData extends ItemDataPayloadDataOneOf {
131
+ blogData?: BlogData;
132
+ /**
133
+ * id
134
+ * @maxLength 1000
135
+ */
136
+ id?: string;
137
+ /**
138
+ * type
139
+ * @maxLength 1000
140
+ */
141
+ type?: string;
142
+ }
143
+ /** @oneof */
144
+ interface ItemDataPayloadDataOneOf {
145
+ blogData?: BlogData;
146
+ }
147
+ interface BlogData {
148
+ /**
149
+ * prompt
150
+ * @maxLength 10000
151
+ */
152
+ prompt?: string;
153
+ }
154
+ interface ExecuteActionResponse {
155
+ /** Whether the suggestion succeeded */
156
+ success?: boolean;
157
+ /** Whether the operation is async */
158
+ async?: boolean;
159
+ /**
160
+ * Optional internal message
161
+ * @maxLength 1000
162
+ */
163
+ message?: string;
164
+ /** Optional display message */
165
+ displayMessage?: DisplayMessage;
166
+ /** The payload of the action, also the suggestion itself. */
167
+ payload?: ActionPayload;
168
+ /** Total action cost in microcents (1 microcent = $0.00001). If omitted or zero, PMA uses configured credit cost. */
169
+ costInMicrocents?: number | null;
170
+ }
171
+ interface DisplayMessage {
172
+ /**
173
+ * Message to show to the user
174
+ * @maxLength 1000
175
+ */
176
+ message?: string;
177
+ /** Optional call to action */
178
+ cta?: ActionCta;
179
+ }
180
+ interface ActionCta {
181
+ /**
182
+ * CTA title
183
+ * @maxLength 1000
184
+ */
185
+ title?: string;
186
+ /**
187
+ * CTA URL
188
+ * @maxLength 1000
189
+ */
190
+ url?: string;
191
+ }
192
+ interface ActionPayload {
193
+ /**
194
+ * Description of the suggestion
195
+ * @maxLength 1000
196
+ */
197
+ description?: string;
198
+ /**
199
+ * Optional motivation for the suggestion
200
+ * @maxLength 1000
201
+ */
202
+ motivation?: string;
203
+ /** Optional entity being suggested */
204
+ entity?: Entity;
205
+ /**
206
+ * Optional changes suggested
207
+ * @maxSize 100
208
+ */
209
+ changes?: Change[];
210
+ /**
211
+ * Optional items suggested
212
+ * @maxSize 100
213
+ */
214
+ items?: Item[];
215
+ /** Optional preview link */
216
+ previewLink?: ActionCta;
217
+ }
218
+ interface Entity {
219
+ /**
220
+ * Entity ID
221
+ * @maxLength 100
222
+ */
223
+ id?: string;
224
+ /**
225
+ * Optional entity name
226
+ * @maxLength 1000
227
+ */
228
+ name?: string;
229
+ }
230
+ interface Change {
231
+ /**
232
+ * Change ID
233
+ * @maxLength 100
234
+ */
235
+ id?: string;
236
+ /**
237
+ * Change title
238
+ * @maxLength 1000
239
+ */
240
+ title?: string;
241
+ /**
242
+ * The resulting state after the change
243
+ * @maxLength 1000
244
+ */
245
+ after?: string;
246
+ /**
247
+ * Optional description
248
+ * @maxLength 1000
249
+ */
250
+ description?: string;
251
+ /**
252
+ * Optional state before the change
253
+ * @maxLength 1000
254
+ */
255
+ before?: string;
256
+ /** Optional: is this a suggestion or a confirmed change */
257
+ isSuggestion?: boolean;
258
+ /**
259
+ * Optional type of change
260
+ * @maxLength 100
261
+ */
262
+ type?: string;
263
+ }
264
+ interface Item {
265
+ /**
266
+ * Item ID
267
+ * @maxLength 100
268
+ */
269
+ id?: string;
270
+ /**
271
+ * Item title
272
+ * @maxLength 1000
273
+ */
274
+ title?: string;
275
+ /**
276
+ * Optional description
277
+ * @maxLength 1000
278
+ */
279
+ description?: string;
280
+ /**
281
+ * Optional images
282
+ * @maxSize 100
283
+ * @maxLength 1000
284
+ */
285
+ images?: string[];
286
+ /** Optional preview link */
287
+ previewLink?: ActionCta;
288
+ /**
289
+ * Optional motivation for suggesting this item
290
+ * @maxLength 1000
291
+ */
292
+ motivation?: string;
293
+ /** Data */
294
+ data?: Record<string, any> | null;
295
+ /**
296
+ * The content plan item id which this item created by
297
+ * @maxLength 100
298
+ */
299
+ contentPlanItemId?: string;
300
+ /** scheduled date */
301
+ scheduledDate?: Date | null;
302
+ }
303
+ interface CancelContentPlanFlowRequest {
304
+ /**
305
+ * ID of the content plan flow to cancel.
306
+ * @format GUID
307
+ */
308
+ contentPlanFlowId: string | null;
309
+ }
310
+ interface CancelContentPlanFlowResponse {
311
+ }
312
+ interface DomainEvent extends DomainEventBodyOneOf {
313
+ createdEvent?: EntityCreatedEvent;
314
+ updatedEvent?: EntityUpdatedEvent;
315
+ deletedEvent?: EntityDeletedEvent;
316
+ actionEvent?: ActionEvent;
317
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
318
+ id?: string;
319
+ /**
320
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
321
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
322
+ */
323
+ entityFqdn?: string;
324
+ /**
325
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
326
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
327
+ */
328
+ slug?: string;
329
+ /** ID of the entity associated with the event. */
330
+ entityId?: string;
331
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
332
+ eventTime?: Date | null;
333
+ /**
334
+ * Whether the event was triggered as a result of a privacy regulation application
335
+ * (for example, GDPR).
336
+ */
337
+ triggeredByAnonymizeRequest?: boolean | null;
338
+ /** If present, indicates the action that triggered the event. */
339
+ originatedFrom?: string | null;
340
+ /**
341
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
342
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
343
+ */
344
+ entityEventSequence?: string | null;
345
+ }
346
+ /** @oneof */
347
+ interface DomainEventBodyOneOf {
348
+ createdEvent?: EntityCreatedEvent;
349
+ updatedEvent?: EntityUpdatedEvent;
350
+ deletedEvent?: EntityDeletedEvent;
351
+ actionEvent?: ActionEvent;
352
+ }
353
+ interface EntityCreatedEvent {
354
+ entityAsJson?: string;
355
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
356
+ restoreInfo?: RestoreInfo;
357
+ }
358
+ interface RestoreInfo {
359
+ deletedDate?: Date | null;
360
+ }
361
+ interface EntityUpdatedEvent {
362
+ /**
363
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
364
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
365
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
366
+ */
367
+ currentEntityAsJson?: string;
368
+ }
369
+ interface EntityDeletedEvent {
370
+ /** Entity that was deleted. */
371
+ deletedEntityAsJson?: string | null;
372
+ }
373
+ interface ActionEvent {
374
+ bodyAsJson?: string;
375
+ }
376
+ interface MessageEnvelope {
377
+ /**
378
+ * App instance ID.
379
+ * @format GUID
380
+ */
381
+ instanceId?: string | null;
382
+ /**
383
+ * Event type.
384
+ * @maxLength 150
385
+ */
386
+ eventType?: string;
387
+ /** The identification type and identity data. */
388
+ identity?: IdentificationData;
389
+ /** Stringify payload. */
390
+ data?: string;
391
+ /** Details related to the account */
392
+ accountInfo?: AccountInfo;
393
+ }
394
+ interface IdentificationData extends IdentificationDataIdOneOf {
395
+ /**
396
+ * ID of a site visitor that has not logged in to the site.
397
+ * @format GUID
398
+ */
399
+ anonymousVisitorId?: string;
400
+ /**
401
+ * ID of a site visitor that has logged in to the site.
402
+ * @format GUID
403
+ */
404
+ memberId?: string;
405
+ /**
406
+ * ID of a Wix user (site owner, contributor, etc.).
407
+ * @format GUID
408
+ */
409
+ wixUserId?: string;
410
+ /**
411
+ * ID of an app.
412
+ * @format GUID
413
+ */
414
+ appId?: string;
415
+ /** @readonly */
416
+ identityType?: WebhookIdentityTypeWithLiterals;
417
+ }
418
+ /** @oneof */
419
+ interface IdentificationDataIdOneOf {
420
+ /**
421
+ * ID of a site visitor that has not logged in to the site.
422
+ * @format GUID
423
+ */
424
+ anonymousVisitorId?: string;
425
+ /**
426
+ * ID of a site visitor that has logged in to the site.
427
+ * @format GUID
428
+ */
429
+ memberId?: string;
430
+ /**
431
+ * ID of a Wix user (site owner, contributor, etc.).
432
+ * @format GUID
433
+ */
434
+ wixUserId?: string;
435
+ /**
436
+ * ID of an app.
437
+ * @format GUID
438
+ */
439
+ appId?: string;
440
+ }
441
+ declare enum WebhookIdentityType {
442
+ UNKNOWN = "UNKNOWN",
443
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
444
+ MEMBER = "MEMBER",
445
+ WIX_USER = "WIX_USER",
446
+ APP = "APP"
447
+ }
448
+ /** @enumType */
449
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
450
+ interface AccountInfo {
451
+ /**
452
+ * ID of the Wix account associated with the event.
453
+ * @format GUID
454
+ */
455
+ accountId?: string | null;
456
+ /**
457
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
458
+ * @format GUID
459
+ */
460
+ parentAccountId?: string | null;
461
+ /**
462
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
463
+ * @format GUID
464
+ */
465
+ siteId?: string | null;
466
+ }
467
+
468
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
469
+ getUrl: (context: any) => string;
470
+ httpMethod: K;
471
+ path: string;
472
+ pathParams: M;
473
+ __requestType: T;
474
+ __originalRequestType: S;
475
+ __responseType: Q;
476
+ __originalResponseType: R;
477
+ };
478
+ declare function getContentPlanFlow(): __PublicMethodMetaInfo<'GET', {
479
+ contentPlanFlowId: string;
480
+ }, GetContentPlanFlowRequest$1, GetContentPlanFlowRequest, GetContentPlanFlowResponse$1, GetContentPlanFlowResponse>;
481
+ declare function triggerContentPlanGenerationFlow(): __PublicMethodMetaInfo<'POST', {}, TriggerContentPlanGenerationFlowRequest$1, TriggerContentPlanGenerationFlowRequest, TriggerContentPlanGenerationFlowResponse$1, TriggerContentPlanGenerationFlowResponse>;
482
+ declare function cancelContentPlanFlow(): __PublicMethodMetaInfo<'POST', {
483
+ contentPlanFlowId: string;
484
+ }, CancelContentPlanFlowRequest$1, CancelContentPlanFlowRequest, CancelContentPlanFlowResponse$1, CancelContentPlanFlowResponse>;
485
+
486
+ export { type AccountInfo as AccountInfoOriginal, type ActionCta as ActionCtaOriginal, type ActionEvent as ActionEventOriginal, type ActionPayload as ActionPayloadOriginal, type BlogData as BlogDataOriginal, type CancelContentPlanFlowRequest as CancelContentPlanFlowRequestOriginal, type CancelContentPlanFlowResponse as CancelContentPlanFlowResponseOriginal, type Change as ChangeOriginal, type ContentPlanFlow as ContentPlanFlowOriginal, type DisplayMessage as DisplayMessageOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type Entity as EntityOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExecuteActionRequest as ExecuteActionRequestOriginal, type ExecuteActionResponse as ExecuteActionResponseOriginal, type GetContentPlanFlowRequest as GetContentPlanFlowRequestOriginal, type GetContentPlanFlowResponse as GetContentPlanFlowResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemData as ItemDataOriginal, type ItemDataPayloadDataOneOf as ItemDataPayloadDataOneOfOriginal, type Item as ItemOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type RestoreInfo as RestoreInfoOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type TriggerContentPlanGenerationFlowRequest as TriggerContentPlanGenerationFlowRequestOriginal, type TriggerContentPlanGenerationFlowResponse as TriggerContentPlanGenerationFlowResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, cancelContentPlanFlow, getContentPlanFlow, triggerContentPlanGenerationFlow };