@wix/auto_sdk_containers_plans 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,842 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ interface Plan {
4
+ /**
5
+ * Plan ID.
6
+ * @format GUID
7
+ * @readonly
8
+ */
9
+ _id?: string | null;
10
+ /**
11
+ * Revision number, which increments by 1 each time the Plan is updated.
12
+ * @readonly
13
+ */
14
+ revision?: string | null;
15
+ /**
16
+ * Date and time the Plan was created.
17
+ * @readonly
18
+ */
19
+ _createdDate?: Date | null;
20
+ /**
21
+ * Date and time the Plan was last updated.
22
+ * @readonly
23
+ */
24
+ _updatedDate?: Date | null;
25
+ /**
26
+ * The user's initial free-text prompt that started the plan.
27
+ * @maxLength 10000
28
+ */
29
+ initialPrompt?: string;
30
+ /** Generation platform for the app. */
31
+ platform?: PlatformWithLiterals;
32
+ /** Lifecycle status of the Plan. */
33
+ status?: PlanStatusWithLiterals;
34
+ /**
35
+ * Template chosen for generation. A Code Store `containers-templates` catalog GUID, or (for
36
+ * HIMALAYA_MOBILE) a himi starter template name (e.g. "branded-lite") that does not resolve to
37
+ * a catalog entry — see `PlansService.resolveTemplate`/`validateTemplatePlatform`, which treat a
38
+ * non-GUID value as an opaque template name rather than a catalog reference.
39
+ * @maxLength 200
40
+ */
41
+ selectedTemplateId?: string | null;
42
+ /**
43
+ * The project this plan belongs to. Supplied by the client at creation.
44
+ * @format GUID
45
+ */
46
+ projectId?: string | null;
47
+ /**
48
+ * Facts extracted from the existing business/site. Derived server-side and read-only to clients.
49
+ * @readonly
50
+ */
51
+ businessContext?: BusinessContext;
52
+ /** Visual identity extracted from the user's website. A starting point the user can edit. */
53
+ brandIdentity?: BrandIdentity;
54
+ /** The specification of the app to generate, produced from the plan prompt. */
55
+ appSpec?: AppSpec;
56
+ }
57
+ declare enum Platform {
58
+ /**
59
+ * Himalaya Mobile (Wix SDUI/OTA content package): mobile apps built headlessly on the
60
+ * on-demand remote machine via the himi CLI, instead of native iOS/Android pods.
61
+ */
62
+ HIMALAYA_MOBILE = "HIMALAYA_MOBILE"
63
+ }
64
+ /** @enumType */
65
+ type PlatformWithLiterals = Platform | 'HIMALAYA_MOBILE';
66
+ declare enum PlanStatus {
67
+ /** Plan is being assembled by the planning agent and the user. */
68
+ DRAFT = "DRAFT",
69
+ /** Plan is complete and approved; ready for the generation pipeline. */
70
+ FINALIZED = "FINALIZED"
71
+ }
72
+ /** @enumType */
73
+ type PlanStatusWithLiterals = PlanStatus | 'DRAFT' | 'FINALIZED';
74
+ /**
75
+ * Facts the server extracts about the existing business/site. The client reads these
76
+ * to inform the app spec, but does not write them.
77
+ */
78
+ interface BusinessContext {
79
+ /**
80
+ * Business name as configured on the site.
81
+ * @maxLength 200
82
+ */
83
+ businessName?: string;
84
+ /**
85
+ * Business logo image URL, extracted from the site (empty if it has none). Used as a reference
86
+ * image when generating the app icon (see AppSpec.app_icon_url).
87
+ * @maxLength 2000
88
+ */
89
+ businessLogoUrl?: string;
90
+ /**
91
+ * Business description as configured on the site.
92
+ * @maxLength 5000
93
+ */
94
+ businessDescription?: string;
95
+ /**
96
+ * Primary language code of the site (for example "en").
97
+ * @maxLength 20
98
+ */
99
+ language?: string;
100
+ /**
101
+ * Country code of the site (for example "IE").
102
+ * @maxLength 20
103
+ */
104
+ country?: string;
105
+ /**
106
+ * App definition IDs of Wix apps installed on the site (for example Bookings, eCommerce).
107
+ * @maxSize 100
108
+ * @maxLength 200
109
+ */
110
+ wixIntegrations?: string[];
111
+ }
112
+ /**
113
+ * Visual identity extracted from the user's existing website. Serves as an editable
114
+ * starting point for the generated app.
115
+ */
116
+ interface BrandIdentity {
117
+ /**
118
+ * Primary brand color.
119
+ * @maxLength 100
120
+ */
121
+ primaryColor?: string;
122
+ /**
123
+ * Background color.
124
+ * @maxLength 100
125
+ */
126
+ backgroundColor?: string;
127
+ /**
128
+ * Content (foreground) color.
129
+ * @maxLength 100
130
+ */
131
+ contentColor?: string;
132
+ /**
133
+ * Heading typography / font.
134
+ * @maxLength 100
135
+ */
136
+ headingFont?: string;
137
+ /**
138
+ * Body typography / font.
139
+ * @maxLength 100
140
+ */
141
+ bodyFont?: string;
142
+ }
143
+ /**
144
+ * The specification of the app to generate, produced from the plan prompt and confirmed
145
+ * by the user.
146
+ */
147
+ interface AppSpec {
148
+ /**
149
+ * Display name of the app to generate.
150
+ * @maxLength 200
151
+ */
152
+ appName?: string;
153
+ /**
154
+ * Description of the app to generate.
155
+ * @maxLength 5000
156
+ */
157
+ appDescription?: string;
158
+ /**
159
+ * The business goal the app should serve.
160
+ * @maxLength 2000
161
+ */
162
+ businessGoal?: string;
163
+ /**
164
+ * The target audience for the app.
165
+ * @maxLength 2000
166
+ */
167
+ audience?: string;
168
+ /**
169
+ * Wix integrations to include, each with a display name, description, and capability tags.
170
+ * @maxSize 100
171
+ */
172
+ wixIntegrations?: Integration[];
173
+ /**
174
+ * Third-party integrations to include, each with a display name, description, and capability tags.
175
+ * @maxSize 100
176
+ */
177
+ thirdPartyIntegrations?: Integration[];
178
+ /**
179
+ * Features the app should provide, each with a title and description.
180
+ * @maxSize 200
181
+ */
182
+ features?: Feature[];
183
+ /**
184
+ * Navigation screens for the app.
185
+ * @maxSize 100
186
+ * @maxLength 200
187
+ */
188
+ navigation?: string[];
189
+ /**
190
+ * Icon URL for the app to generate. Seeded at plan creation from the business's real logo, or
191
+ * a best-effort generated placeholder if it has none. The client can replace it later with a
192
+ * RegenerateIcon result they've accepted, via UpdatePlan.
193
+ * @format WEB_URL
194
+ * @maxLength 2000
195
+ */
196
+ appIconUrl?: string;
197
+ }
198
+ /**
199
+ * An integration (Wix or third-party) the generated app should include, produced by the
200
+ * planning agent from the prompt.
201
+ */
202
+ interface Integration {
203
+ /**
204
+ * Display name, for example "Wix Stores".
205
+ * @maxLength 200
206
+ */
207
+ displayName?: string;
208
+ /**
209
+ * What the integration provides / why it is included.
210
+ * @maxLength 2000
211
+ */
212
+ description?: string;
213
+ /**
214
+ * Sub-capabilities the integration includes, rendered as tags (for example "Storefront",
215
+ * "Cart & Checkout").
216
+ * @maxSize 50
217
+ * @maxLength 100
218
+ */
219
+ tags?: string[];
220
+ /**
221
+ * Stable integration id / slug (for example "wix-stores"). For Wix integrations this is chosen
222
+ * by the planning agent from the server-provided catalog of supported Wix integrations; empty
223
+ * for free-form third-party integrations. The client keys the integration's icon off this id.
224
+ * @maxLength 200
225
+ */
226
+ _id?: string;
227
+ }
228
+ /** A capability the app should provide, produced by the planning agent from the prompt. */
229
+ interface Feature {
230
+ /**
231
+ * Short feature title.
232
+ * @maxLength 200
233
+ */
234
+ title?: string;
235
+ /**
236
+ * What the feature does, shown under the title.
237
+ * @maxLength 2000
238
+ */
239
+ description?: string;
240
+ }
241
+ interface PlanFinalized {
242
+ /**
243
+ * ID of the Plan that was finalized.
244
+ * @format GUID
245
+ */
246
+ planId?: string;
247
+ /**
248
+ * ID of the Project this plan belongs to. containers-projects reads the finalized plan back by
249
+ * this id (one plan per project) when creating the initial generation job.
250
+ * @format GUID
251
+ */
252
+ projectId?: string;
253
+ /**
254
+ * ID of the conversation that led to this plan being finalized.
255
+ * @format GUID
256
+ */
257
+ conversationId?: string;
258
+ }
259
+ interface CreatePlanRequest {
260
+ /** Plan to be created. */
261
+ plan: Plan;
262
+ }
263
+ interface CreatePlanResponse {
264
+ /** The created Plan. */
265
+ plan?: Plan;
266
+ }
267
+ interface CreateAndGeneratePlanRequest {
268
+ /** Plan to be created and generated. */
269
+ plan: Plan;
270
+ }
271
+ interface CreateAndGeneratePlanResponse {
272
+ /** The generated Plan. */
273
+ plan?: Plan;
274
+ /**
275
+ * Follow-up questions from the planning agent to further build the plan.
276
+ * @maxSize 50
277
+ * @maxLength 4000
278
+ */
279
+ followUpQuestions?: string[];
280
+ /**
281
+ * Structured follow-up questions with selectable answer options. Superseding follow_up_questions;
282
+ * that field is kept and populated in parallel for callers that have not migrated to this one.
283
+ * @maxSize 4
284
+ */
285
+ followUpQuestionOptions?: FollowUpQuestion[];
286
+ }
287
+ /** A follow-up question paired with selectable answer options, shown as quick-reply choices. */
288
+ interface FollowUpQuestion {
289
+ /**
290
+ * The question text.
291
+ * @maxLength 4000
292
+ */
293
+ question?: string;
294
+ /**
295
+ * Selectable answer options for this question.
296
+ * @maxSize 10
297
+ * @maxLength 200
298
+ */
299
+ options?: string[];
300
+ }
301
+ interface GetPlanRequest {
302
+ /**
303
+ * ID of the Plan to retrieve.
304
+ * @format GUID
305
+ */
306
+ planId: string;
307
+ }
308
+ interface GetPlanResponse {
309
+ /** The requested Plan. */
310
+ plan?: Plan;
311
+ }
312
+ interface GetPlanByProjectIdRequest {
313
+ /**
314
+ * ID of the project whose Plan to retrieve.
315
+ * @format GUID
316
+ */
317
+ projectId: string;
318
+ }
319
+ interface GetPlanByProjectIdResponse {
320
+ /** The project's Plan. */
321
+ plan?: Plan;
322
+ }
323
+ interface UpdatePlanRequest {
324
+ /** Plan to be updated, may be partial. */
325
+ plan: Plan;
326
+ /**
327
+ * Set of fields to update. Fields not in the mask are ignored.
328
+ * @internal
329
+ */
330
+ fieldMask?: string[];
331
+ }
332
+ interface UpdatePlanResponse {
333
+ /** The updated Plan. */
334
+ plan?: Plan;
335
+ }
336
+ interface DeletePlanRequest {
337
+ /**
338
+ * ID of the Plan to delete.
339
+ * @format GUID
340
+ */
341
+ planId: string;
342
+ }
343
+ interface DeletePlanResponse {
344
+ }
345
+ interface GeneratePlanRequest {
346
+ /**
347
+ * ID of the Plan to generate.
348
+ * @format GUID
349
+ */
350
+ planId: string;
351
+ }
352
+ interface GeneratePlanResponse {
353
+ /** The generated Plan. */
354
+ plan?: Plan;
355
+ /**
356
+ * Follow-up questions from the planning agent to further build the plan.
357
+ * @maxSize 50
358
+ * @maxLength 4000
359
+ */
360
+ followUpQuestions?: string[];
361
+ /**
362
+ * Structured follow-up questions with selectable answer options. Superseding follow_up_questions;
363
+ * that field is kept and populated in parallel for callers that have not migrated to this one.
364
+ * @maxSize 4
365
+ */
366
+ followUpQuestionOptions?: FollowUpQuestion[];
367
+ }
368
+ interface ModifyPlanRequest {
369
+ /**
370
+ * ID of the Plan to modify.
371
+ * @format GUID
372
+ */
373
+ planId: string;
374
+ /**
375
+ * The user's answers to the previous iteration's follow-up questions.
376
+ * @maxSize 50
377
+ */
378
+ answeredQuestions?: AnsweredQuestion[];
379
+ /**
380
+ * Optional additional request from the user to further shape the plan.
381
+ * @maxLength 10000
382
+ */
383
+ userPrompt?: string | null;
384
+ /**
385
+ * Optional selected plan part. When present, only this boundary may change.
386
+ * When absent, ModifyPlan keeps its existing whole-plan behavior.
387
+ */
388
+ planEditContext?: PlanEditContext;
389
+ }
390
+ /** A follow-up question from a previous iteration paired with the user's answer. */
391
+ interface AnsweredQuestion {
392
+ /**
393
+ * The follow-up question that was asked.
394
+ * @maxLength 4000
395
+ */
396
+ question?: string;
397
+ /**
398
+ * The user's answer to the question.
399
+ * @maxLength 10000
400
+ */
401
+ answer?: string;
402
+ }
403
+ /**
404
+ * Identifies one editable part of a plan. Optional on chat and plan-edit requests; when absent,
405
+ * plan editing keeps its existing whole-plan behavior.
406
+ */
407
+ interface PlanEditContext {
408
+ /** Kind of plan part selected by the user. */
409
+ type?: PlanPartTypeWithLiterals;
410
+ /**
411
+ * Zero-based item index. Set only for repeated parts such as features, screens, or integrations.
412
+ * @max 199
413
+ */
414
+ index?: number | null;
415
+ /**
416
+ * Plan revision shown when the user selected the part. Used to reject stale edits.
417
+ * @min 1
418
+ */
419
+ planRevision?: string | null;
420
+ }
421
+ declare enum PlanPartType {
422
+ APP_NAME = "APP_NAME",
423
+ APP_DESCRIPTION = "APP_DESCRIPTION",
424
+ BUSINESS_GOAL = "BUSINESS_GOAL",
425
+ AUDIENCE = "AUDIENCE",
426
+ FEATURE = "FEATURE",
427
+ SCREEN = "SCREEN",
428
+ WIX_INTEGRATION = "WIX_INTEGRATION",
429
+ THIRD_PARTY_INTEGRATION = "THIRD_PARTY_INTEGRATION",
430
+ BRAND_IDENTITY = "BRAND_IDENTITY",
431
+ /** Color fields within brand_identity; fonts are preserved by the service. */
432
+ COLOR_THEME = "COLOR_THEME",
433
+ /** Font fields within brand_identity; colors are preserved by the service. */
434
+ TEXT_THEME = "TEXT_THEME"
435
+ }
436
+ /** @enumType */
437
+ type PlanPartTypeWithLiterals = PlanPartType | 'APP_NAME' | 'APP_DESCRIPTION' | 'BUSINESS_GOAL' | 'AUDIENCE' | 'FEATURE' | 'SCREEN' | 'WIX_INTEGRATION' | 'THIRD_PARTY_INTEGRATION' | 'BRAND_IDENTITY' | 'COLOR_THEME' | 'TEXT_THEME';
438
+ interface ModifyPlanResponse {
439
+ /** The modified Plan. */
440
+ plan?: Plan;
441
+ /**
442
+ * Follow-up questions the agent wants to ask to further refine the plan.
443
+ * @maxSize 50
444
+ * @maxLength 4000
445
+ */
446
+ followUpQuestions?: string[];
447
+ /**
448
+ * Structured follow-up questions with selectable answer options. Superseding follow_up_questions;
449
+ * that field is kept and populated in parallel for callers that have not migrated to this one.
450
+ * @maxSize 4
451
+ */
452
+ followUpQuestionOptions?: FollowUpQuestion[];
453
+ }
454
+ interface RegenerateIconRequest {
455
+ /**
456
+ * ID of the Plan whose icon to regenerate.
457
+ * @format GUID
458
+ */
459
+ planId: string;
460
+ /**
461
+ * Free-text description of the desired icon, passed to the icon-generation prompt.
462
+ * @maxLength 4000
463
+ */
464
+ prompt: string;
465
+ }
466
+ interface RegenerateIconResponse {
467
+ /**
468
+ * The generated icon URL. Not persisted — apply via UpdatePlan (app_spec.app_icon_url).
469
+ * @maxLength 2000
470
+ */
471
+ iconUrl?: string;
472
+ }
473
+ interface FinalizePlanRequest {
474
+ /**
475
+ * ID of the Plan to finalize. Its project_id and selected_template_id (set at creation)
476
+ * are used to drive generation.
477
+ * @format GUID
478
+ */
479
+ planId: string;
480
+ /**
481
+ * ID of the conversation that led to this plan being finalized.
482
+ * @format GUID
483
+ */
484
+ conversationId: string;
485
+ }
486
+ interface FinalizePlanResponse {
487
+ /** The finalized Plan. */
488
+ plan?: Plan;
489
+ }
490
+ interface DomainEvent extends DomainEventBodyOneOf {
491
+ createdEvent?: EntityCreatedEvent;
492
+ updatedEvent?: EntityUpdatedEvent;
493
+ deletedEvent?: EntityDeletedEvent;
494
+ actionEvent?: ActionEvent;
495
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
496
+ _id?: string;
497
+ /**
498
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
499
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
500
+ */
501
+ entityFqdn?: string;
502
+ /**
503
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
504
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
505
+ */
506
+ slug?: string;
507
+ /** ID of the entity associated with the event. */
508
+ entityId?: string;
509
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
510
+ eventTime?: Date | null;
511
+ /**
512
+ * Whether the event was triggered as a result of a privacy regulation application
513
+ * (for example, GDPR).
514
+ */
515
+ triggeredByAnonymizeRequest?: boolean | null;
516
+ /** If present, indicates the action that triggered the event. */
517
+ originatedFrom?: string | null;
518
+ /**
519
+ * 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.
520
+ * 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.
521
+ */
522
+ entityEventSequence?: string | null;
523
+ }
524
+ /** @oneof */
525
+ interface DomainEventBodyOneOf {
526
+ createdEvent?: EntityCreatedEvent;
527
+ updatedEvent?: EntityUpdatedEvent;
528
+ deletedEvent?: EntityDeletedEvent;
529
+ actionEvent?: ActionEvent;
530
+ }
531
+ interface EntityCreatedEvent {
532
+ entity?: string;
533
+ }
534
+ interface RestoreInfo {
535
+ deletedDate?: Date | null;
536
+ }
537
+ interface EntityUpdatedEvent {
538
+ /**
539
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
540
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
541
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
542
+ */
543
+ currentEntity?: string;
544
+ }
545
+ interface EntityDeletedEvent {
546
+ /** Entity that was deleted. */
547
+ deletedEntity?: string | null;
548
+ }
549
+ interface ActionEvent {
550
+ body?: string;
551
+ }
552
+ interface MessageEnvelope {
553
+ /**
554
+ * App instance ID.
555
+ * @format GUID
556
+ */
557
+ instanceId?: string | null;
558
+ /**
559
+ * Event type.
560
+ * @maxLength 150
561
+ */
562
+ eventType?: string;
563
+ /** The identification type and identity data. */
564
+ identity?: IdentificationData;
565
+ /** Stringify payload. */
566
+ data?: string;
567
+ /** Details related to the account */
568
+ accountInfo?: AccountInfo;
569
+ }
570
+ interface IdentificationData extends IdentificationDataIdOneOf {
571
+ /**
572
+ * ID of a site visitor that has not logged in to the site.
573
+ * @format GUID
574
+ */
575
+ anonymousVisitorId?: string;
576
+ /**
577
+ * ID of a site visitor that has logged in to the site.
578
+ * @format GUID
579
+ */
580
+ memberId?: string;
581
+ /**
582
+ * ID of a Wix user (site owner, contributor, etc.).
583
+ * @format GUID
584
+ */
585
+ wixUserId?: string;
586
+ /**
587
+ * ID of an app.
588
+ * @format GUID
589
+ */
590
+ appId?: string;
591
+ /** @readonly */
592
+ identityType?: WebhookIdentityTypeWithLiterals;
593
+ }
594
+ /** @oneof */
595
+ interface IdentificationDataIdOneOf {
596
+ /**
597
+ * ID of a site visitor that has not logged in to the site.
598
+ * @format GUID
599
+ */
600
+ anonymousVisitorId?: string;
601
+ /**
602
+ * ID of a site visitor that has logged in to the site.
603
+ * @format GUID
604
+ */
605
+ memberId?: string;
606
+ /**
607
+ * ID of a Wix user (site owner, contributor, etc.).
608
+ * @format GUID
609
+ */
610
+ wixUserId?: string;
611
+ /**
612
+ * ID of an app.
613
+ * @format GUID
614
+ */
615
+ appId?: string;
616
+ }
617
+ declare enum WebhookIdentityType {
618
+ UNKNOWN = "UNKNOWN",
619
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
620
+ MEMBER = "MEMBER",
621
+ WIX_USER = "WIX_USER",
622
+ APP = "APP"
623
+ }
624
+ /** @enumType */
625
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
626
+ interface AccountInfo {
627
+ /**
628
+ * ID of the Wix account associated with the event.
629
+ * @format GUID
630
+ */
631
+ accountId?: string | null;
632
+ /**
633
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
634
+ * @format GUID
635
+ */
636
+ parentAccountId?: string | null;
637
+ /**
638
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
639
+ * @format GUID
640
+ */
641
+ siteId?: string | null;
642
+ }
643
+ /**
644
+ * Creates a new Plan.
645
+ * @param plan - Plan to be created.
646
+ * @internal
647
+ * @documentationMaturity preview
648
+ * @requiredField plan
649
+ * @requiredField plan.initialPrompt
650
+ * @requiredField plan.platform
651
+ * @requiredField plan.projectId
652
+ * @requiredField plan.selectedTemplateId
653
+ * @permissionId containers:plans:v1:plan:create_plan
654
+ * @returns The created Plan.
655
+ * @fqn wix.containers.plans.v1.ContainersPlans.CreatePlan
656
+ */
657
+ declare function createPlan(plan: NonNullablePaths<Plan, `initialPrompt` | `platform` | `projectId` | `selectedTemplateId`, 0>): Promise<NonNullablePaths<Plan, `initialPrompt` | `platform` | `status` | `businessContext.businessName` | `businessContext.businessLogoUrl` | `businessContext.businessDescription` | `businessContext.language` | `businessContext.country` | `businessContext.wixIntegrations` | `brandIdentity.primaryColor` | `brandIdentity.backgroundColor` | `brandIdentity.contentColor` | `brandIdentity.headingFont` | `brandIdentity.bodyFont` | `appSpec.appName` | `appSpec.appDescription` | `appSpec.businessGoal` | `appSpec.audience` | `appSpec.wixIntegrations` | `appSpec.wixIntegrations.${number}.displayName` | `appSpec.wixIntegrations.${number}.description` | `appSpec.wixIntegrations.${number}._id` | `appSpec.thirdPartyIntegrations` | `appSpec.features` | `appSpec.features.${number}.title` | `appSpec.features.${number}.description` | `appSpec.navigation` | `appSpec.appIconUrl`, 3>>;
658
+ /**
659
+ * Creates a new Plan and immediately generates it using the planning agent.
660
+ * @param plan - Plan to be created and generated.
661
+ * @internal
662
+ * @documentationMaturity preview
663
+ * @requiredField plan
664
+ * @requiredField plan.initialPrompt
665
+ * @requiredField plan.platform
666
+ * @requiredField plan.projectId
667
+ * @requiredField plan.selectedTemplateId
668
+ * @permissionId containers:plans:v1:plan:create_and_generate_plan
669
+ * @fqn wix.containers.plans.v1.ContainersPlans.CreateAndGeneratePlan
670
+ */
671
+ declare function createAndGeneratePlan(plan: NonNullablePaths<Plan, `initialPrompt` | `platform` | `projectId` | `selectedTemplateId`, 0>): Promise<NonNullablePaths<CreateAndGeneratePlanResponse, `plan.initialPrompt` | `plan.platform` | `plan.status` | `plan.businessContext.businessName` | `plan.businessContext.businessLogoUrl` | `plan.businessContext.businessDescription` | `plan.businessContext.language` | `plan.businessContext.country` | `plan.businessContext.wixIntegrations` | `plan.brandIdentity.primaryColor` | `plan.brandIdentity.backgroundColor` | `plan.brandIdentity.contentColor` | `plan.brandIdentity.headingFont` | `plan.brandIdentity.bodyFont` | `plan.appSpec.appName` | `plan.appSpec.appDescription` | `plan.appSpec.businessGoal` | `plan.appSpec.audience` | `plan.appSpec.wixIntegrations` | `plan.appSpec.wixIntegrations.${number}.displayName` | `plan.appSpec.wixIntegrations.${number}.description` | `plan.appSpec.wixIntegrations.${number}._id` | `plan.appSpec.thirdPartyIntegrations` | `plan.appSpec.features` | `plan.appSpec.features.${number}.title` | `plan.appSpec.features.${number}.description` | `plan.appSpec.navigation` | `plan.appSpec.appIconUrl` | `followUpQuestions` | `followUpQuestionOptions` | `followUpQuestionOptions.${number}.question`, 4>>;
672
+ /**
673
+ * Retrieves a Plan by its ID.
674
+ * @param planId - ID of the Plan to retrieve.
675
+ * @internal
676
+ * @documentationMaturity preview
677
+ * @requiredField planId
678
+ * @permissionId containers:plans:v1:plan:get_plan
679
+ * @returns The requested Plan.
680
+ * @fqn wix.containers.plans.v1.ContainersPlans.GetPlan
681
+ */
682
+ declare function getPlan(planId: string): Promise<NonNullablePaths<Plan, `initialPrompt` | `platform` | `status` | `businessContext.businessName` | `businessContext.businessLogoUrl` | `businessContext.businessDescription` | `businessContext.language` | `businessContext.country` | `businessContext.wixIntegrations` | `brandIdentity.primaryColor` | `brandIdentity.backgroundColor` | `brandIdentity.contentColor` | `brandIdentity.headingFont` | `brandIdentity.bodyFont` | `appSpec.appName` | `appSpec.appDescription` | `appSpec.businessGoal` | `appSpec.audience` | `appSpec.wixIntegrations` | `appSpec.wixIntegrations.${number}.displayName` | `appSpec.wixIntegrations.${number}.description` | `appSpec.wixIntegrations.${number}._id` | `appSpec.thirdPartyIntegrations` | `appSpec.features` | `appSpec.features.${number}.title` | `appSpec.features.${number}.description` | `appSpec.navigation` | `appSpec.appIconUrl`, 3>>;
683
+ /**
684
+ * Retrieves the (single) Plan for a project. Server-to-server: containers-projects uses this to
685
+ * read the finalized plan when creating the initial generation job.
686
+ * @param projectId - ID of the project whose Plan to retrieve.
687
+ * @internal
688
+ * @documentationMaturity preview
689
+ * @requiredField projectId
690
+ * @permissionId containers:plans:v1:plan:get_plan_by_project_id
691
+ * @fqn wix.containers.plans.v1.ContainersPlans.GetPlanByProjectId
692
+ */
693
+ declare function getPlanByProjectId(projectId: string): Promise<NonNullablePaths<GetPlanByProjectIdResponse, `plan.initialPrompt` | `plan.platform` | `plan.status` | `plan.businessContext.businessName` | `plan.businessContext.businessLogoUrl` | `plan.businessContext.businessDescription` | `plan.businessContext.language` | `plan.businessContext.country` | `plan.businessContext.wixIntegrations` | `plan.brandIdentity.primaryColor` | `plan.brandIdentity.backgroundColor` | `plan.brandIdentity.contentColor` | `plan.brandIdentity.headingFont` | `plan.brandIdentity.bodyFont` | `plan.appSpec.appName` | `plan.appSpec.appDescription` | `plan.appSpec.businessGoal` | `plan.appSpec.audience` | `plan.appSpec.wixIntegrations` | `plan.appSpec.wixIntegrations.${number}.displayName` | `plan.appSpec.wixIntegrations.${number}.description` | `plan.appSpec.wixIntegrations.${number}._id` | `plan.appSpec.thirdPartyIntegrations` | `plan.appSpec.features` | `plan.appSpec.features.${number}.title` | `plan.appSpec.features.${number}.description` | `plan.appSpec.navigation` | `plan.appSpec.appIconUrl`, 4>>;
694
+ /**
695
+ * Updates a Plan. The current revision must be passed for optimistic locking.
696
+ * @param _id - Plan ID.
697
+ * @internal
698
+ * @documentationMaturity preview
699
+ * @requiredField _id
700
+ * @requiredField plan
701
+ * @requiredField plan.revision
702
+ * @permissionId containers:plans:v1:plan:update_plan
703
+ * @returns The updated Plan.
704
+ * @fqn wix.containers.plans.v1.ContainersPlans.UpdatePlan
705
+ */
706
+ declare function updatePlan(_id: string, plan: NonNullablePaths<UpdatePlan, `revision`, 0>): Promise<NonNullablePaths<Plan, `initialPrompt` | `platform` | `status` | `businessContext.businessName` | `businessContext.businessLogoUrl` | `businessContext.businessDescription` | `businessContext.language` | `businessContext.country` | `businessContext.wixIntegrations` | `brandIdentity.primaryColor` | `brandIdentity.backgroundColor` | `brandIdentity.contentColor` | `brandIdentity.headingFont` | `brandIdentity.bodyFont` | `appSpec.appName` | `appSpec.appDescription` | `appSpec.businessGoal` | `appSpec.audience` | `appSpec.wixIntegrations` | `appSpec.wixIntegrations.${number}.displayName` | `appSpec.wixIntegrations.${number}.description` | `appSpec.wixIntegrations.${number}._id` | `appSpec.thirdPartyIntegrations` | `appSpec.features` | `appSpec.features.${number}.title` | `appSpec.features.${number}.description` | `appSpec.navigation` | `appSpec.appIconUrl`, 3>>;
707
+ interface UpdatePlan {
708
+ /**
709
+ * Plan ID.
710
+ * @format GUID
711
+ * @readonly
712
+ */
713
+ _id?: string | null;
714
+ /**
715
+ * Revision number, which increments by 1 each time the Plan is updated.
716
+ * @readonly
717
+ */
718
+ revision?: string | null;
719
+ /**
720
+ * Date and time the Plan was created.
721
+ * @readonly
722
+ */
723
+ _createdDate?: Date | null;
724
+ /**
725
+ * Date and time the Plan was last updated.
726
+ * @readonly
727
+ */
728
+ _updatedDate?: Date | null;
729
+ /**
730
+ * The user's initial free-text prompt that started the plan.
731
+ * @maxLength 10000
732
+ */
733
+ initialPrompt?: string;
734
+ /** Generation platform for the app. */
735
+ platform?: PlatformWithLiterals;
736
+ /** Lifecycle status of the Plan. */
737
+ status?: PlanStatusWithLiterals;
738
+ /**
739
+ * Template chosen for generation. A Code Store `containers-templates` catalog GUID, or (for
740
+ * HIMALAYA_MOBILE) a himi starter template name (e.g. "branded-lite") that does not resolve to
741
+ * a catalog entry — see `PlansService.resolveTemplate`/`validateTemplatePlatform`, which treat a
742
+ * non-GUID value as an opaque template name rather than a catalog reference.
743
+ * @maxLength 200
744
+ */
745
+ selectedTemplateId?: string | null;
746
+ /**
747
+ * The project this plan belongs to. Supplied by the client at creation.
748
+ * @format GUID
749
+ */
750
+ projectId?: string | null;
751
+ /**
752
+ * Facts extracted from the existing business/site. Derived server-side and read-only to clients.
753
+ * @readonly
754
+ */
755
+ businessContext?: BusinessContext;
756
+ /** Visual identity extracted from the user's website. A starting point the user can edit. */
757
+ brandIdentity?: BrandIdentity;
758
+ /** The specification of the app to generate, produced from the plan prompt. */
759
+ appSpec?: AppSpec;
760
+ }
761
+ /**
762
+ * Deletes a Plan.
763
+ * @param planId - ID of the Plan to delete.
764
+ * @internal
765
+ * @documentationMaturity preview
766
+ * @requiredField planId
767
+ * @permissionId containers:plans:v1:plan:delete_plan
768
+ * @fqn wix.containers.plans.v1.ContainersPlans.DeletePlan
769
+ */
770
+ declare function deletePlan(planId: string): Promise<void>;
771
+ /**
772
+ * Generates the plan for an already-created Plan using the planning agent, from the plan's
773
+ * extracted business context + brand identity, the initial prompt, the platform, and the
774
+ * selected template. Populates app_spec (and brand_identity) and returns follow-up questions.
775
+ * @param planId - ID of the Plan to generate.
776
+ * @internal
777
+ * @documentationMaturity preview
778
+ * @requiredField planId
779
+ * @permissionId containers:plans:v1:plan:generate_plan
780
+ * @fqn wix.containers.plans.v1.ContainersPlans.GeneratePlan
781
+ */
782
+ declare function generatePlan(planId: string): Promise<NonNullablePaths<GeneratePlanResponse, `plan.initialPrompt` | `plan.platform` | `plan.status` | `plan.businessContext.businessName` | `plan.businessContext.businessLogoUrl` | `plan.businessContext.businessDescription` | `plan.businessContext.language` | `plan.businessContext.country` | `plan.businessContext.wixIntegrations` | `plan.brandIdentity.primaryColor` | `plan.brandIdentity.backgroundColor` | `plan.brandIdentity.contentColor` | `plan.brandIdentity.headingFont` | `plan.brandIdentity.bodyFont` | `plan.appSpec.appName` | `plan.appSpec.appDescription` | `plan.appSpec.businessGoal` | `plan.appSpec.audience` | `plan.appSpec.wixIntegrations` | `plan.appSpec.wixIntegrations.${number}.displayName` | `plan.appSpec.wixIntegrations.${number}.description` | `plan.appSpec.wixIntegrations.${number}._id` | `plan.appSpec.thirdPartyIntegrations` | `plan.appSpec.features` | `plan.appSpec.features.${number}.title` | `plan.appSpec.features.${number}.description` | `plan.appSpec.navigation` | `plan.appSpec.appIconUrl` | `followUpQuestions` | `followUpQuestionOptions` | `followUpQuestionOptions.${number}.question`, 4>>;
783
+ /**
784
+ * Modifies an existing Plan based on the user's answers to the previous iteration's
785
+ * follow-up questions plus an optional additional prompt. Returns the updated plan and
786
+ * any new follow-up questions.
787
+ * @param planId - ID of the Plan to modify.
788
+ * @internal
789
+ * @documentationMaturity preview
790
+ * @requiredField planId
791
+ * @permissionId containers:plans:v1:plan:modify_plan
792
+ * @fqn wix.containers.plans.v1.ContainersPlans.ModifyPlan
793
+ */
794
+ declare function modifyPlan(planId: string, options?: ModifyPlanOptions): Promise<NonNullablePaths<ModifyPlanResponse, `plan.initialPrompt` | `plan.platform` | `plan.status` | `plan.businessContext.businessName` | `plan.businessContext.businessLogoUrl` | `plan.businessContext.businessDescription` | `plan.businessContext.language` | `plan.businessContext.country` | `plan.businessContext.wixIntegrations` | `plan.brandIdentity.primaryColor` | `plan.brandIdentity.backgroundColor` | `plan.brandIdentity.contentColor` | `plan.brandIdentity.headingFont` | `plan.brandIdentity.bodyFont` | `plan.appSpec.appName` | `plan.appSpec.appDescription` | `plan.appSpec.businessGoal` | `plan.appSpec.audience` | `plan.appSpec.wixIntegrations` | `plan.appSpec.wixIntegrations.${number}.displayName` | `plan.appSpec.wixIntegrations.${number}.description` | `plan.appSpec.wixIntegrations.${number}._id` | `plan.appSpec.thirdPartyIntegrations` | `plan.appSpec.features` | `plan.appSpec.features.${number}.title` | `plan.appSpec.features.${number}.description` | `plan.appSpec.navigation` | `plan.appSpec.appIconUrl` | `followUpQuestions` | `followUpQuestionOptions` | `followUpQuestionOptions.${number}.question`, 4>>;
795
+ interface ModifyPlanOptions {
796
+ /**
797
+ * The user's answers to the previous iteration's follow-up questions.
798
+ * @maxSize 50
799
+ */
800
+ answeredQuestions?: AnsweredQuestion[];
801
+ /**
802
+ * Optional additional request from the user to further shape the plan.
803
+ * @maxLength 10000
804
+ */
805
+ userPrompt?: string | null;
806
+ /**
807
+ * Optional selected plan part. When present, only this boundary may change.
808
+ * When absent, ModifyPlan keeps its existing whole-plan behavior.
809
+ */
810
+ planEditContext?: PlanEditContext;
811
+ }
812
+ /**
813
+ * Generates a candidate icon for a Plan from user-provided text via PromptHub. The current
814
+ * business_context (including any existing icon, sent as a reference image) is resolved
815
+ * server-side; the caller supplies only the prompt. Does not persist the result — the caller
816
+ * saves an accepted icon with UpdatePlan (app_spec.app_icon_url).
817
+ * @param planId - ID of the Plan whose icon to regenerate.
818
+ * @param prompt - Free-text description of the desired icon, passed to the icon-generation prompt.
819
+ * @internal
820
+ * @documentationMaturity preview
821
+ * @requiredField planId
822
+ * @requiredField prompt
823
+ * @permissionId containers:plans:v1:plan:regenerate_icon
824
+ * @fqn wix.containers.plans.v1.ContainersPlans.RegenerateIcon
825
+ */
826
+ declare function regenerateIcon(planId: string, prompt: string): Promise<NonNullablePaths<RegenerateIconResponse, `iconUrl`, 0>>;
827
+ /**
828
+ * Finalizes a Plan for generation, transitioning it to FINALIZED and emitting a PlanFinalized
829
+ * action event that drives the linked Project into BUILDING.
830
+ * @param planId - ID of the Plan to finalize. Its project_id and selected_template_id (set at creation)
831
+ * are used to drive generation.
832
+ * @param conversationId - ID of the conversation that led to this plan being finalized.
833
+ * @internal
834
+ * @documentationMaturity preview
835
+ * @requiredField conversationId
836
+ * @requiredField planId
837
+ * @permissionId containers:plans:v1:plan:finalize_plan
838
+ * @fqn wix.containers.plans.v1.ContainersPlans.FinalizePlan
839
+ */
840
+ declare function finalizePlan(planId: string, conversationId: string): Promise<NonNullablePaths<FinalizePlanResponse, `plan.initialPrompt` | `plan.platform` | `plan.status` | `plan.businessContext.businessName` | `plan.businessContext.businessLogoUrl` | `plan.businessContext.businessDescription` | `plan.businessContext.language` | `plan.businessContext.country` | `plan.businessContext.wixIntegrations` | `plan.brandIdentity.primaryColor` | `plan.brandIdentity.backgroundColor` | `plan.brandIdentity.contentColor` | `plan.brandIdentity.headingFont` | `plan.brandIdentity.bodyFont` | `plan.appSpec.appName` | `plan.appSpec.appDescription` | `plan.appSpec.businessGoal` | `plan.appSpec.audience` | `plan.appSpec.wixIntegrations` | `plan.appSpec.wixIntegrations.${number}.displayName` | `plan.appSpec.wixIntegrations.${number}.description` | `plan.appSpec.wixIntegrations.${number}._id` | `plan.appSpec.thirdPartyIntegrations` | `plan.appSpec.features` | `plan.appSpec.features.${number}.title` | `plan.appSpec.features.${number}.description` | `plan.appSpec.navigation` | `plan.appSpec.appIconUrl`, 4>>;
841
+
842
+ export { type AccountInfo, type ActionEvent, type AnsweredQuestion, type AppSpec, type BrandIdentity, type BusinessContext, type CreateAndGeneratePlanRequest, type CreateAndGeneratePlanResponse, type CreatePlanRequest, type CreatePlanResponse, type DeletePlanRequest, type DeletePlanResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type Feature, type FinalizePlanRequest, type FinalizePlanResponse, type FollowUpQuestion, type GeneratePlanRequest, type GeneratePlanResponse, type GetPlanByProjectIdRequest, type GetPlanByProjectIdResponse, type GetPlanRequest, type GetPlanResponse, type IdentificationData, type IdentificationDataIdOneOf, type Integration, type MessageEnvelope, type ModifyPlanOptions, type ModifyPlanRequest, type ModifyPlanResponse, type Plan, type PlanEditContext, type PlanFinalized, PlanPartType, type PlanPartTypeWithLiterals, PlanStatus, type PlanStatusWithLiterals, Platform, type PlatformWithLiterals, type RegenerateIconRequest, type RegenerateIconResponse, type RestoreInfo, type UpdatePlan, type UpdatePlanRequest, type UpdatePlanResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createAndGeneratePlan, createPlan, deletePlan, finalizePlan, generatePlan, getPlan, getPlanByProjectId, modifyPlan, regenerateIcon, updatePlan };