@wix/auto_sdk_containers_plans 1.0.4 → 1.0.6

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.
@@ -113,7 +113,116 @@ interface BusinessContext {
113
113
  * @format WEB_URL
114
114
  */
115
115
  publicSiteUrl?: string | null;
116
+ /**
117
+ * What the server learned from the site's content before the first plan was generated: the
118
+ * business, its goal and the content an app can show. Absent for older plans, when the analysis
119
+ * is off for the site, or when it did not finish.
120
+ * @readonly
121
+ */
122
+ analysis?: BusinessAnalysis;
123
+ }
124
+ /** A short analysis of the business, made from the site's content for the planning agent. */
125
+ interface BusinessAnalysis {
126
+ /**
127
+ * Industry of the business, for example "yoga studio".
128
+ * @maxLength 200
129
+ */
130
+ industry?: string;
131
+ /**
132
+ * Short factual summary of the business and what its site offers.
133
+ * @maxLength 2000
134
+ */
135
+ summary?: string;
136
+ /**
137
+ * The main outcome the business wants from its customers, for example "Get more class bookings".
138
+ * @maxLength 500
139
+ */
140
+ businessGoal?: string;
141
+ /** How strongly the site's content supports business_goal. */
142
+ businessGoalConfidence?: BusinessGoalConfidenceWithLiterals;
143
+ /**
144
+ * Who the business's customers are.
145
+ * @maxLength 500
146
+ */
147
+ audience?: string;
148
+ /**
149
+ * Main products or services the business offers, as named on the site.
150
+ * @maxSize 6
151
+ * @maxLength 200
152
+ */
153
+ keyOfferings?: string[];
154
+ /**
155
+ * Site content of each kind that the generated app can show.
156
+ * @maxSize 10
157
+ */
158
+ usableContent?: UsableContent[];
159
+ /**
160
+ * Names of the Wix business apps installed on the site, for example "Wix Bookings".
161
+ * @maxSize 30
162
+ * @maxLength 100
163
+ */
164
+ installedVerticals?: string[];
165
+ /**
166
+ * Short points the app should focus on to serve business_goal.
167
+ * @maxSize 3
168
+ * @maxLength 300
169
+ */
170
+ appFocus?: string[];
171
+ /**
172
+ * How the site's own text sounds to its customers, so the app's text can sound the same, for
173
+ * example "Warm and homely; short sentences; speaks to the customer as 'you'".
174
+ * @maxLength 500
175
+ */
176
+ toneOfVoice?: string;
177
+ /**
178
+ * Up to three short phrases quoted from the site that show its tone of voice.
179
+ * @maxSize 3
180
+ * @maxLength 200
181
+ */
182
+ toneExamples?: string[];
183
+ }
184
+ declare enum BusinessGoalConfidence {
185
+ /** The site gives little or conflicting evidence for the goal. */
186
+ LOW = "LOW",
187
+ /** The goal is a reasonable inference from the site. */
188
+ MEDIUM = "MEDIUM",
189
+ /** The goal follows directly from strong evidence, such as a booking app with services. */
190
+ HIGH = "HIGH"
191
+ }
192
+ /** @enumType */
193
+ type BusinessGoalConfidenceWithLiterals = BusinessGoalConfidence | 'LOW' | 'MEDIUM' | 'HIGH';
194
+ /** Site content of one kind that the generated app can show. */
195
+ interface UsableContent {
196
+ /** Where the content comes from. */
197
+ source?: ContentSourceWithLiterals;
198
+ /**
199
+ * What the content is, for example "12 yoga and pilates classes with prices".
200
+ * @maxLength 500
201
+ */
202
+ description?: string;
203
+ /** Number of items found, when known. */
204
+ itemCount?: number | null;
205
+ }
206
+ declare enum ContentSource {
207
+ /** Wix Stores products. */
208
+ STORES = "STORES",
209
+ /** Wix Bookings services. */
210
+ BOOKINGS = "BOOKINGS",
211
+ /** Wix Events events. */
212
+ EVENTS = "EVENTS",
213
+ /** Wix Blog posts. */
214
+ BLOG = "BLOG",
215
+ /** Wix Pricing Plans plans. */
216
+ PRICING_PLANS = "PRICING_PLANS",
217
+ /** Wix Restaurants menu items. */
218
+ RESTAURANTS = "RESTAURANTS",
219
+ /** Wix CMS (Wix Data) collections. */
220
+ CMS = "CMS",
221
+ /** Text of the published site's home page. */
222
+ SITE_TEXT = "SITE_TEXT"
116
223
  }
224
+ /** @enumType */
225
+ type ContentSourceWithLiterals = ContentSource | 'STORES' | 'BOOKINGS' | 'EVENTS' | 'BLOG' | 'PRICING_PLANS' | 'RESTAURANTS' | 'CMS' | 'SITE_TEXT';
117
226
  /**
118
227
  * Visual identity extracted from the user's existing website. Serves as an editable
119
228
  * starting point for the generated app.
@@ -495,6 +604,48 @@ interface FinalizePlanResponse {
495
604
  /** The finalized Plan. */
