@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.
- package/build/cjs/index.d.ts +152 -1
- package/build/cjs/index.js +81 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +74 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +154 -2
- package/build/cjs/meta.js +69 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +152 -1
- package/build/es/index.mjs +77 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +70 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +154 -2
- package/build/es/meta.mjs +65 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +26 -11
- package/build/internal/cjs/index.typings.d.ts +173 -9
- package/build/internal/cjs/meta.d.ts +154 -2
- package/build/internal/es/index.d.mts +26 -11
- package/build/internal/es/index.typings.d.mts +173 -9
- package/build/internal/es/meta.d.mts +154 -2
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -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 };
|
package/build/cjs/index.js
CHANGED
|
@@ -20,9 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
BusinessGoalConfidence: () => BusinessGoalConfidence,
|
|
24
|
+
ContentSource: () => ContentSource,
|
|
23
25
|
PlanPartType: () => PlanPartType,
|
|
24
26
|
PlanStatus: () => PlanStatus,
|
|
25
27
|
Platform: () => Platform,
|
|
28
|
+
PromptSuggestionsSource: () => PromptSuggestionsSource,
|
|
26
29
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
27
30
|
createAndGeneratePlan: () => createAndGeneratePlan4,
|
|
28
31
|
createPlan: () => createPlan4,
|
|
@@ -31,6 +34,7 @@ __export(index_exports, {
|
|
|
31
34
|
generatePlan: () => generatePlan4,
|
|
32
35
|
getPlan: () => getPlan4,
|
|
33
36
|
getPlanByProjectId: () => getPlanByProjectId4,
|
|
37
|
+
getPromptSuggestions: () => getPromptSuggestions4,
|
|
34
38
|
modifyPlan: () => modifyPlan4,
|
|
35
39
|
regenerateIcon: () => regenerateIcon4,
|
|
36
40
|
updatePlan: () => updatePlan4
|
|
@@ -345,6 +349,27 @@ function finalizePlan(payload) {
|
|
|
345
349
|
}
|
|
346
350
|
return __finalizePlan;
|
|
347
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
|
+
}
|
|
348
373
|
|
|
349
374
|
// src/containers-plans-v1-plan-plans.universal.ts
|
|
350
375
|
var Platform = /* @__PURE__ */ ((Platform2) => {
|
|
@@ -356,6 +381,23 @@ var PlanStatus = /* @__PURE__ */ ((PlanStatus2) => {
|
|
|
356
381
|
PlanStatus2["FINALIZED"] = "FINALIZED";
|
|
357
382
|
return PlanStatus2;
|
|
358
383
|
})(PlanStatus || {});
|
|
384
|
+
var BusinessGoalConfidence = /* @__PURE__ */ ((BusinessGoalConfidence2) => {
|
|
385
|
+
BusinessGoalConfidence2["LOW"] = "LOW";
|
|
386
|
+
BusinessGoalConfidence2["MEDIUM"] = "MEDIUM";
|
|
387
|
+
BusinessGoalConfidence2["HIGH"] = "HIGH";
|
|
388
|
+
return BusinessGoalConfidence2;
|
|
389
|
+
})(BusinessGoalConfidence || {});
|
|
390
|
+
var ContentSource = /* @__PURE__ */ ((ContentSource2) => {
|
|
391
|
+
ContentSource2["STORES"] = "STORES";
|
|
392
|
+
ContentSource2["BOOKINGS"] = "BOOKINGS";
|
|
393
|
+
ContentSource2["EVENTS"] = "EVENTS";
|
|
394
|
+
ContentSource2["BLOG"] = "BLOG";
|
|
395
|
+
ContentSource2["PRICING_PLANS"] = "PRICING_PLANS";
|
|
396
|
+
ContentSource2["RESTAURANTS"] = "RESTAURANTS";
|
|
397
|
+
ContentSource2["CMS"] = "CMS";
|
|
398
|
+
ContentSource2["SITE_TEXT"] = "SITE_TEXT";
|
|
399
|
+
return ContentSource2;
|
|
400
|
+
})(ContentSource || {});
|
|
359
401
|
var PlanPartType = /* @__PURE__ */ ((PlanPartType2) => {
|
|
360
402
|
PlanPartType2["APP_NAME"] = "APP_NAME";
|
|
361
403
|
PlanPartType2["APP_DESCRIPTION"] = "APP_DESCRIPTION";
|
|
@@ -370,6 +412,11 @@ var PlanPartType = /* @__PURE__ */ ((PlanPartType2) => {
|
|
|
370
412
|
PlanPartType2["TEXT_THEME"] = "TEXT_THEME";
|
|
371
413
|
return PlanPartType2;
|
|
372
414
|
})(PlanPartType || {});
|
|
415
|
+
var PromptSuggestionsSource = /* @__PURE__ */ ((PromptSuggestionsSource2) => {
|
|
416
|
+
PromptSuggestionsSource2["BUSINESS_PROFILE"] = "BUSINESS_PROFILE";
|
|
417
|
+
PromptSuggestionsSource2["NO_SUGGESTIONS"] = "NO_SUGGESTIONS";
|
|
418
|
+
return PromptSuggestionsSource2;
|
|
419
|
+
})(PromptSuggestionsSource || {});
|
|
373
420
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
374
421
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
375
422
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -627,6 +674,29 @@ async function finalizePlan2(planId, conversationId) {
|
|
|
627
674
|
throw transformedError;
|
|
628
675
|
}
|
|
629
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
|
+
}
|
|
630
700
|
|
|
631
701
|
// src/containers-plans-v1-plan-plans.public.ts
|
|
632
702
|
function createPlan3(httpClient) {
|
|
@@ -703,6 +773,12 @@ function finalizePlan3(httpClient) {
|
|
|
703
773
|
{ httpClient }
|
|
704
774
|
);
|
|
705
775
|
}
|
|
776
|
+
function getPromptSuggestions3(httpClient) {
|
|
777
|
+
return () => getPromptSuggestions2(
|
|
778
|
+
// @ts-ignore
|
|
779
|
+
{ httpClient }
|
|
780
|
+
);
|
|
781
|
+
}
|
|
706
782
|
|
|
707
783
|
// src/containers-plans-v1-plan-plans.context.ts
|
|
708
784
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
@@ -716,11 +792,15 @@ var generatePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(g
|
|
|
716
792
|
var modifyPlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(modifyPlan3);
|
|
717
793
|
var regenerateIcon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(regenerateIcon3);
|
|
718
794
|
var finalizePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(finalizePlan3);
|
|
795
|
+
var getPromptSuggestions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPromptSuggestions3);
|
|
719
796
|
// Annotate the CommonJS export names for ESM import in node:
|
|
720
797
|
0 && (module.exports = {
|
|
798
|
+
BusinessGoalConfidence,
|
|
799
|
+
ContentSource,
|
|
721
800
|
PlanPartType,
|
|
722
801
|
PlanStatus,
|
|
723
802
|
Platform,
|
|
803
|
+
PromptSuggestionsSource,
|
|
724
804
|
WebhookIdentityType,
|
|
725
805
|
createAndGeneratePlan,
|
|
726
806
|
createPlan,
|
|
@@ -729,6 +809,7 @@ var finalizePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(f
|
|
|
729
809
|
generatePlan,
|
|
730
810
|
getPlan,
|
|
731
811
|
getPlanByProjectId,
|
|
812
|
+
getPromptSuggestions,
|
|
732
813
|
modifyPlan,
|
|
733
814
|
regenerateIcon,
|
|
734
815
|
updatePlan
|