@wix/ditto-codegen-public 1.0.364 → 1.0.366

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.
Files changed (2) hide show
  1. package/dist/out.js +1232 -11
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -12176,9 +12176,1164 @@ var require_dist6 = __commonJS({
12176
12176
  }
12177
12177
  });
12178
12178
 
12179
- // ../codegen-studio-2-config/dist/site-data-layer-rules.js
12179
+ // ../codegen-common-logic/dist/extensions/BackendApiAgent.js
12180
+ var require_BackendApiAgent = __commonJS({
12181
+ "../codegen-common-logic/dist/extensions/BackendApiAgent.js"(exports2) {
12182
+ "use strict";
12183
+ Object.defineProperty(exports2, "__esModule", { value: true });
12184
+ exports2.getBackendApiDecisionGuide = exports2.getBackendApiAgentDocumentation = void 0;
12185
+ var getBackendApiAgentDocumentation = () => {
12186
+ return `<backend_api>
12187
+ #### Backend API (HTTP Endpoints)
12188
+
12189
+ - **Description**:
12190
+ Backend APIs allow you to define HTTP server endpoints in your app's backend that you can call from your frontend.
12191
+ - **Use Cases**:
12192
+ - Third-party API integrations (e.g. calling the OpenAI API with an API key that you don't want to expose in your client code)
12193
+ - **When to Choose**: ONLY when the user prompt EXPLICITLY requests a backend, a server, or an endpoint AND the operation cannot be done on the frontend.
12194
+
12195
+ - **[CRITICAL] When NOT to Choose**:
12196
+ - \u274C **DEFAULT RULE: Do NOT use Backend API unless absolutely necessary**
12197
+ - \u274C Don't use Backend API simply because you need to query or manipulate data
12198
+ - \u274C Don't use Backend API for CMS operations - use @wix/data directly in Site Widgets/Embedded Scripts/Dashboard Pages
12199
+ - \u274C Don't use Backend API for cart/order operations - use @wix/stores or @wix/ecom directly in frontend code
12200
+ - \u274C Don't use Backend API for customer/contact operations - use @wix/crm directly in frontend code
12201
+ - \u274C Don't use Backend API for displaying data on the site - query it directly in Site Widgets or Embedded Scripts
12202
+ - \u274C Don't use Backend API for checking conditions or filtering data - do it in frontend code
12203
+
12204
+ - **Frontend-First Approach**:
12205
+ - \u2705 **Always prefer frontend packages**: @wix/data, @wix/crm, @wix/stores, @wix/ecom, @wix/members
12206
+ - \u2705 These packages work in Site Widgets, Embedded Scripts, and Dashboard Pages
12207
+ - \u2705 No backend needed for 90% of data operations
12208
+ </backend_api>`;
12209
+ };
12210
+ exports2.getBackendApiAgentDocumentation = getBackendApiAgentDocumentation;
12211
+ var getBackendApiDecisionGuide = () => {
12212
+ return `### Choose Backend API (HTTP Endpoints) when:
12213
+
12214
+ - \u2705 The user EXPLICITLY requests a backend, a server, or an endpoint
12215
+ - \u2705 Need to hide credentials or secrets (e.g., calling third-party APIs with API keys)
12216
+ - \u2705 Integrating with third-party services that require server-side authentication
12217
+
12218
+ ### \u274C [CRITICAL] DO NOT choose Backend API (HTTP Endpoints) when:
12219
+
12220
+ **IMPORTANT: 90% of operations can be done on the frontend - Backend API is rarely needed!**
12221
+
12222
+ - \u274C **Working with CMS data** \u2192 Use @wix/data directly in Site Widgets, Embedded Scripts, or Dashboard Pages
12223
+ - \u274C **Working with contacts/customers** \u2192 Use @wix/crm directly in the frontend
12224
+ - \u274C **Working with products, orders, or cart** \u2192 Use @wix/stores or @wix/ecom directly in the frontend
12225
+ - \u274C **Displaying data on the site** \u2192 Query it directly in Site Widgets or Embedded Scripts
12226
+ - \u274C **Checking user conditions or filtering** \u2192 Do it in frontend code
12227
+ - \u274C **User simply wants "data operations"** \u2192 This does NOT require a backend
12228
+
12229
+ **Examples of what DOES NOT need Backend API:**
12230
+ - "Create a CMS and display data on site" \u2192 Dashboard Page (for CMS management) + Embedded Script/Site Widget (query with @wix/data)
12231
+ - "Show popup with cart items" \u2192 Embedded Script with @wix/stores
12232
+ - "Display user-specific content" \u2192 Site Widget with @wix/members and @wix/data
12233
+ - "Check if user ID is in a list" \u2192 Embedded Script with @wix/data query`;
12234
+ };
12235
+ exports2.getBackendApiDecisionGuide = getBackendApiDecisionGuide;
12236
+ }
12237
+ });
12238
+
12239
+ // ../codegen-common-logic/dist/extensions/BackendEventAgent.js
12240
+ var require_BackendEventAgent = __commonJS({
12241
+ "../codegen-common-logic/dist/extensions/BackendEventAgent.js"(exports2) {
12242
+ "use strict";
12243
+ Object.defineProperty(exports2, "__esModule", { value: true });
12244
+ exports2.getBackendEventDecisionGuide = exports2.getBackendEventAgentDocumentation = void 0;
12245
+ var getBackendEventAgentDocumentation = () => {
12246
+ return `<backend_event>
12247
+ #### Backend Event Extensions
12248
+
12249
+ - **Description**: Webhooks that respond to Wix platform events. These are server-side handlers automatically triggered when specific events occur on the Wix platform.
12250
+ - **Use Cases**:
12251
+ - Automated workflows triggered by user actions
12252
+ - Data synchronization when events occur
12253
+ - Notifications and alerts
12254
+ - Audit logging and tracking
12255
+ - Third-party integrations triggered by Wix events
12256
+ - Reacting to user actions and events
12257
+ - Triggering actions when platform events occur (e.g. send email when order is placed)
12258
+
12259
+ - **When to Choose**: Look for these trigger patterns in user prompts:
12260
+ - "WHEN [event] happens" or "WHEN [action] occurs"
12261
+ - "AFTER [event]"
12262
+ - "Automatically when [event]"
12263
+ - "Trigger [action] on [event]"
12264
+ - "Display/show [element] when [event occurs]"
12265
+ - "Notify when [event]"
12266
+ - The action needs to happen on the server in response to a platform event
12267
+
12268
+ - **[CRITICAL] If the prompt describes an action that should be triggered by a platform event, you must include a BACKEND_EVENT extension to handle the platform event. These scenarios require server-side event listeners to respond to platform events, not client-side conditional logic.**
12269
+
12270
+ - **Examples of Platform Events**:
12271
+ - eCommerce: checkout created/completed, order created/updated
12272
+ - Contacts: contact created/updated
12273
+ - Bookings: booking created/canceled
12274
+ - Data: data item created/updated
12275
+ - Products: product created/updated
12276
+ </backend_event>`;
12277
+ };
12278
+ exports2.getBackendEventAgentDocumentation = getBackendEventAgentDocumentation;
12279
+ var getBackendEventDecisionGuide = () => {
12280
+ return `### Choose Backend Event Extensions (Webhooks) when:
12281
+
12282
+ - \u2705 User prompt contains trigger words: "WHEN", "AFTER", "Automatically when", "Trigger on"
12283
+ - \u2705 Need to react to platform events (checkout completed, order created, product created, contact created, etc.)
12284
+ - \u2705 Building automated workflows triggered by user actions
12285
+ - \u2705 Synchronizing data with external systems when events occur
12286
+ - \u2705 Creating notification systems
12287
+ - \u2705 Need server-side webhooks/event handling (not user-initiated in browser)
12288
+ - \u2705 Action must happen automatically in response to a platform event
12289
+ - \u2705 Prompt describes actions triggered by platform events - these require BACKEND_EVENT webhooks, not client-side logic
12290
+
12291
+ ### Do NOT choose Backend Event Extensions (Webhooks) when:
12292
+
12293
+ - \u274C User asks for "initialization" or "setup" logic (one-time operations) - webhooks are for recurring events
12294
+ - \u274C User wants to create/initialize collections - this is one-time setup, not event-driven
12295
+ - \u274C User wants server endpoints called from frontend
12296
+ - \u274C User wants conditional logic without platform event triggers
12297
+ - \u274C The action is NOT triggered by a Wix platform webhook
12298
+ For example when not to use Backend Event Extensions:
12299
+ - \u274C "Create a products collection when the app is installed"
12300
+ `;
12301
+ };
12302
+ exports2.getBackendEventDecisionGuide = getBackendEventDecisionGuide;
12303
+ }
12304
+ });
12305
+
12306
+ // ../codegen-common-logic/dist/extensions/SPIAgent.js
12307
+ var require_SPIAgent = __commonJS({
12308
+ "../codegen-common-logic/dist/extensions/SPIAgent.js"(exports2) {
12309
+ "use strict";
12310
+ Object.defineProperty(exports2, "__esModule", { value: true });
12311
+ exports2.getSPIDecisionGuide = exports2.getSPIAgentDocumentation = void 0;
12312
+ var getSPIAgentDocumentation = () => {
12313
+ return `<service_plugin>
12314
+ #### Service Plugin Extensions (SPIs) - Developer Preview
12315
+
12316
+ - **Description**: Custom logic injection into existing Wix app flows (formerly called SPIs - Service Provider Interfaces)
12317
+ - **Use Cases**:
12318
+ - Custom shipping rate calculations
12319
+ - Payment processing modifications
12320
+ - Custom validation logic
12321
+ - Additional checkout fees
12322
+ - Gift card operations
12323
+ - Discount trigger customizations
12324
+ - Staff sorting in bookings
12325
+ - **Available SPI Types**:
12326
+ - eCommerce (shipping rates, fees, validations, payment settings, gift cards, discount triggers)
12327
+ - Bookings (staff sorting)
12328
+ - **When to Choose**: When you need to customize or extend core Wix business app functionality during a business flow
12329
+
12330
+ **Available SPI Names (choose appropriate ones for relatedSpis):**
12331
+ - "ecom.shippingRates.getShippingRates" - For custom shipping rate calculations
12332
+ - "ecom.additionalFees.calculateAdditionalFees" - For calculating additional fees (handling, processing, etc.)
12333
+ - "ecom.paymentSettings.getPaymentSettings" - For payment configuration and 3D Secure settings
12334
+ - "ecom.validations.getValidationViolations" - For cart and checkout validations
12335
+ - "ecom.customTriggers.getEligibleTriggers" - For custom discount trigger logic
12336
+ - "ecom.customTriggers.listTriggers" - For listing available custom discount triggers
12337
+ - "ecom.giftCardsProvider.redeem" - For gift card redemption logic
12338
+ - "ecom.giftCardsProvider._void" - For voiding gift card transactions
12339
+ - "ecom.giftCardsProvider.getBalance" - For checking gift card balances
12340
+ - "bookings.staffSortingProvider.sortStaffMembers" - For custom staff sorting/assignment in bookings
12341
+
12342
+ **SPI Selection Guidelines:**
12343
+ - For shipping-related requests \u2192 use "ecom.shippingRates.getShippingRates"
12344
+ - For fee calculations \u2192 use "ecom.additionalFees.calculateAdditionalFees"
12345
+ - For payment processing \u2192 use "ecom.paymentSettings.getPaymentSettings"
12346
+ - For cart/checkout validation \u2192 use "ecom.validations.getValidationViolations"
12347
+ - For discount logic \u2192 use "ecom.customTriggers.getEligibleTriggers" or "ecom.customTriggers.listTriggers"
12348
+ - For gift card functionality \u2192 use appropriate "ecom.giftCardsProvider.*" methods
12349
+ - For staff sorting/assignment in bookings \u2192 use "bookings.staffSortingProvider.sortStaffMembers"
12350
+
12351
+ **\u274C UNSUPPORTED - DO NOT USE SERVICE_PLUGIN for these (no builders exist):**
12352
+ - Tax calculations \u2192 use BACKEND_EVENT listening to order events instead
12353
+ - Bookings custom pricing \u2192 use BACKEND_EVENT listening to booking events instead
12354
+ - Product recommendations \u2192 use BACKEND_EVENT or EMBEDDED_SCRIPT instead
12355
+ - External catalog integration \u2192 use BACKEND_API instead
12356
+
12357
+ </service_plugin>`;
12358
+ };
12359
+ exports2.getSPIAgentDocumentation = getSPIAgentDocumentation;
12360
+ var getSPIDecisionGuide = () => {
12361
+ return `### Choose Service Plugin Extensions (SPIs) when:
12362
+
12363
+ - \u2705 Need to customize core business logic (shipping rates, checkout fees, validations, payment settings)
12364
+ - \u2705 Want to inject custom logic into existing Wix flows DURING execution (not after events)
12365
+ - \u2705 Need to modify eCommerce checkout calculations (fees, shipping, gift cards, discounts)
12366
+ - \u2705 Need to customize Bookings staff assignment logic
12367
+ - \u274C NOT for tax calculations or bookings pricing (use BACKEND_EVENT instead)`;
12368
+ };
12369
+ exports2.getSPIDecisionGuide = getSPIDecisionGuide;
12370
+ }
12371
+ });
12372
+
12373
+ // ../codegen-common-logic/dist/extensions/DataCollectionAgent.js
12374
+ var require_DataCollectionAgent = __commonJS({
12375
+ "../codegen-common-logic/dist/extensions/DataCollectionAgent.js"(exports2) {
12376
+ "use strict";
12377
+ Object.defineProperty(exports2, "__esModule", { value: true });
12378
+ exports2.getDataCollectionDecisionGuide = exports2.getDataCollectionAgentDocumentation = void 0;
12379
+ var getDataCollectionAgentDocumentation = () => {
12380
+ return `<data_collection>
12381
+ #### Data Collections (CMS)
12382
+
12383
+ - **Description**: CMS data collection schemas that define structured data storage for the app. Collections are automatically created when the app is installed on a site. Enables the site's code editor automatically, which is required for Wix Data APIs to work.
12384
+ - **Use Cases**:
12385
+ - Storing business data (products, orders, inventory, fees)
12386
+ - User-generated content (reviews, comments, submissions)
12387
+ - Custom app data that needs to persist across sessions
12388
+ - Relational data with references between collections
12389
+ - Content management for blog posts, articles, or catalog items
12390
+ - **When to Choose**: When the app needs to store and manage structured data that can be accessed from dashboard pages, site pages, backend code, or external applications. Essential when other extensions (Dashboard Pages, Site Widgets) need to read or write persistent data.
12391
+ </data_collection>`;
12392
+ };
12393
+ exports2.getDataCollectionAgentDocumentation = getDataCollectionAgentDocumentation;
12394
+ var getDataCollectionDecisionGuide = () => {
12395
+ return `### Choose Data Collections when:
12396
+
12397
+ - \u2705 The app needs to store and manage structured business data
12398
+ - \u2705 Dashboard Pages need to manage data displayed on the site
12399
+ - \u2705 Site Widgets need to query persistent data
12400
+ - \u2705 You need relational data with references between collections
12401
+ - \u2705 User-generated content needs to be stored (reviews, submissions, comments)
12402
+ - \u2705 Multiple records of the same type need CRUD operations
12403
+
12404
+ ### Do NOT choose Data Collections when:
12405
+
12406
+ - \u274C The domain is already covered by a Wix SDK (Stores, Bookings, eCommerce, Events, Restaurants, Blog, Forum, Portfolio, Pricing Plans, Donations, Gift Cards, Coupons, Members & Contacts, Forms, Loyalty Program, Communication) \u2014 use the SDK instead, **including for SDK-managed configuration** like earning rules, plans, services, rewards, or coupon rules
12407
+ - \u274C The data is "configuration" for an SDK that already exposes that configuration through its own API`;
12408
+ };
12409
+ exports2.getDataCollectionDecisionGuide = getDataCollectionDecisionGuide;
12410
+ }
12411
+ });
12412
+
12413
+ // ../codegen-common-logic/dist/extensions/BackendExtensions.js
12414
+ var require_BackendExtensions = __commonJS({
12415
+ "../codegen-common-logic/dist/extensions/BackendExtensions.js"(exports2) {
12416
+ "use strict";
12417
+ Object.defineProperty(exports2, "__esModule", { value: true });
12418
+ exports2.getBackendExtensionsDocumentation = void 0;
12419
+ var BackendApiAgent_1 = require_BackendApiAgent();
12420
+ var BackendEventAgent_1 = require_BackendEventAgent();
12421
+ var SPIAgent_1 = require_SPIAgent();
12422
+ var DataCollectionAgent_1 = require_DataCollectionAgent();
12423
+ var getBackendExtensionsDocumentation = () => {
12424
+ return `### Backend Extensions
12425
+
12426
+ Backend extensions provide server-side functionality.
12427
+
12428
+ ${(0, BackendApiAgent_1.getBackendApiAgentDocumentation)()}
12429
+
12430
+ ${(0, BackendEventAgent_1.getBackendEventAgentDocumentation)()}
12431
+
12432
+ ${(0, SPIAgent_1.getSPIAgentDocumentation)()}
12433
+
12434
+ ${(0, DataCollectionAgent_1.getDataCollectionAgentDocumentation)()}`;
12435
+ };
12436
+ exports2.getBackendExtensionsDocumentation = getBackendExtensionsDocumentation;
12437
+ }
12438
+ });
12439
+
12440
+ // ../codegen-common-logic/dist/extensions/CustomElementWidgetAgent.js
12441
+ var require_CustomElementWidgetAgent = __commonJS({
12442
+ "../codegen-common-logic/dist/extensions/CustomElementWidgetAgent.js"(exports2) {
12443
+ "use strict";
12444
+ Object.defineProperty(exports2, "__esModule", { value: true });
12445
+ exports2.getCustomElementWidgetDecisionGuide = exports2.getCustomElementWidgetAgentDocumentation = void 0;
12446
+ var getCustomElementWidgetAgentDocumentation = () => {
12447
+ return `<custom_element_widget>
12448
+ #### Custom Element Widgets
12449
+
12450
+ - **Description**: Custom HTML elements/widgets that site owners can add to their pages
12451
+ - **Use Cases**:
12452
+ - Interactive components
12453
+ - Custom forms
12454
+ - Data displays
12455
+ - Third-party service integrations
12456
+ - Custom calculators or tools
12457
+ - Counter components
12458
+ - Countdown components
12459
+ - **Built-in Settings Panel**: Custom Element Widgets have a built-in settings panel in the Wix Editor that allows site owners to configure the widget directly without needing a separate Dashboard Page. The panel can include:
12460
+ - Text inputs (titles, labels, messages)
12461
+ - Date/time pickers
12462
+ - Color pickers and style options
12463
+ - Toggle switches and checkboxes
12464
+ - Dropdown selectors
12465
+ - Number inputs
12466
+ - **When Panel is Sufficient**: For widgets where configuration is per-instance and managed by the site owner in the Editor (e.g., countdown target date, display text, colors, styles). NO Dashboard Page is needed.
12467
+ - **When Dashboard Page is Needed**: Only when the app requires storing shared configurations in a database, managing multiple configurations across widgets, or providing admin-level analytics/reporting.
12468
+ - **When to Choose**: When you need to provide reusable, configurable components for site builders and you need to add functionality to Wix sites for Wix site visitors. This is the DEFAULT choice for site functionality **that is NOT tied to a Wix business solution page**. If the functionality belongs on a product page, booking page, checkout, event page, or blog post \u2192 use Site Plugin instead.
12469
+ - **IMPORTANT**: Do NOT pair Custom Element Widgets with a Dashboard Page unless the user explicitly requests shared/centralized configuration management. The widget panel handles per-instance configuration.
12470
+ </custom_element_widget>`;
12471
+ };
12472
+ exports2.getCustomElementWidgetAgentDocumentation = getCustomElementWidgetAgentDocumentation;
12473
+ var getCustomElementWidgetDecisionGuide = () => {
12474
+ return `### Choose Custom Element Widgets when:
12475
+
12476
+ - \u2705 Creating reusable page components
12477
+ - \u2705 Building interactive site elements
12478
+ - \u2705 Need configurable widgets for site builders
12479
+ - \u2705 Want to provide drag-and-drop functionality
12480
+ - \u2705 Need to add functionality to Wix sites for site visitors
12481
+ - \u2705 **DEFAULT choice for site functionality not tied to a Wix business solution page**
12482
+
12483
+ ### Custom Element Widget Panel vs Dashboard Page:
12484
+ - \u2705 Use the **built-in widget panel** for per-instance configuration (text, dates, styles, toggles) - NO Dashboard Page needed
12485
+ - \u274C Only add a Dashboard Page if the user explicitly needs shared/centralized configuration stored in a database`;
12486
+ };
12487
+ exports2.getCustomElementWidgetDecisionGuide = getCustomElementWidgetDecisionGuide;
12488
+ }
12489
+ });
12490
+
12491
+ // ../codegen-common-logic/dist/extensions/DashboardPageAgent.js
12492
+ var require_DashboardPageAgent = __commonJS({
12493
+ "../codegen-common-logic/dist/extensions/DashboardPageAgent.js"(exports2) {
12494
+ "use strict";
12495
+ Object.defineProperty(exports2, "__esModule", { value: true });
12496
+ exports2.getDashboardPageDecisionGuide = exports2.getDashboardPageAgentDocumentation = void 0;
12497
+ var getDashboardPageAgentDocumentation = () => {
12498
+ return `<dashboard_page>
12499
+ #### Dashboard Pages
12500
+
12501
+ - **Description**: Administrative pages added to the dashboard with custom functionality
12502
+ - **Use Cases**:
12503
+ - Business management tools
12504
+ - Data visualization dashboards
12505
+ - Administrative interfaces
12506
+ - Custom reporting pages
12507
+ - **When to Choose**: When you need a dedicated administrative interface or custom business management functionality
12508
+ </dashboard_page>`;
12509
+ };
12510
+ exports2.getDashboardPageAgentDocumentation = getDashboardPageAgentDocumentation;
12511
+ var getDashboardPageDecisionGuide = () => {
12512
+ return `### Choose Dashboard Pages when:
12513
+
12514
+ - \u2705 You need a dedicated administrative interface
12515
+ - \u2705 Creating business management tools
12516
+ - \u2705 Building custom reporting dashboards
12517
+ - \u2705 Need full control over page layout and functionality
12518
+
12519
+ ### Do NOT add Dashboard Pages for:
12520
+
12521
+ - \u274C Site Widget configuration - use the widget's **built-in settings panel** instead`;
12522
+ };
12523
+ exports2.getDashboardPageDecisionGuide = getDashboardPageDecisionGuide;
12524
+ }
12525
+ });
12526
+
12527
+ // ../codegen-common-logic/dist/extensions/DashboardPlugins.js
12528
+ var require_DashboardPlugins = __commonJS({
12529
+ "../codegen-common-logic/dist/extensions/DashboardPlugins.js"(exports2) {
12530
+ "use strict";
12531
+ Object.defineProperty(exports2, "__esModule", { value: true });
12532
+ exports2.getDashboardPluginsDecisionGuide = exports2.getDashboardPluginsAgentDocumentation = void 0;
12533
+ var getDashboardPluginsAgentDocumentation = () => {
12534
+ return `<dashboard_plugins>
12535
+ #### Dashboard Plugins
12536
+ - **Description**: Interactive widgets embedded into existing Wix app dashboard pages via predefined plugin slots
12537
+ - **Slot System**: Plugins are placed in predefined page slots within existing Wix business app dashboards
12538
+ - **Use Cases**:
12539
+ - Product analytics widgets on Wix Stores Products page
12540
+ - Inventory monitoring on Wix Stores Inventory page
12541
+ - Booking insights on Wix Bookings Services or Booking List pages
12542
+ - Order details enrichment on Wix eCommerce Order page
12543
+ - **Context Access**: Automatic access to current page context (entity IDs, user permissions, page state)
12544
+ - **When to Choose**: When you need to enhance existing Wix business app dashboards with contextual functionality
12545
+
12546
+ ##### Supported Dashboard Plugin Page Slots:
12547
+
12548
+ **Wix Stores:**
12549
+ - Products page \u2013 Embed a plugin on the Products list page
12550
+ - Inventory page \u2013 Embed a plugin on the Inventory management page
12551
+
12552
+ **Wix Bookings:**
12553
+ - Staff page \u2013 Embed a plugin on the Staff management page
12554
+ - Edit Staff Profile page \u2013 Embed a plugin on a staff member's profile page
12555
+ - Services page \u2013 Embed a plugin on the Services list page
12556
+ - Booking List page \u2013 Embed a plugin on the Booking List page
12557
+
12558
+ **Wix eCommerce:**
12559
+ - Order page \u2013 Embed a plugin on the Order details page
12560
+ - Edit Order page \u2013 Embed a plugin (e.g., additional fees) on the Edit Order page
12561
+ - Orders List page \u2013 Available via more actions menu
12562
+
12563
+ **Wix Blog:**
12564
+ - Blog Overview page \u2013 Embed a plugin on the Blog Overview page
12565
+ - Categories page \u2013 Embed a plugin on the Categories page
12566
+ - Posts page \u2013 Embed a plugin on the Posts list page
12567
+ - Tags page \u2013 Embed a plugin on the Tags page
12568
+
12569
+ **Wix Events:**
12570
+ - Event Features Tab, Overview Tab, Promotion Tab, Settings Tab, Tickets & Seating Tab
12571
+
12572
+ **Wix Restaurants:**
12573
+ - Table Reservations page \u2013 Embed a plugin on the Table Reservations page
12574
+
12575
+ ##### Examples:
12576
+ - Wix Stores Products page \u2013 Product performance analytics widget
12577
+ - Wix Stores Inventory page \u2013 Low-stock alerts widget
12578
+ - Wix Bookings Services page \u2013 Service performance insights
12579
+ - Wix Bookings Booking List page \u2013 Quick rescheduling action buttons
12580
+ - Wix eCommerce Order page \u2013 Cross-sell recommendations
12581
+ - Wix Blog Posts page \u2013 SEO score widget for draft posts
12582
+ </dashboard_plugins>`;
12583
+ };
12584
+ exports2.getDashboardPluginsAgentDocumentation = getDashboardPluginsAgentDocumentation;
12585
+ var getDashboardPluginsDecisionGuide = () => {
12586
+ return `### Choose Dashboard Plugins when:
12587
+
12588
+ - \u2705 You want to enhance existing Wix app pages with contextual widgets
12589
+ - \u2705 Need to integrate with Wix Bookings, Stores, etc. within their existing UI
12590
+ - \u2705 Want to add functionality to specific business app contexts (product pages, order pages, booking lists, etc.)
12591
+ - \u2705 Need automatic access to current page context (entity IDs, user permissions, page state)
12592
+ - \u2705 Building analytics, insights, or management tools that complement existing workflows
12593
+ - \u2705 Want to avoid creating separate pages for functionality that fits within existing contexts`;
12594
+ };
12595
+ exports2.getDashboardPluginsDecisionGuide = getDashboardPluginsDecisionGuide;
12596
+ }
12597
+ });
12598
+
12599
+ // ../codegen-common-logic/dist/extensions/DashboardMenuPlugins.js
12600
+ var require_DashboardMenuPlugins = __commonJS({
12601
+ "../codegen-common-logic/dist/extensions/DashboardMenuPlugins.js"(exports2) {
12602
+ "use strict";
12603
+ Object.defineProperty(exports2, "__esModule", { value: true });
12604
+ exports2.getDashboardMenuPluginsDecisionGuide = exports2.getDashboardMenuPluginsAgentDocumentation = void 0;
12605
+ var getDashboardMenuPluginsAgentDocumentation = () => {
12606
+ return `<dashboard_menu_plugins>
12607
+ #### Dashboard Menu Plugins
12608
+
12609
+ - **Description**: Menu items added to dashboard page menus that can navigate to pages or open modals
12610
+ - **Use Cases**:
12611
+ - Quick access to app features
12612
+ - Navigation shortcuts
12613
+ - Context-specific actions
12614
+ - **When to Choose**: When you need to add navigation items or quick actions to existing dashboard menus
12615
+ </dashboard_menu_plugins>`;
12616
+ };
12617
+ exports2.getDashboardMenuPluginsAgentDocumentation = getDashboardMenuPluginsAgentDocumentation;
12618
+ var getDashboardMenuPluginsDecisionGuide = () => {
12619
+ return `### Choose Dashboard Menu Plugins when:
12620
+
12621
+ - \u2705 Need to add custom navigation items to the dashboard sidebar
12622
+ - \u2705 Want quick-access shortcuts to app features from the dashboard menu
12623
+ - \u2705 Need context-specific actions accessible from dashboard navigation
12624
+ - \u2705 Want to link dashboard menu items to Dashboard Pages`;
12625
+ };
12626
+ exports2.getDashboardMenuPluginsDecisionGuide = getDashboardMenuPluginsDecisionGuide;
12627
+ }
12628
+ });
12629
+
12630
+ // ../codegen-common-logic/dist/extensions/DashboardExtensions.js
12631
+ var require_DashboardExtensions = __commonJS({
12632
+ "../codegen-common-logic/dist/extensions/DashboardExtensions.js"(exports2) {
12633
+ "use strict";
12634
+ Object.defineProperty(exports2, "__esModule", { value: true });
12635
+ exports2.getDashboardExtensionsDocumentation = void 0;
12636
+ var DashboardPageAgent_1 = require_DashboardPageAgent();
12637
+ var DashboardPlugins_1 = require_DashboardPlugins();
12638
+ var DashboardMenuPlugins_1 = require_DashboardMenuPlugins();
12639
+ var getDashboardExtensionsDocumentation = () => {
12640
+ return `### Dashboard Extensions
12641
+ Dashboard extensions add functionality to the Wix Dashboard for site administrators. They are not visible on live sites.
12642
+ ${(0, DashboardPageAgent_1.getDashboardPageAgentDocumentation)()}
12643
+
12644
+ ${(0, DashboardPlugins_1.getDashboardPluginsAgentDocumentation)()}
12645
+
12646
+ ${(0, DashboardMenuPlugins_1.getDashboardMenuPluginsAgentDocumentation)()}`;
12647
+ };
12648
+ exports2.getDashboardExtensionsDocumentation = getDashboardExtensionsDocumentation;
12649
+ }
12650
+ });
12651
+
12652
+ // ../codegen-common-logic/dist/extensions/EmbeddedScriptAgent.js
12653
+ var require_EmbeddedScriptAgent = __commonJS({
12654
+ "../codegen-common-logic/dist/extensions/EmbeddedScriptAgent.js"(exports2) {
12655
+ "use strict";
12656
+ Object.defineProperty(exports2, "__esModule", { value: true });
12657
+ exports2.getEmbeddedScriptDecisionGuide = exports2.getEmbeddedScriptAgentDocumentation = void 0;
12658
+ var getEmbeddedScriptAgentDocumentation = () => {
12659
+ return `<embedded_script>
12660
+ #### Embedded Scripts
12661
+
12662
+ - **Description**: HTML code fragments injected into site DOMs. These can include custom JavaScript, HTML elements, and can be configured through dynamic parameters managed via a Dashboard Page.
12663
+ - **Use Cases**:
12664
+ - Analytics tracking (Google Analytics, Mixpanel, Facebook Pixel)
12665
+ - Third-party integrations
12666
+ - Custom JavaScript functionality
12667
+ - Advertising code
12668
+ - Social media widgets
12669
+ - Site-wide notifications and popups
12670
+ - Countdown timers for events or promotions
12671
+ - Live chat widgets
12672
+ - Cookie consent banners
12673
+ - Custom tracking pixels
12674
+ - Dynamic content injection
12675
+ - Mouse/cursor effects (trails, custom cursors, sparkles, confetti following cursor)
12676
+ - Visual effects that follow user interactions site-wide (scroll effects, parallax, particle systems)
12677
+ - **Dynamic Parameters**: Can be configured with dynamic parameters that are managed through a Dashboard Page, allowing site owners to customize the script's behavior (e.g., headlines, messages, images, timing, activation modes)
12678
+ - **When to Choose**:
12679
+ - When you need to add third-party scripts or custom code to websites
12680
+ - When you need HTML/JavaScript that runs on every page or specific placements
12681
+ - When you need configurable site-wide features that can be managed via dashboard
12682
+ - When the functionality is better suited as injected code rather than a widget
12683
+ - **MANDATORY REQUIREMENT**: EVERY EMBEDDED_SCRIPT extension MUST be paired with one DASHBOARD_PAGE extension. The dashboard page is required to manage the script's configuration, settings, and dynamic parameters (e.g., countdown end date, popup message, tracking IDs, API keys, enable/disable toggles)
12684
+ - **CONSTRAINT**: An app can contain only ONE embedded script extension. Multiple embedded scripts are not supported.
12685
+ </embedded_script>`;
12686
+ };
12687
+ exports2.getEmbeddedScriptAgentDocumentation = getEmbeddedScriptAgentDocumentation;
12688
+ var getEmbeddedScriptDecisionGuide = () => {
12689
+ return `### Choose Embedded Scripts when:
12690
+
12691
+ - \u2705 Integrating third-party analytics or tracking (Google Analytics, Mixpanel, Facebook Pixel)
12692
+ - \u2705 Adding external JavaScript libraries
12693
+ - \u2705 Need code to run on every page or at specific DOM positions
12694
+ - \u2705 Implementing advertising or social media widgets
12695
+ - \u2705 Creating site-wide features like popups, banners, or notifications
12696
+ - \u2705 Building countdown timers for events or promotions
12697
+ - \u2705 Need configurable parameters managed through a dashboard
12698
+ - \u2705 Implementing cookie consent or GDPR compliance features
12699
+ - \u2705 Adding live chat or customer support widgets
12700
+ - \u2705 When HTML/JavaScript injection is more suitable than a widget component
12701
+ - \u2705 Pair with DASHBOARD_PAGE when configuration/management is needed
12702
+ - \u2705 **Creating mouse/cursor effects (trails, sparkles, confetti, custom cursors)**
12703
+ - \u2705 **Visual effects that follow user interactions site-wide (not contained to a specific area)**
12704
+ - \u2705 **Any effect that needs to work globally across the entire page/site**`;
12705
+ };
12706
+ exports2.getEmbeddedScriptDecisionGuide = getEmbeddedScriptDecisionGuide;
12707
+ }
12708
+ });
12709
+
12710
+ // ../codegen-common-logic/dist/extensions/EditorReactComponentAgent.js
12711
+ var require_EditorReactComponentAgent = __commonJS({
12712
+ "../codegen-common-logic/dist/extensions/EditorReactComponentAgent.js"(exports2) {
12713
+ "use strict";
12714
+ Object.defineProperty(exports2, "__esModule", { value: true });
12715
+ exports2.getEditorReactComponentDecisionGuide = exports2.getEditorReactComponentAgentDocumentation = void 0;
12716
+ var getEditorReactComponentAgentDocumentation = () => {
12717
+ return `<editor_react_component>
12718
+ #### Editor React Components
12719
+
12720
+ - **Description**: React components that work out-of-the-box in Wix sites. ONLY if React is EXPLICITLY requested.
12721
+ - **Use Cases**:
12722
+ - Interactive components with React
12723
+ - Custom forms with React
12724
+ - Data displays with React
12725
+ - Third-party service integrations with React
12726
+ - Custom calculators or tools with React
12727
+ - Counter components with React
12728
+ - Countdown components with React
12729
+ - **When to Choose**: ONLY when React is EXPLICITLY requested by the user AND you need to add functionality to Wix sites for Wix site visitors by writing React code. If React is not explicitly mentioned, choose Custom Element Widgets instead
12730
+ </editor_react_component>`;
12731
+ };
12732
+ exports2.getEditorReactComponentAgentDocumentation = getEditorReactComponentAgentDocumentation;
12733
+ var getEditorReactComponentDecisionGuide = () => {
12734
+ return `### Choose Editor React Components when:
12735
+
12736
+ - \u2705 React is EXPLICITLY requested by the user
12737
+ - \u2705 Creating reusable page components with React
12738
+ - \u2705 Building interactive site elements with React
12739
+ - \u2705 Need configurable widgets for site builders with React
12740
+ - \u2705 Want to provide drag-and-drop functionality with React
12741
+ - \u2705 Need to add functionality to Wix sites for site visitors using React`;
12742
+ };
12743
+ exports2.getEditorReactComponentDecisionGuide = getEditorReactComponentDecisionGuide;
12744
+ }
12745
+ });
12746
+
12747
+ // ../codegen-common-logic/dist/extensions/SitePluginAgent.js
12748
+ var require_SitePluginAgent = __commonJS({
12749
+ "../codegen-common-logic/dist/extensions/SitePluginAgent.js"(exports2) {
12750
+ "use strict";
12751
+ Object.defineProperty(exports2, "__esModule", { value: true });
12752
+ exports2.getSitePluginDecisionGuide = exports2.getSitePluginAgentDocumentation = void 0;
12753
+ var getSitePluginAgentDocumentation = () => {
12754
+ return `<site_plugin>
12755
+ #### Site Plugins
12756
+
12757
+ - **Description**: Custom elements rendered in predefined slots within Wix business solution pages (e.g., Wix Stores product pages, Wix Bookings service pages, Wix eCommerce checkout). Site plugins use native HTMLElement custom elements (not React).
12758
+ - **Use Cases**:
12759
+ - Product page enhancements (e.g., best seller badges, product reviews summary)
12760
+ - Booking page extensions (e.g., custom confirmation messages, appointment insights)
12761
+ - eCommerce slot integrations (e.g., checkout upsells, side cart additions)
12762
+ - Event page custom content
12763
+ - Blog post page enhancements
12764
+ - **Slot System**: Site plugins are placed in predefined slots within existing Wix business solution pages. Each slot is identified by an appDefinitionId, widgetId, and slotId. Site owners can add plugins to slots using the plugin explorer in Wix editors.
12765
+ - **Settings Panel**: Site plugins have a built-in settings panel in the Wix Editor for per-instance configuration using widget.getProp/setProp. Similar to Site Widgets, the panel handles configuration without needing a separate Dashboard Page. **Exception: Checkout page and side cart plugins may not support automatic addition upon installation \u2014 these MUST include a Dashboard Page for plugin placement management.**
12766
+ - **When to Choose**: When you need to extend existing Wix business solution pages (Stores, Bookings, eCommerce, Events, Blog) with custom UI in predefined slot positions. Unlike Site Widgets (which can be placed anywhere), Site Plugins are designed for specific integration points within Wix business apps.
12767
+
12768
+ **Common Placement Areas:**
12769
+ - Product pages (Wix Stores)
12770
+ - Checkout and side cart (Wix eCommerce)
12771
+ - Booking and service pages (Wix Bookings)
12772
+ - Event pages (Wix Events)
12773
+ - Blog post pages (Wix Blog)
12774
+
12775
+ **Key Differences from Site Widgets:**
12776
+ - Site Plugins go into predefined slots in business solution pages; Site Widgets can be placed anywhere on a site
12777
+ - Site Plugins integrate contextually with existing business app pages; Site Widgets are standalone components
12778
+ </site_plugin>`;
12779
+ };
12780
+ exports2.getSitePluginAgentDocumentation = getSitePluginAgentDocumentation;
12781
+ var getSitePluginDecisionGuide = () => {
12782
+ return `### Choose Site Plugins when:
12783
+
12784
+ - \u2705 Need to extend existing Wix business solution pages (Stores, Bookings, eCommerce, Events, Blog)
12785
+ - \u2705 Want to add contextual UI to predefined slots within business app pages
12786
+ - \u2705 Building product page enhancements, booking page extensions, or checkout integrations
12787
+ - \u2705 Need to integrate with the specific page context (e.g., current product, current booking)
12788
+ - \u2705 Want to leverage the slot-based plugin explorer for site owners
12789
+ - \u26A0\uFE0F If targeting checkout or side cart slots, ALSO include a DASHBOARD_PAGE for plugin placement management (auto-add may not work for these slots)`;
12790
+ };
12791
+ exports2.getSitePluginDecisionGuide = getSitePluginDecisionGuide;
12792
+ }
12793
+ });
12794
+
12795
+ // ../codegen-common-logic/dist/extensions/SiteExtensions.js
12796
+ var require_SiteExtensions = __commonJS({
12797
+ "../codegen-common-logic/dist/extensions/SiteExtensions.js"(exports2) {
12798
+ "use strict";
12799
+ Object.defineProperty(exports2, "__esModule", { value: true });
12800
+ exports2.getSiteExtensionsDocumentation = void 0;
12801
+ var EmbeddedScriptAgent_1 = require_EmbeddedScriptAgent();
12802
+ var EditorReactComponentAgent_1 = require_EditorReactComponentAgent();
12803
+ var CustomElementWidgetAgent_1 = require_CustomElementWidgetAgent();
12804
+ var SitePluginAgent_1 = require_SitePluginAgent();
12805
+ var getSiteExtensionsDocumentation = () => {
12806
+ return `### Site Extensions
12807
+
12808
+ Site extensions add functionality directly to user websites.
12809
+
12810
+ ${(0, EmbeddedScriptAgent_1.getEmbeddedScriptAgentDocumentation)()}
12811
+
12812
+ ${(0, EditorReactComponentAgent_1.getEditorReactComponentAgentDocumentation)()}
12813
+
12814
+ ${(0, CustomElementWidgetAgent_1.getCustomElementWidgetAgentDocumentation)()}
12815
+
12816
+ ${(0, SitePluginAgent_1.getSitePluginAgentDocumentation)()}`;
12817
+ };
12818
+ exports2.getSiteExtensionsDocumentation = getSiteExtensionsDocumentation;
12819
+ }
12820
+ });
12821
+
12822
+ // ../codegen-common-logic/dist/extensions/DashboardModals.js
12823
+ var require_DashboardModals = __commonJS({
12824
+ "../codegen-common-logic/dist/extensions/DashboardModals.js"(exports2) {
12825
+ "use strict";
12826
+ Object.defineProperty(exports2, "__esModule", { value: true });
12827
+ exports2.getDashboardModalsDecisionGuide = exports2.getDashboardModalsAgentDocumentation = void 0;
12828
+ var getDashboardModalsAgentDocumentation = () => {
12829
+ return `<dashboard_modals>
12830
+ #### Dashboard Modals
12831
+ - **Description**: Pop-up windows that appear in the center of dashboard pages
12832
+ - **Use Cases**:
12833
+ - Login/signup forms
12834
+ - Confirmation dialogs
12835
+ - Settings panels
12836
+ - Terms and conditions
12837
+ - Quick data entry forms
12838
+ - **When to Choose**: When you need temporary overlays for user interactions or confirmations
12839
+ </dashboard_modals>`;
12840
+ };
12841
+ exports2.getDashboardModalsAgentDocumentation = getDashboardModalsAgentDocumentation;
12842
+ var getDashboardModalsDecisionGuide = () => {
12843
+ return `### Choose Dashboard Modals when:
12844
+
12845
+ - \u2705 Need temporary user interactions
12846
+ - \u2705 Creating forms or confirmation dialogs
12847
+ - \u2705 Want reusable pop-up functionality
12848
+ - \u2705 Need centered, focused user attention`;
12849
+ };
12850
+ exports2.getDashboardModalsDecisionGuide = getDashboardModalsDecisionGuide;
12851
+ }
12852
+ });
12853
+
12854
+ // ../codegen-common-logic/dist/extensionsDecisionGuide.js
12855
+ var require_extensionsDecisionGuide = __commonJS({
12856
+ "../codegen-common-logic/dist/extensionsDecisionGuide.js"(exports2) {
12857
+ "use strict";
12858
+ Object.defineProperty(exports2, "__esModule", { value: true });
12859
+ exports2.getExtensionDecisionMatrix = void 0;
12860
+ var DashboardPageAgent_1 = require_DashboardPageAgent();
12861
+ var DashboardPlugins_1 = require_DashboardPlugins();
12862
+ var DashboardMenuPlugins_1 = require_DashboardMenuPlugins();
12863
+ var EmbeddedScriptAgent_1 = require_EmbeddedScriptAgent();
12864
+ var EditorReactComponentAgent_1 = require_EditorReactComponentAgent();
12865
+ var CustomElementWidgetAgent_1 = require_CustomElementWidgetAgent();
12866
+ var BackendApiAgent_1 = require_BackendApiAgent();
12867
+ var BackendEventAgent_1 = require_BackendEventAgent();
12868
+ var SPIAgent_1 = require_SPIAgent();
12869
+ var SitePluginAgent_1 = require_SitePluginAgent();
12870
+ var DataCollectionAgent_1 = require_DataCollectionAgent();
12871
+ var getExtensionDecisionMatrix = () => {
12872
+ return `## Decision Matrix
12873
+ ${(0, DashboardPageAgent_1.getDashboardPageDecisionGuide)()}
12874
+
12875
+ ${(0, DashboardPlugins_1.getDashboardPluginsDecisionGuide)()}
12876
+
12877
+ ${(0, DashboardMenuPlugins_1.getDashboardMenuPluginsDecisionGuide)()}
12878
+
12879
+ ${(0, EmbeddedScriptAgent_1.getEmbeddedScriptDecisionGuide)()}
12880
+
12881
+ ${(0, CustomElementWidgetAgent_1.getCustomElementWidgetDecisionGuide)()}
12882
+
12883
+ ${(0, EditorReactComponentAgent_1.getEditorReactComponentDecisionGuide)()}
12884
+
12885
+ ${(0, SitePluginAgent_1.getSitePluginDecisionGuide)()}
12886
+
12887
+ ${(0, BackendApiAgent_1.getBackendApiDecisionGuide)()}
12888
+
12889
+ ${(0, BackendEventAgent_1.getBackendEventDecisionGuide)()}
12890
+
12891
+ ${(0, SPIAgent_1.getSPIDecisionGuide)()}
12892
+
12893
+ ${(0, DataCollectionAgent_1.getDataCollectionDecisionGuide)()}`;
12894
+ };
12895
+ exports2.getExtensionDecisionMatrix = getExtensionDecisionMatrix;
12896
+ }
12897
+ });
12898
+
12899
+ // ../codegen-common-logic/dist/commonUseCasesGuide.js
12900
+ var require_commonUseCasesGuide = __commonJS({
12901
+ "../codegen-common-logic/dist/commonUseCasesGuide.js"(exports2) {
12902
+ "use strict";
12903
+ Object.defineProperty(exports2, "__esModule", { value: true });
12904
+ exports2.getCommonUseCasesGuide = void 0;
12905
+ var getCommonUseCasesGuide = () => {
12906
+ const baseRows = `| Analytics tracking | Embedded Scripts | Site-wide injection | Perfect for third-party code injection |
12907
+ | Site-wide popups | Embedded Scripts | Site-wide injection | Configurable overlays with dashboard control |
12908
+ | Countdown timers | Embedded Scripts | Site-wide injection | Event countdowns with dashboard management |
12909
+ | Cookie consent banners | Embedded Scripts | Site-wide injection | GDPR compliance with customization |
12910
+ | Live chat widgets | Embedded Scripts | Site-wide injection | Third-party chat integration |
12911
+ | Custom admin dashboard | Dashboard Pages | Dedicated page route | Full control over admin interface |
12912
+ | Site calculators/tools | Custom Element Widgets | Page elements | Reusable, configurable components |
12913
+ | Site components with React | Editor React Components | Page elements | Reusable, configurable React components |
12914
+ | Automated workflows | Backend Event | Server-side event triggers | React to platform events for automation |
12915
+ | Action when event occurs | Backend Event | Platform event handlers | Server-side reaction to platform events |
12916
+ | Sync data on external events | Backend Event | Platform event handlers | React to events for data synchronization |
12917
+ | Notify when data changes | Backend Event | Platform event handlers | Send alerts when platform events fire |
12918
+ | Order notification emails | Backend Event | ecom.orders.onOrderCreated handler | Send notifications when orders are placed |
12919
+ | Custom shipping rates | Service Plugins (SPIs) | Checkout flow integration | Modify existing business flows |
12920
+ | Tax calculations | Service Plugins (SPIs) | Checkout flow integration | Custom tax logic integration |
12921
+ | Custom pricing logic | Service Plugins (SPIs) | Platform-level integration | Platform-level business customization |
12922
+ | Product analytics in Stores | Dashboard Plugins | Wix Stores Products page slot | Contextual widget within existing Stores dashboard |
12923
+ | Booking insights | Dashboard Plugins | Wix Bookings Booking List page slot | Contextual widget within existing Bookings dashboard |
12924
+ | Product reviews on product page | Site Plugins | Predefined slots in product pages | Reviews are contextually tied to each product \u2192 Site Plugin, not Custom Element Widgets |
12925
+ | Product page enhancements | Site Plugins | Predefined slots in business pages | Contextual integration with Stores, Bookings, etc. |
12926
+ | Booking page extensions | Site Plugins | Predefined slots in business pages | Extend existing Wix business solution pages |
12927
+ | Checkout upsells | Site Plugins + Dashboard Page | Predefined slots in eCommerce pages | Checkout/side cart plugins need Dashboard Page for plugin placement management |
12928
+ | App-specific data storage | Data Collections | CMS data layer | Structured data for app extensions to read/write |
12929
+ | Per-product fees/rules | Dashboard Page + Service Plugin + Data Collection | Admin + checkout + data | Dashboard manages rules, Data Collection stores them, Service Plugin reads at checkout |`;
12930
+ const comparisonGuide = `
12931
+ ## Extension Comparison Guide
12932
+
12933
+ | **Custom Element Widget vs Site Plugin** | **Service Plugin vs Backend Event** |
12934
+ | ------------------------------ | ----------------------------------- |
12935
+ | Widget: user places anywhere on site | Service Plugin: runs DURING a business flow (checkout, shipping, tax) |
12936
+ | Plugin: fixed slot in a Wix business solution page (Stores, Bookings, etc.) | Backend Event: runs AFTER a platform event occurs (order created, contact added) |
12937
+
12938
+ | **Dashboard Page vs Embedded Script** | **Custom Element Widget vs Embedded Script** |
12939
+ | ------------------------------------- | ---------------------------------- |
12940
+ | Dashboard Page: admin-only interface for managing settings/data | Custom Element Widget: standalone component placed on page by site owner |
12941
+ | Embedded Script: code injected into every site page for visitors | Embedded Script: code injected site-wide (analytics, popups, effects) |`;
12942
+ return `## Quick Reference for Common Use Cases
12943
+
12944
+ | **Need** | **Recommended Extension** | **Specific Slot/Location** | **Reason** |
12945
+ | ----------------------------- | ---------------------------- | -------------------------------------- | -------------------------------------- |
12946
+ ${baseRows}
12947
+ ${comparisonGuide}`;
12948
+ };
12949
+ exports2.getCommonUseCasesGuide = getCommonUseCasesGuide;
12950
+ }
12951
+ });
12952
+
12953
+ // ../codegen-common-logic/dist/availableSdks.js
12954
+ var require_availableSdks = __commonJS({
12955
+ "../codegen-common-logic/dist/availableSdks.js"(exports2) {
12956
+ "use strict";
12957
+ Object.defineProperty(exports2, "__esModule", { value: true });
12958
+ exports2.getAvailableSdksReference = void 0;
12959
+ var getAvailableSdksReference = () => `<available_sdks>
12960
+ ## Available Wix SDKs
12961
+
12962
+ > **Rules \u2014 must follow when an SDK from this list covers the domain:**
12963
+ > 1. **Do not create a \`DATA_COLLECTION\`** for entities the SDK manages. SDK coverage includes both *records* (e.g., point balances, bookings, subscribers) **and** *configuration the SDK exposes* (e.g., earning rules, services, plans, rewards, coupon rules). Treat the SDK as the source of truth for both.
12964
+ > 2. **Name the SDK explicitly** in the \`summary\` and in each relevant extension \`description\` (e.g., "...via the Wix Loyalty Program SDK..."). Do **not** hedge with phrases like "if using the SDK", "optionally", or "unless using Wix's built-in X" \u2014 commit to the SDK.
12965
+ > 3. If a domain is **not** in this list, a \`DATA_COLLECTION\` is appropriate.
12966
+
12967
+ ### Commerce & catalog
12968
+
12969
+ - **Stores** \u2014 Product catalog management. Includes products (physical/digital), inventory, variants, categories, and product collections.
12970
+ - **eCommerce** \u2014 End-to-end purchase flow. Includes cart, checkout, orders, refunds, and abandoned carts. Use for any sellable line item (products, services, custom items).
12971
+ - **Bookings** \u2014 Appointment scheduling. Includes services (classes, courses, appointments), staff, schedules, sessions, and customer bookings.
12972
+ - **Restaurants** \u2014 Restaurant ordering. Includes menus, items, modifiers, and online ordering for dine-in/takeout/delivery.
12973
+ - **Pricing Plans** \u2014 Recurring billing and access control. Includes subscription plans, one-time access plans, and member benefits. Use for paywalls, memberships, and course access.
12974
+ - **Donations** \u2014 Fundraising flows. Includes one-time and recurring donations, donor records, and campaigns. Use for nonprofits.
12975
+ - **Gift Cards** \u2014 Stored-value cards. Issue, redeem, and track gift card balances and transactions.
12976
+ - **Coupons** \u2014 Discount codes. Includes percent/fixed/free-shipping rules, expiration, and usage limits.
12977
+
12978
+ ### Content
12979
+
12980
+ - **Blog** \u2014 Content publishing. Includes posts, categories, tags, authors, and comments.
12981
+ - **Forum** \u2014 Community discussion. Includes categories, threads, replies, votes, and member activity.
12982
+ - **Events** \u2014 Event management for any time-based gathering (events, meetups, sessions, gatherings, conferences, workshops). Includes events, RSVPs, ticketing, guest lists, and check-in.
12983
+ - **Portfolio** \u2014 Project showcases for creatives and agencies. Includes projects, media galleries, and project collections.
12984
+
12985
+ ### People & engagement
12986
+
12987
+ - **Members & Contacts** \u2014 Identity and CRM. Includes site member accounts, login state, contact records, profile fields, and labels.
12988
+ - **Forms** \u2014 Site forms. Includes form definitions and captured submissions (e.g., contact forms, lead capture, surveys).
12989
+ - **Loyalty Program** \u2014 Customer rewards. Includes points, earning rules, tiers, rewards, and customer point balances.
12990
+ - **Communication** \u2014 Outbound messaging to contacts/members. Includes triggered emails, automations, and notifications (e.g., newsletters).
12991
+ </available_sdks>`;
12992
+ exports2.getAvailableSdksReference = getAvailableSdksReference;
12993
+ }
12994
+ });
12995
+
12996
+ // ../../node_modules/dedent/dist/dedent.js
12997
+ var require_dedent = __commonJS({
12998
+ "../../node_modules/dedent/dist/dedent.js"(exports2, module2) {
12999
+ "use strict";
13000
+ Object.defineProperty(exports2, "__esModule", {
13001
+ value: true
13002
+ });
13003
+ exports2.default = void 0;
13004
+ var dedent = createDedent({});
13005
+ var _default = exports2.default = dedent;
13006
+ function createDedent(options) {
13007
+ dedent2.withOptions = (newOptions) => createDedent({
13008
+ ...options,
13009
+ ...newOptions
13010
+ });
13011
+ return dedent2;
13012
+ function dedent2(strings, ...values) {
13013
+ const raw = typeof strings === "string" ? [strings] : strings.raw;
13014
+ const {
13015
+ alignValues = false,
13016
+ escapeSpecialCharacters = Array.isArray(strings),
13017
+ trimWhitespace = true
13018
+ } = options;
13019
+ let result = "";
13020
+ for (let i = 0; i < raw.length; i++) {
13021
+ let next = raw[i];
13022
+ if (escapeSpecialCharacters) {
13023
+ next = next.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{");
13024
+ }
13025
+ result += next;
13026
+ if (i < values.length) {
13027
+ const value = alignValues ? alignValue(values[i], result) : values[i];
13028
+ result += value;
13029
+ }
13030
+ }
13031
+ const lines = result.split("\n");
13032
+ let mindent = null;
13033
+ for (const l of lines) {
13034
+ const m = l.match(/^(\s+)\S+/);
13035
+ if (m) {
13036
+ const indent = m[1].length;
13037
+ if (!mindent) {
13038
+ mindent = indent;
13039
+ } else {
13040
+ mindent = Math.min(mindent, indent);
13041
+ }
13042
+ }
13043
+ }
13044
+ if (mindent !== null) {
13045
+ const m = mindent;
13046
+ result = lines.map((l) => l[0] === " " || l[0] === " " ? l.slice(m) : l).join("\n");
13047
+ }
13048
+ if (trimWhitespace) {
13049
+ result = result.trim();
13050
+ }
13051
+ if (escapeSpecialCharacters) {
13052
+ result = result.replace(/\\n/g, "\n");
13053
+ }
13054
+ if (typeof Bun !== "undefined") {
13055
+ result = result.replace(
13056
+ // Matches e.g. \\u{1f60a} or \\u5F1F
13057
+ /\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g,
13058
+ (_, braced, unbraced) => {
13059
+ var _ref;
13060
+ const hex = (_ref = braced !== null && braced !== void 0 ? braced : unbraced) !== null && _ref !== void 0 ? _ref : "";
13061
+ return String.fromCodePoint(parseInt(hex, 16));
13062
+ }
13063
+ );
13064
+ }
13065
+ return result;
13066
+ }
13067
+ }
13068
+ function alignValue(value, precedingText) {
13069
+ if (typeof value !== "string" || !value.includes("\n")) {
13070
+ return value;
13071
+ }
13072
+ const currentLine = precedingText.slice(precedingText.lastIndexOf("\n") + 1);
13073
+ const indentMatch = currentLine.match(/^(\s+)/);
13074
+ if (indentMatch) {
13075
+ const indent = indentMatch[1];
13076
+ return value.replace(/\n/g, `
13077
+ ${indent}`);
13078
+ }
13079
+ return value;
13080
+ }
13081
+ module2.exports = exports2.default;
13082
+ module2.exports.default = exports2.default;
13083
+ }
13084
+ });
13085
+
13086
+ // ../codegen-common-logic/dist/system-prompts/context-explanation-instructions.js
13087
+ var require_context_explanation_instructions = __commonJS({
13088
+ "../codegen-common-logic/dist/system-prompts/context-explanation-instructions.js"(exports2) {
13089
+ "use strict";
13090
+ Object.defineProperty(exports2, "__esModule", { value: true });
13091
+ exports2.contextExplanationInstructions = void 0;
13092
+ var contextExplanationInstructionsContent = () => `The user prompt may include several context sections to help you understand what already exists and what changes are planned.
13093
+
13094
+ **IMPORTANT**: These context sections are informational - use them ONLY if they are relevant to your specific task. You are NOT required to use collections, API specs, or embedded script parameters unless they directly support the user's request.`;
13095
+ var buildCollectionsContext = () => `You may receive TWO types of collection information:
13096
+
13097
+ 1. **EXISTING COLLECTIONS FROM PROJECT** (if present):
13098
+ - These are CMS collections that ALREADY EXIST in the project
13099
+ - They represent the CURRENT STATE of the data model
13100
+ - Use these as reference ONLY IF you need to work with existing data
13101
+ - DO NOT modify or recreate these collections unless explicitly requested
13102
+ - Use the exact id for the id of the collection in the code
13103
+
13104
+ 2. **COLLECTIONS** from the plan (if present):
13105
+ - These are NEW collections to create OR existing collections to MODIFY
13106
+ - Each has an "operation" field: "insert" (new), "update" (modify), or "delete" (remove)
13107
+ - Follow the operation specified for each collection
13108
+ - For "update" operations, only modify what's specified in the plan
13109
+ - Use the exact id for the id of the collection in the code`;
13110
+ var buildEmbeddedScriptParametersContext = () => `You may receive TWO types of embedded script parameter information:
13111
+
13112
+ 1. **EXISTING EMBEDDED SCRIPT PARAMETERS FROM PROJECT** (if present):
13113
+ - These are dynamic parameters that ALREADY EXIST in the project
13114
+ - They represent the CURRENT STATE of configurable parameters
13115
+ - Use these as reference ONLY IF you need to work with dynamic parameters
13116
+ - DO NOT modify or recreate these parameters unless explicitly requested
13117
+
13118
+ 2. **EMBEDDED SCRIPT PARAMETERS** from the plan (if present):
13119
+ - These are NEW parameters to create OR existing parameters to DELETE
13120
+ - Each has an "operation" field: "insert" (add/replace all parameters) or "delete" (remove specific parameters by keys)
13121
+ - Follow the operation specified for each parameter
13122
+ - Note: There is NO "update" operation - to modify a parameter, you'll see a delete followed by an insert
13123
+ - DELETE operations can remove multiple parameters at once by providing an array of keys`;
13124
+ var buildApiSpecContext = () => `If present, the **API SPEC** section describes backend API endpoints.
13125
+ - Use these ONLY IF your implementation needs to call backend APIs
13126
+ - If your task doesn't involve API calls: Ignore this section`;
13127
+ var buildCriticalPrinciples = () => `1. **Use only what's needed**: Don't force collections, APIs, or parameters into your implementation if they're not relevant to the user's request
13128
+ 2. **Respect existing resources**: The presence of EXISTING resources does NOT mean you should modify them. Only modify when:
13129
+ - The plan explicitly includes an "update" operation for that resource
13130
+ - The user request explicitly asks for modifications to that resource
13131
+ - The existing resource is insufficient for the new functionality being added
13132
+ 3. **Keep it simple**: When in doubt, use existing resources as-is rather than modifying them, or don't use them at all if they're not needed
13133
+
13134
+ Your goal is to implement EXACTLY what the user requested - no more, no less.`;
13135
+ exports2.contextExplanationInstructions = {
13136
+ content: contextExplanationInstructionsContent(),
13137
+ collectionsContext: buildCollectionsContext(),
13138
+ embeddedScriptParametersContext: buildEmbeddedScriptParametersContext(),
13139
+ apiSpecContext: buildApiSpecContext(),
13140
+ criticalPrinciples: buildCriticalPrinciples()
13141
+ };
13142
+ }
13143
+ });
13144
+
13145
+ // ../codegen-common-logic/dist/system-prompts/context-explanation-prompt.js
13146
+ var require_context_explanation_prompt = __commonJS({
13147
+ "../codegen-common-logic/dist/system-prompts/context-explanation-prompt.js"(exports2) {
13148
+ "use strict";
13149
+ Object.defineProperty(exports2, "__esModule", { value: true });
13150
+ exports2.contextExplanationSystemPrompt = void 0;
13151
+ var SystemPromptBuilder_1 = require_SystemPromptBuilder();
13152
+ var context_explanation_instructions_1 = require_context_explanation_instructions();
13153
+ var contextExplanationSystemPrompt = ({ apiDocumentation, useData, useIteration, useEmbeddedScript }) => {
13154
+ const contextExplanationSystemPrompt2 = (0, SystemPromptBuilder_1.systemPromptBuilder)({
13155
+ apiDocumentation,
13156
+ useData,
13157
+ useIteration,
13158
+ useEmbeddedScript
13159
+ });
13160
+ contextExplanationSystemPrompt2.withSection("instructions", context_explanation_instructions_1.contextExplanationInstructions.content);
13161
+ if (useData) {
13162
+ contextExplanationSystemPrompt2.withSection("collections_context", context_explanation_instructions_1.contextExplanationInstructions.collectionsContext);
13163
+ }
13164
+ if (useEmbeddedScript) {
13165
+ contextExplanationSystemPrompt2.withSection("embedded_script_parameters_context", context_explanation_instructions_1.contextExplanationInstructions.embeddedScriptParametersContext);
13166
+ }
13167
+ contextExplanationSystemPrompt2.withSection("api_spec_context", context_explanation_instructions_1.contextExplanationInstructions.apiSpecContext);
13168
+ contextExplanationSystemPrompt2.withSection("critical_principles", context_explanation_instructions_1.contextExplanationInstructions.criticalPrinciples);
13169
+ return contextExplanationSystemPrompt2.compose();
13170
+ };
13171
+ exports2.contextExplanationSystemPrompt = contextExplanationSystemPrompt;
13172
+ }
13173
+ });
13174
+
13175
+ // ../codegen-common-logic/dist/system-prompts/SystemPromptBuilder.js
13176
+ var require_SystemPromptBuilder = __commonJS({
13177
+ "../codegen-common-logic/dist/system-prompts/SystemPromptBuilder.js"(exports2) {
13178
+ "use strict";
13179
+ var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
13180
+ return mod && mod.__esModule ? mod : { "default": mod };
13181
+ };
13182
+ Object.defineProperty(exports2, "__esModule", { value: true });
13183
+ exports2.systemPromptBuilder = exports2.SystemPromptBuilder = exports2.GeneralAgentType = exports2.CommonSections = void 0;
13184
+ var dedent_1 = __importDefault2(require_dedent());
13185
+ var context_explanation_prompt_1 = require_context_explanation_prompt();
13186
+ var CommonSections;
13187
+ (function(CommonSections2) {
13188
+ CommonSections2["ROLE"] = "role";
13189
+ CommonSections2["OUTPUT_CONSTRAINTS"] = "output_constraints";
13190
+ CommonSections2["CONTEXT_EXPLANATION"] = "context_explanation";
13191
+ CommonSections2["CORE_PRINCIPLES"] = "core_principles";
13192
+ CommonSections2["CORE_KNOWLEDGE"] = "core_knowledge";
13193
+ CommonSections2["IMPLEMENTATION_PATTERNS"] = "implementation_patterns";
13194
+ CommonSections2["IMPLEMENTATION_GUIDELINES"] = "implementation_guidelines";
13195
+ CommonSections2["AUTHENTICATION_ELEVATION_REQUIREMENT"] = "authentication_elevation_requirement";
13196
+ CommonSections2["API_DOCS"] = "api_docs";
13197
+ CommonSections2["EXAMPLES"] = "examples";
13198
+ })(CommonSections || (exports2.CommonSections = CommonSections = {}));
13199
+ var SECTION_ORDER = {
13200
+ [CommonSections.ROLE]: 1,
13201
+ [CommonSections.CONTEXT_EXPLANATION]: 2,
13202
+ [CommonSections.CORE_PRINCIPLES]: 3,
13203
+ [CommonSections.OUTPUT_CONSTRAINTS]: 4,
13204
+ [CommonSections.CORE_KNOWLEDGE]: 5,
13205
+ [CommonSections.IMPLEMENTATION_PATTERNS]: 6,
13206
+ [CommonSections.IMPLEMENTATION_GUIDELINES]: 7,
13207
+ [CommonSections.AUTHENTICATION_ELEVATION_REQUIREMENT]: 8,
13208
+ [CommonSections.API_DOCS]: 9,
13209
+ [CommonSections.EXAMPLES]: 10
13210
+ };
13211
+ var GeneralAgentType;
13212
+ (function(GeneralAgentType2) {
13213
+ GeneralAgentType2["CMS_PLANNER"] = "CMS_PLANNER";
13214
+ GeneralAgentType2["PLANNER"] = "PLANNER";
13215
+ GeneralAgentType2["ITERATION_AGENT"] = "ITERATION_AGENT";
13216
+ GeneralAgentType2["AUTO_PATTERN_DECISION"] = "AUTO_PATTERN_DECISION";
13217
+ GeneralAgentType2["AUTO_PATTERN_CONTEXT"] = "AUTO_PATTERN_CONTEXT";
13218
+ GeneralAgentType2["SDK_PICKER"] = "SDK_PICKER";
13219
+ GeneralAgentType2["EXTENSION_INDEXER"] = "EXTENSION_INDEXER";
13220
+ GeneralAgentType2["UPDATE_EXTENSION_AGENT"] = "UPDATE_EXTENSION_AGENT";
13221
+ })(GeneralAgentType || (exports2.GeneralAgentType = GeneralAgentType = {}));
13222
+ var toPromptTag = (fromPromptType) => {
13223
+ return `${fromPromptType}_PROMPT`;
13224
+ };
13225
+ var SystemPromptBuilder = class {
13226
+ constructor({ agentType, apiDocumentation = "", useData = true, useIteration = false, useEmbeddedScript = false }) {
13227
+ this.sections = {};
13228
+ this.agentType = agentType;
13229
+ this.apiDocumentation = apiDocumentation;
13230
+ this.useData = useData;
13231
+ this.useIteration = useIteration;
13232
+ this.useEmbeddedScript = useEmbeddedScript;
13233
+ }
13234
+ withSection(tag, content) {
13235
+ this.sections[tag] = content;
13236
+ return this;
13237
+ }
13238
+ withRole(content) {
13239
+ this.withSection(CommonSections.ROLE, content);
13240
+ return this;
13241
+ }
13242
+ withImplementationPatterns(content) {
13243
+ this.withSection(CommonSections.IMPLEMENTATION_PATTERNS, content);
13244
+ return this;
13245
+ }
13246
+ withImplementationGuidelines(content) {
13247
+ this.withSection(CommonSections.IMPLEMENTATION_GUIDELINES, content);
13248
+ return this;
13249
+ }
13250
+ withCoreKnowledge(content) {
13251
+ this.withSection(CommonSections.CORE_KNOWLEDGE, content);
13252
+ return this;
13253
+ }
13254
+ withExamples(content) {
13255
+ this.withSection(CommonSections.EXAMPLES, content);
13256
+ return this;
13257
+ }
13258
+ withContextExplanation() {
13259
+ const content = (0, context_explanation_prompt_1.contextExplanationSystemPrompt)({
13260
+ agentType: void 0,
13261
+ apiDocumentation: this.apiDocumentation,
13262
+ useData: this.useData,
13263
+ useIteration: this.useIteration,
13264
+ useEmbeddedScript: this.useEmbeddedScript
13265
+ });
13266
+ this.withSection(CommonSections.CONTEXT_EXPLANATION, content);
13267
+ return this;
13268
+ }
13269
+ compose() {
13270
+ const sections = this.formatSections();
13271
+ if (!this.agentType) {
13272
+ return sections;
13273
+ }
13274
+ const promptTag = toPromptTag(this.agentType);
13275
+ return (0, dedent_1.default)`<${promptTag}>\n${sections}\n</${promptTag}>`;
13276
+ }
13277
+ formatSections() {
13278
+ const formatted = [];
13279
+ const orderedSections = Object.entries(SECTION_ORDER).sort((a, b) => a[1] - b[1]).map(([key]) => key);
13280
+ for (const section of orderedSections) {
13281
+ const content = this.sections[section];
13282
+ if (content) {
13283
+ formatted.push(`
13284
+ <${section}>
13285
+ ${content}
13286
+ </${section}>`);
13287
+ }
13288
+ }
13289
+ const remainingSections = Object.keys(this.sections).filter((section) => !(section in SECTION_ORDER) && this.sections[section]).sort();
13290
+ for (const section of remainingSections) {
13291
+ formatted.push(`
13292
+ <${section}>
13293
+ ${this.sections[section]}
13294
+ </${section}>`);
13295
+ }
13296
+ return formatted.join("\n");
13297
+ }
13298
+ };
13299
+ exports2.SystemPromptBuilder = SystemPromptBuilder;
13300
+ var systemPromptBuilder = (params) => {
13301
+ return new SystemPromptBuilder(params);
13302
+ };
13303
+ exports2.systemPromptBuilder = systemPromptBuilder;
13304
+ }
13305
+ });
13306
+
13307
+ // ../codegen-common-logic/dist/system-prompts/index.js
13308
+ var require_system_prompts = __commonJS({
13309
+ "../codegen-common-logic/dist/system-prompts/index.js"(exports2) {
13310
+ "use strict";
13311
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
13312
+ if (k2 === void 0) k2 = k;
13313
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13314
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13315
+ desc = { enumerable: true, get: function() {
13316
+ return m[k];
13317
+ } };
13318
+ }
13319
+ Object.defineProperty(o, k2, desc);
13320
+ }) : (function(o, m, k, k2) {
13321
+ if (k2 === void 0) k2 = k;
13322
+ o[k2] = m[k];
13323
+ }));
13324
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) {
13325
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
13326
+ };
13327
+ Object.defineProperty(exports2, "__esModule", { value: true });
13328
+ __exportStar2(require_SystemPromptBuilder(), exports2);
13329
+ __exportStar2(require_context_explanation_prompt(), exports2);
13330
+ __exportStar2(require_context_explanation_instructions(), exports2);
13331
+ }
13332
+ });
13333
+
13334
+ // ../codegen-common-logic/dist/site-data-layer-rules.js
12180
13335
  var require_site_data_layer_rules = __commonJS({
12181
- "../codegen-studio-2-config/dist/site-data-layer-rules.js"(exports2) {
13336
+ "../codegen-common-logic/dist/site-data-layer-rules.js"(exports2) {
12182
13337
  "use strict";
12183
13338
  Object.defineProperty(exports2, "__esModule", { value: true });
12184
13339
  exports2.SITE_DATA_LAYER_RULES = void 0;
@@ -12197,17 +13352,80 @@ For any persistent-data need (CMS collections, tables, schemas, data models):
12197
13352
  }
12198
13353
  });
12199
13354
 
12200
- // ../codegen-studio-2-config/dist/index.js
13355
+ // ../codegen-common-logic/dist/index.js
12201
13356
  var require_dist7 = __commonJS({
13357
+ "../codegen-common-logic/dist/index.js"(exports2) {
13358
+ "use strict";
13359
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
13360
+ if (k2 === void 0) k2 = k;
13361
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13362
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13363
+ desc = { enumerable: true, get: function() {
13364
+ return m[k];
13365
+ } };
13366
+ }
13367
+ Object.defineProperty(o, k2, desc);
13368
+ }) : (function(o, m, k, k2) {
13369
+ if (k2 === void 0) k2 = k;
13370
+ o[k2] = m[k];
13371
+ }));
13372
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) {
13373
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
13374
+ };
13375
+ Object.defineProperty(exports2, "__esModule", { value: true });
13376
+ __exportStar2(require_BackendApiAgent(), exports2);
13377
+ __exportStar2(require_BackendEventAgent(), exports2);
13378
+ __exportStar2(require_BackendExtensions(), exports2);
13379
+ __exportStar2(require_CustomElementWidgetAgent(), exports2);
13380
+ __exportStar2(require_DashboardPageAgent(), exports2);
13381
+ __exportStar2(require_DashboardExtensions(), exports2);
13382
+ __exportStar2(require_EmbeddedScriptAgent(), exports2);
13383
+ __exportStar2(require_EditorReactComponentAgent(), exports2);
13384
+ __exportStar2(require_SiteExtensions(), exports2);
13385
+ __exportStar2(require_SPIAgent(), exports2);
13386
+ __exportStar2(require_DashboardPlugins(), exports2);
13387
+ __exportStar2(require_DashboardMenuPlugins(), exports2);
13388
+ __exportStar2(require_DashboardModals(), exports2);
13389
+ __exportStar2(require_SitePluginAgent(), exports2);
13390
+ __exportStar2(require_DataCollectionAgent(), exports2);
13391
+ __exportStar2(require_extensionsDecisionGuide(), exports2);
13392
+ __exportStar2(require_commonUseCasesGuide(), exports2);
13393
+ __exportStar2(require_availableSdks(), exports2);
13394
+ __exportStar2(require_system_prompts(), exports2);
13395
+ __exportStar2(require_site_data_layer_rules(), exports2);
13396
+ }
13397
+ });
13398
+
13399
+ // ../codegen-studio-2-config/dist/index.js
13400
+ var require_dist8 = __commonJS({
12202
13401
  "../codegen-studio-2-config/dist/index.js"(exports2) {
12203
13402
  "use strict";
12204
13403
  Object.defineProperty(exports2, "__esModule", { value: true });
12205
13404
  exports2.studio2CodegenConfig = void 0;
12206
13405
  var codegen_checkpoint_plugin_1 = require_dist6();
12207
- var site_data_layer_rules_1 = require_site_data_layer_rules();
13406
+ var codegen_common_logic_1 = require_dist7();
12208
13407
  exports2.studio2CodegenConfig = {
12209
13408
  codegenRules: [
12210
- { filename: "site-data-layer-rules.md", content: site_data_layer_rules_1.SITE_DATA_LAYER_RULES }
13409
+ { filename: "site-data-layer-rules.md", content: codegen_common_logic_1.SITE_DATA_LAYER_RULES }
13410
+ ],
13411
+ askRules: [],
13412
+ decisionCheckers: [],
13413
+ plugins: [codegen_checkpoint_plugin_1.checkpointPluginFactory]
13414
+ };
13415
+ }
13416
+ });
13417
+
13418
+ // ../codegen-harmony-config/dist/index.js
13419
+ var require_dist9 = __commonJS({
13420
+ "../codegen-harmony-config/dist/index.js"(exports2) {
13421
+ "use strict";
13422
+ Object.defineProperty(exports2, "__esModule", { value: true });
13423
+ exports2.harmonyCodegenConfig = void 0;
13424
+ var codegen_checkpoint_plugin_1 = require_dist6();
13425
+ var codegen_common_logic_1 = require_dist7();
13426
+ exports2.harmonyCodegenConfig = {
13427
+ codegenRules: [
13428
+ { filename: "site-data-layer-rules.md", content: codegen_common_logic_1.SITE_DATA_LAYER_RULES }
12211
13429
  ],
12212
13430
  askRules: [],
12213
13431
  decisionCheckers: [],
@@ -12295,8 +13513,8 @@ Example: \`required-permissions({ permissions: ["SCOPE.DC-DATA.READ", "SCOPE.DC-
12295
13513
 
12296
13514
  USER ACTIONS:
12297
13515
  After the final \`validate\` pass and before you Stop, call the \`user-actions\` tool ONCE ONLY if the app needs the user to perform manual setup for it to ACTUALLY WORK. This includes setup OUTSIDE Wix (third-party API keys, connecting an external account, registering a webhook elsewhere) AND setup INSIDE Wix that you could not do in code (e.g. creating a Wix Triggered Email template, configuring a Wix Automation, adding a value in Secrets Manager). If there is no such setup, do NOT call the tool at all.
12298
- Pass the steps in the \`output\` arg as a single markdown string \u2014 it is rendered directly to the user, so keep it concise and user-facing (a short intro line followed by a bulleted or numbered list). Example:
12299
- "After installing the app, complete these steps:\\n\\n1. **Add your Stripe secret key** \u2014 open the app's settings and paste your Stripe secret key.\\n2. **Create the stock-alert email template** \u2014 in your Wix dashboard, create a Triggered Email template so subscribers receive the alert email."
13516
+ Pass the steps in the \`output\` arg as a single markdown string \u2014 it is rendered directly to the user, so keep it concise and user-facing (a short intro line followed by a bulleted or numbered list). FORMAT IT TIGHTLY: use a SINGLE newline (\`\\n\`) everywhere \u2014 between the intro line and the first item AND between items. Do NOT use blank lines (\`\\n\\n\`) anywhere. Blank lines make the client render each item on its own line with extra spacing. Example:
13517
+ "After installing the app, complete these steps:\\n1. **Add your Stripe secret key** \u2014 open the app's settings and paste your Stripe secret key.\\n2. **Create the stock-alert email template** \u2014 in your Wix dashboard, create a Triggered Email template so subscribers receive the alert email."
12300
13518
 
12301
13519
  AUDIENCE \u2014 be explicit about WHO performs each step. Two audiences exist: (1) the APP DEVELOPER (working in Dev Center / the app's own settings), and (2) the SITE OWNER who INSTALLS the app on their site (the merchant with the real Stripe account, their own Wix dashboard, etc.). Most third-party credentials and dashboard setup (their API key, creating a Triggered Email template in their dashboard, configuring an automation) are done by the INSTALLING site owner \u2014 not the developer. When a step is for the installing user, phrase it that way: start it with "After installing the app, \u2026" or "The site owner must \u2026", so it's clear it happens post-install on the installer's site. Use developer-facing phrasing only for steps the developer genuinely performs.
12302
13520
 
@@ -12314,7 +13532,7 @@ Do NOT include the steps Wix already handles through its own flows:
12314
13532
  - Publishing the site.
12315
13533
  Also do NOT include things you already did in code (created files, registered extensions) or things the app does automatically on install. In particular, a site plugin configured with \`installation: { autoAdd: true }\` is placed on its slot automatically \u2014 NEVER tell the user to add it in the Editor. Only declare manual placement for slots that don't support auto-add (e.g. the checkout page).
12316
13534
 
12317
- Example: \`user-actions({ output: "To finish setting up your app:\\n\\n1. **Add your Stripe secret key** \u2014 open the app settings and paste it." })\``;
13535
+ Example: \`user-actions({ output: "To finish setting up your app:\\n1. **Add your Stripe secret key** \u2014 open the app settings and paste it." })\``;
12318
13536
  }
12319
13537
  });
12320
13538
 
@@ -12457,7 +13675,8 @@ var require_environments = __commonJS({
12457
13675
  exports2.getCodegenEnvironmentConfig = getCodegenEnvironmentConfig;
12458
13676
  var types_1 = require_types_impl();
12459
13677
  var codegen_app_builder_config_1 = require_dist5();
12460
- var codegen_studio_2_config_1 = require_dist7();
13678
+ var codegen_studio_2_config_1 = require_dist8();
13679
+ var codegen_harmony_config_1 = require_dist9();
12461
13680
  var codegen_rules_1 = require_codegen_rules();
12462
13681
  var ask_rules_1 = require_ask_rules();
12463
13682
  var job_decision_manager_1 = require_job_decision_manager();
@@ -12479,6 +13698,8 @@ var require_environments = __commonJS({
12479
13698
  switch (process.env.CODEGEN_ENVIRONMENT) {
12480
13699
  case types_1.Environment.STUDIO_2:
12481
13700
  return withSharedRules(codegen_studio_2_config_1.studio2CodegenConfig);
13701
+ case types_1.Environment.HARMONY:
13702
+ return withSharedRules(codegen_harmony_config_1.harmonyCodegenConfig);
12482
13703
  case types_1.Environment.APP_BUILDER:
12483
13704
  default:
12484
13705
  return withSharedRules({
@@ -16105,7 +17326,7 @@ var require_bi_logger_factory = __commonJS({
16105
17326
  });
16106
17327
 
16107
17328
  // ../../node_modules/@wix/wix-bi-logger-client/dist/index.js
16108
- var require_dist8 = __commonJS({
17329
+ var require_dist10 = __commonJS({
16109
17330
  "../../node_modules/@wix/wix-bi-logger-client/dist/index.js"(exports2, module2) {
16110
17331
  "use strict";
16111
17332
  var BiLoggerClientFactory = require_bi_logger_factory();
@@ -18705,7 +19926,7 @@ var require_src2 = __commonJS({
18705
19926
  Object.defineProperty(exports2, "__esModule", { value: true });
18706
19927
  exports2.StandaloneNodeLogger = void 0;
18707
19928
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
18708
- var wix_bi_logger_client_1 = tslib_1.__importDefault(require_dist8());
19929
+ var wix_bi_logger_client_1 = tslib_1.__importDefault(require_dist10());
18709
19930
  var http_client_1 = require_index_node2();
18710
19931
  var defaultOptions = {
18711
19932
  baseUrl: process.env.BI_BASE_URL || "https://frog.wix.com",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.364",
3
+ "version": "1.0.366",
4
4
  "description": "AI-powered Wix CLI app generator - standalone executable",
5
5
  "scripts": {
6
6
  "build": "node build.mjs",
@@ -29,5 +29,5 @@
29
29
  "esbuild": "^0.27.2",
30
30
  "vitest": "^4.0.16"
31
31
  },
32
- "falconPackageHash": "d3f73d5ef81d405259fbb65db9cd00e9d67193b0aec3a09b82a69337"
32
+ "falconPackageHash": "fcb0cf778e55a780aca1cac6efea4c192f6bfc82a53a21a0068e72de"
33
33
  }