496
605
  plan?: Plan;
497
606
  }
607
+ interface GetPromptSuggestionsRequest {
608
+ }
609
+ interface GetPromptSuggestionsResponse {
610
+ /**
611
+ * Name of the business the suggestions are for. Empty when unknown.
612
+ * @maxLength 200
613
+ */
614
+ businessName?: string;
615
+ /**
616
+ * The owner's first request, ready to send or to edit. Empty when there are no suggestions.
617
+ * @maxLength 500
618
+ */
619
+ defaultPrompt?: string;
620
+ /**
621
+ * App ideas for this business, strongest first: none, or 3 to 5.
622
+ * @maxSize 5
623
+ */
624
+ suggestions?: PromptSuggestion[];
625
+ /** Where the suggestions come from. */
626
+ source?: PromptSuggestionsSourceWithLiterals;
627
+ }
628
+ /** One suggestion chip. */
629
+ interface PromptSuggestion {
630
+ /**
631
+ * Short chip text, one line on a phone, for example "Workshop booking app".
632
+ * @maxLength 42
633
+ */
634
+ label?: string;
635
+ /**
636
+ * The owner's full request that the chip puts in the prompt box.
637
+ * @maxLength 400
638
+ */
639
+ prompt?: string;
640
+ }
641
+ declare enum PromptSuggestionsSource {
642
+ /** Made from the site's business profile. */
643
+ BUSINESS_PROFILE = "BUSINESS_PROFILE",
644
+ /** No suggestions: show the static first prompt. */
645
+ NO_SUGGESTIONS = "NO_SUGGESTIONS"
646
+ }
647
+ /** @enumType */
648
+ type PromptSuggestionsSourceWithLiterals = PromptSuggestionsSource | 'BUSINESS_PROFILE' | 'NO_SUGGESTIONS';
498
649
  interface DomainEvent extends DomainEventBodyOneOf {
499
650
  createdEvent?: EntityCreatedEvent;
500
651
  updatedEvent?: EntityUpdatedEvent;
@@ -720,4 +871,4 @@ interface ModifyPlanOptions {
720
871
  planEditContext?: PlanEditContext;
721
872
  }
722
873
 
723
- 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 };
874
+ export { type AccountInfo, type ActionEvent, type AnsweredQuestion, type AppSpec, type BrandIdentity, type BusinessAnalysis, type BusinessContext, BusinessGoalConfidence, type BusinessGoalConfidenceWithLiterals, ContentSource, type ContentSourceWithLiterals, 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 GetPromptSuggestionsRequest, type GetPromptSuggestionsResponse, 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 PromptSuggestion, PromptSuggestionsSource, type PromptSuggestionsSourceWithLiterals, type RegenerateIconRequest, type RegenerateIconResponse, type RestoreInfo, type UpdatePlan, type UpdatePlanRequest, type UpdatePlanResponse, type UsableContent, WebhookIdentityType, type WebhookIdentityTypeWithLiterals };
@@ -309,6 +309,27 @@ function finalizePlan(payload) {
309
309
  }
310
310
  return __finalizePlan;
311
311
  }
312
+ function getPromptSuggestions(payload) {
313
+ function __getPromptSuggestions({ host }) {
314
+ const metadata = {
315
+ entityFqdn: "wix.containers.plans.v1.plan",
316
+ method: "GET",
317
+ methodFqn: "wix.containers.plans.v1.ContainersPlans.GetPromptSuggestions",
318
+ packageName: PACKAGE_NAME,
319
+ migrationOptions: {
320
+ optInTransformResponse: true
321
+ },
322
+ url: resolveWixContainersPlansV1ContainersPlansUrl({
323
+ protoPath: "/v1/prompt-suggestions",
324
+ data: payload,
325
+ host
326
+ }),
327
+ params: toURLSearchParams(payload)
328
+ };
329
+ return metadata;
330
+ }
331
+ return __getPromptSuggestions;
332
+ }
312
333
 
313
334
  // src/containers-plans-v1-plan-plans.universal.ts
