@wix/auto_sdk_containers_plans 1.0.5 → 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.
@@ -604,6 +604,48 @@ interface FinalizePlanResponse {
604
604
  /** The finalized Plan. */
605
605
  plan?: Plan;
606
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';
607
649
  interface DomainEvent extends DomainEventBodyOneOf {
608
650
  createdEvent?: EntityCreatedEvent;
609
651
  updatedEvent?: EntityUpdatedEvent;
@@ -829,4 +871,4 @@ interface ModifyPlanOptions {
829
871
  planEditContext?: PlanEditContext;
830
872
  }
831
873
 
832
- 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 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, type UsableContent, 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 };
@@ -25,6 +25,7 @@ __export(index_exports, {
25
25
  PlanPartType: () => PlanPartType,
26
26
  PlanStatus: () => PlanStatus,
27
27
  Platform: () => Platform,
28
+ PromptSuggestionsSource: () => PromptSuggestionsSource,
28
29
  WebhookIdentityType: () => WebhookIdentityType,
29
30
  createAndGeneratePlan: () => createAndGeneratePlan4,
30
31
  createPlan: () => createPlan4,
@@ -33,6 +34,7 @@ __export(index_exports, {
33
34
  generatePlan: () => generatePlan4,
34
35
  getPlan: () => getPlan4,
35
36
  getPlanByProjectId: () => getPlanByProjectId4,
37
+ getPromptSuggestions: () => getPromptSuggestions4,
36
38
  modifyPlan: () => modifyPlan4,
37
39
  regenerateIcon: () => regenerateIcon4,
38
40
  updatePlan: () => updatePlan4
@@ -347,6 +349,27 @@ function finalizePlan(payload) {
347
349
  }
348
350
  return __finalizePlan;
349
351
  }
352
+ function getPromptSuggestions(payload) {
353
+ function __getPromptSuggestions({ host }) {
354
+ const metadata = {
355
+ entityFqdn: "wix.containers.plans.v1.plan",
356
+ method: "GET",
357
+ methodFqn: "wix.containers.plans.v1.ContainersPlans.GetPromptSuggestions",
358
+ packageName: PACKAGE_NAME,
359
+ migrationOptions: {
360
+ optInTransformResponse: true
361
+ },
362
+ url: resolveWixContainersPlansV1ContainersPlansUrl({
363
+ protoPath: "/v1/prompt-suggestions",
364
+ data: payload,
365
+ host
366
+ }),
367
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
368
+ };
369
+ return metadata;
370
+ }
371
+ return __getPromptSuggestions;
372
+ }
350
373
 
351
374
  // src/containers-plans-v1-plan-plans.universal.ts
352
375
  var Platform = /* @__PURE__ */ ((Platform2) => {
@@ -389,6 +412,11 @@ var PlanPartType = /* @__PURE__ */ ((PlanPartType2) => {
389
412
  PlanPartType2["TEXT_THEME"] = "TEXT_THEME";
390
413
  return PlanPartType2;
391
414
  })(PlanPartType || {});
415
+ var PromptSuggestionsSource = /* @__PURE__ */ ((PromptSuggestionsSource2) => {
416
+ PromptSuggestionsSource2["BUSINESS_PROFILE"] = "BUSINESS_PROFILE";
417
+ PromptSuggestionsSource2["NO_SUGGESTIONS"] = "NO_SUGGESTIONS";
418
+ return PromptSuggestionsSource2;
419
+ })(PromptSuggestionsSource || {});
392
420
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
393
421
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
394
422
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -646,6 +674,29 @@ async function finalizePlan2(planId, conversationId) {
646
674
  throw transformedError;
647
675
  }
648
676
  }
677
+ async function getPromptSuggestions2() {
678
+ const { httpClient, sideEffects } = arguments[0];
679
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
680
+ const reqOpts = getPromptSuggestions(payload);
681
+ sideEffects?.onSiteCall?.();
682
+ try {
683
+ const result = await httpClient.request(reqOpts);
684
+ sideEffects?.onSuccess?.(result);
685
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
686
+ } catch (err) {
687
+ const transformedError = (0, import_transform_error.transformError)(
688
+ err,
689
+ {
690
+ spreadPathsToArguments: {},
691
+ explicitPathsToArguments: {},
692
+ singleArgumentUnchanged: false
693
+ },
694
+ []
695
+ );
696
+ sideEffects?.onError?.(err);
697
+ throw transformedError;
698
+ }
699
+ }
649
700
 
650
701
  // src/containers-plans-v1-plan-plans.public.ts
651
702
  function createPlan3(httpClient) {
@@ -722,6 +773,12 @@ function finalizePlan3(httpClient) {
722
773
  { httpClient }
723
774
  );
724
775
  }
776
+ function getPromptSuggestions3(httpClient) {
777
+ return () => getPromptSuggestions2(
778
+ // @ts-ignore
779
+ { httpClient }
780
+ );
781
+ }
725
782
 
726
783
  // src/containers-plans-v1-plan-plans.context.ts
727
784
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
@@ -735,6 +792,7 @@ var generatePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(g
735
792
  var modifyPlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(modifyPlan3);
736
793
  var regenerateIcon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(regenerateIcon3);
737
794
  var finalizePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(finalizePlan3);
795
+ var getPromptSuggestions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPromptSuggestions3);
738
796
  // Annotate the CommonJS export names for ESM import in node:
739
797
  0 && (module.exports = {
740
798
  BusinessGoalConfidence,
@@ -742,6 +800,7 @@ var finalizePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(f
742
800
  PlanPartType,
743
801
  PlanStatus,
744
802
  Platform,
803
+ PromptSuggestionsSource,
745
804
  WebhookIdentityType,
746
805
  createAndGeneratePlan,
747
806
  createPlan,
@@ -750,6 +809,7 @@ var finalizePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(f
750
809
  generatePlan,
751
810
  getPlan,
752
811
  getPlanByProjectId,
812
+ getPromptSuggestions,
753
813
  modifyPlan,
754
814
  regenerateIcon,
755
815
  updatePlan