314
335
  var Platform = /* @__PURE__ */ ((Platform2) => {
@@ -320,6 +341,23 @@ var PlanStatus = /* @__PURE__ */ ((PlanStatus2) => {
320
341
  PlanStatus2["FINALIZED"] = "FINALIZED";
321
342
  return PlanStatus2;
322
343
  })(PlanStatus || {});
344
+ var BusinessGoalConfidence = /* @__PURE__ */ ((BusinessGoalConfidence2) => {
345
+ BusinessGoalConfidence2["LOW"] = "LOW";
346
+ BusinessGoalConfidence2["MEDIUM"] = "MEDIUM";
347
+ BusinessGoalConfidence2["HIGH"] = "HIGH";
348
+ return BusinessGoalConfidence2;
349
+ })(BusinessGoalConfidence || {});
350
+ var ContentSource = /* @__PURE__ */ ((ContentSource2) => {
351
+ ContentSource2["STORES"] = "STORES";
352
+ ContentSource2["BOOKINGS"] = "BOOKINGS";
353
+ ContentSource2["EVENTS"] = "EVENTS";
354
+ ContentSource2["BLOG"] = "BLOG";
355
+ ContentSource2["PRICING_PLANS"] = "PRICING_PLANS";
356
+ ContentSource2["RESTAURANTS"] = "RESTAURANTS";
357
+ ContentSource2["CMS"] = "CMS";
358
+ ContentSource2["SITE_TEXT"] = "SITE_TEXT";
359
+ return ContentSource2;
360
+ })(ContentSource || {});
323
361
  var PlanPartType = /* @__PURE__ */ ((PlanPartType2) => {
324
362
  PlanPartType2["APP_NAME"] = "APP_NAME";
325
363
  PlanPartType2["APP_DESCRIPTION"] = "APP_DESCRIPTION";
@@ -334,6 +372,11 @@ var PlanPartType = /* @__PURE__ */ ((PlanPartType2) => {
334
372
  PlanPartType2["TEXT_THEME"] = "TEXT_THEME";
335
373
  return PlanPartType2;
336
374
  })(PlanPartType || {});
375
+ var PromptSuggestionsSource = /* @__PURE__ */ ((PromptSuggestionsSource2) => {
376
+ PromptSuggestionsSource2["BUSINESS_PROFILE"] = "BUSINESS_PROFILE";
377
+ PromptSuggestionsSource2["NO_SUGGESTIONS"] = "NO_SUGGESTIONS";
378
+ return PromptSuggestionsSource2;
379
+ })(PromptSuggestionsSource || {});
337
380
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
338
381
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
339
382
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -591,6 +634,29 @@ async function finalizePlan2(planId, conversationId) {
591
634
  throw transformedError;
592
635
  }
593
636
  }
637
+ async function getPromptSuggestions2() {
638
+ const { httpClient, sideEffects } = arguments[0];
639
+ const payload = renameKeysFromSDKRequestToRESTRequest({});
640
+ const reqOpts = getPromptSuggestions(payload);
641
+ sideEffects?.onSiteCall?.();
642
+ try {
643
+ const result = await httpClient.request(reqOpts);
644
+ sideEffects?.onSuccess?.(result);
645
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
646
+ } catch (err) {
647
+ const transformedError = sdkTransformError(
648
+ err,
649
+ {
650
+ spreadPathsToArguments: {},
651
+ explicitPathsToArguments: {},
652
+ singleArgumentUnchanged: false
653
+ },
654
+ []
655
+ );
656
+ sideEffects?.onError?.(err);
657
+ throw transformedError;
658
+ }
659
+ }
594
660
 
595
661
  // src/containers-plans-v1-plan-plans.public.ts
596
662
  function createPlan3(httpClient) {
@@ -667,6 +733,12 @@ function finalizePlan3(httpClient) {
667
733
  { httpClient }
668
734
  );
669
735
  }
736
+ function getPromptSuggestions3(httpClient) {
737
+ return () => getPromptSuggestions2(
738
+ // @ts-ignore
739
+ { httpClient }
740
+ );
741
+ }
670
742
 
671
743
  // src/containers-plans-v1-plan-plans.context.ts
672
744
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
@@ -680,10 +752,14 @@ var generatePlan4 = /* @__PURE__ */ createRESTModule(generatePlan3);
680
752
  var modifyPlan4 = /* @__PURE__ */ createRESTModule(modifyPlan3);
681
753
  var regenerateIcon4 = /* @__PURE__ */ createRESTModule(regenerateIcon3);
682
754
  var finalizePlan4 = /* @__PURE__ */ createRESTModule(finalizePlan3);
755
+ var getPromptSuggestions4 = /* @__PURE__ */ createRESTModule(getPromptSuggestions3);
683
756
  export {
757
+ BusinessGoalConfidence,
758
+ ContentSource,
684
759
  PlanPartType,
685
760
  PlanStatus,
686
761
  Platform,
762
+ PromptSuggestionsSource,
687
763
  WebhookIdentityType,
688
764
  createAndGeneratePlan4 as createAndGeneratePlan,
689
765
  createPlan4 as createPlan,
@@ -692,6 +768,7 @@ export {
692
768
  generatePlan4 as generatePlan,
693
769
  getPlan4 as getPlan,
694
770
  getPlanByProjectId4 as getPlanByProjectId,
771
+ getPromptSuggestions4 as getPromptSuggestions,
695
772
  modifyPlan4 as modifyPlan,
696
773
  regenerateIcon4 as regenerateIcon,
697
774
  updatePlan4 as updatePlan