@wix/agent-skills 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +49 -42
- package/skills/wix-app/references/BACKEND_EVENT.md +10 -65
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +101 -406
- package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +14 -111
- package/skills/wix-app/references/DASHBOARD_MODAL.md +56 -205
- package/skills/wix-app/references/DASHBOARD_PAGE.md +19 -98
- package/skills/wix-app/references/DASHBOARD_PLUGIN.md +6 -108
- package/skills/wix-app/references/DATA_COLLECTION.md +113 -198
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +15 -1
- package/skills/wix-app/references/EMBEDDED_SCRIPT.md +41 -268
- package/skills/wix-app/references/EXTENSION_REGISTRATION.md +27 -76
- package/skills/wix-app/references/SERVICE_PLUGIN.md +35 -188
- package/skills/wix-app/references/SITE_PLUGIN.md +8 -92
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +0 -44
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +19 -330
- package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +0 -12
- package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +7 -0
- package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +0 -12
- package/skills/wix-app/references/dashboard-plugin/SLOTS.md +3 -15
- package/skills/wix-app/references/data-collection/WIX_DATA.md +1 -1
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
- package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +2 -18
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +2 -42
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -11
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +1 -11
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +2 -40
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +2 -19
- package/skills/wix-app/references/service-plugin/VALIDATIONS.md +2 -18
- package/skills/wix-app/references/site-plugin/SLOTS.md +17 -68
- package/skills/wix-headless/SKILL.md +112 -368
- package/skills/wix-headless/references/BUILD.md +307 -0
- package/skills/wix-headless/references/DESIGN_SYSTEM.md +115 -0
- package/skills/wix-headless/references/DISCOVERY.md +237 -112
- package/skills/wix-headless/references/PLAN.md +82 -0
- package/skills/wix-headless/references/SEED.md +205 -0
- package/skills/wix-headless/references/SETUP.md +250 -94
- package/skills/wix-headless/references/astro/COMPOSE.md +142 -0
- package/skills/wix-headless/references/{blog → astro/blog}/BLOG_PAGES.md +1 -1
- package/skills/wix-headless/references/{blog → astro/blog}/BLOG_SETUP.md +2 -2
- package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +214 -0
- package/skills/wix-headless/references/{cms → astro/cms}/FAQ_KNOWLEDGE_BASE.md +6 -4
- package/skills/wix-headless/references/{cms → astro/cms}/PORTFOLIO.md +5 -5
- package/skills/wix-headless/references/{cms → astro/cms}/RESOURCE_LIBRARY.md +5 -5
- package/skills/wix-headless/references/{cms → astro/cms}/TEAM_DIRECTORY.md +5 -5
- package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +331 -0
- package/skills/wix-headless/references/{ecom → astro/ecom}/CART_PAGES.md +1 -1
- package/skills/wix-headless/references/{ecom → astro/ecom}/CART_WIRING.md +1 -1
- package/skills/wix-headless/references/{ecom → astro/ecom}/COMPONENTS_CSS.md +3 -3
- package/skills/wix-headless/references/{forms → astro/forms}/CONTACT_FORM.md +13 -13
- package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/COMPONENTS.md +1 -1
- package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/PAGES.md +1 -1
- package/skills/wix-headless/references/{stores → astro/stores}/BACK_IN_STOCK.md +1 -1
- package/skills/wix-headless/references/{stores → astro/stores}/CATEGORY_PAGES.md +12 -13
- package/skills/wix-headless/references/{stores → astro/stores}/COMPONENTS_CSS.md +4 -4
- package/skills/wix-headless/references/{stores → astro/stores}/HOME_AND_NAV.md +11 -9
- package/skills/wix-headless/references/{stores → astro/stores}/PRODUCT_PAGES.md +5 -3
- package/skills/wix-headless/references/{stores → astro/stores}/SHARED_WIRING.md +3 -3
- package/skills/wix-headless/references/astro/templates/Footer.astro +27 -0
- package/skills/wix-headless/references/astro/templates/Layout.astro +132 -0
- package/skills/wix-headless/references/astro/templates/Navigation.astro +38 -0
- package/skills/wix-headless/references/astro/templates/astro.config.mjs +41 -0
- package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +302 -0
- package/skills/wix-headless/references/astro/templates/global.css +286 -0
- package/skills/wix-headless/references/astro/templates/index.astro +56 -0
- package/skills/wix-headless/{templates → references/astro/templates}/stores/back-in-stock.ts +1 -1
- package/skills/wix-headless/{templates → references/astro/templates}/stores/components-stores.css +138 -33
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +10 -11
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +5 -5
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +31 -230
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +13 -8
- package/skills/wix-headless/references/custom/INSTRUCTIONS.md +38 -0
- package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +10 -10
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +5 -5
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +11 -11
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +47 -50
- package/skills/wix-headless/references/seed-recipes.md +49 -0
- package/skills/wix-headless/references/shared/AUTHENTICATION.md +110 -0
- package/skills/wix-headless/references/shared/BUILD_NOISE.md +2 -2
- package/skills/wix-headless/references/shared/DOCS_SEARCH.md +41 -0
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +17 -17
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +20 -29
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +1 -1
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +25 -16
- package/skills/wix-headless/references/shared/STYLING.md +47 -10
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +25 -25
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -17
- package/skills/wix-headless/references/verticals/_schema.json +31 -117
- package/skills/wix-headless/references/verticals/_schema.md +60 -150
- package/skills/wix-headless/references/verticals/blog.md +5 -99
- package/skills/wix-headless/references/verticals/cms.md +9 -100
- package/skills/wix-headless/references/verticals/ecom.md +5 -76
- package/skills/wix-headless/references/verticals/forms.md +5 -85
- package/skills/wix-headless/references/verticals/gift-cards.md +6 -103
- package/skills/wix-headless/references/verticals/stores.md +10 -144
- package/skills/wix-headless/scripts/check-manifest.mjs +5 -5
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +29 -23
- package/skills/wix-headless/scripts/init-site-json.mjs +59 -21
- package/skills/wix-headless/scripts/patch-decorative-slots.mjs +67 -43
- package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +3 -3
- package/skills/wix-headless/scripts/preview.sh +3 -3
- package/skills/wix-headless/scripts/release.sh +4 -4
- package/skills/wix-headless/scripts/scaffold.sh +75 -20
- package/skills/wix-headless/scripts/seed-utilities.sh +50 -12
- package/skills/wix-manage/SKILL.md +4 -8
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +70 -1
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +4 -0
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +2 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +4 -0
- package/skills/wix-manage/references/ecommerce/api-shipping.md +443 -0
- package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +5 -6
- package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +4 -5
- package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +4 -5
- package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +1 -1
- package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +1 -2
- package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +2 -2
- package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +4 -5
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +7 -7
- package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +209 -72
- package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +9 -10
- package/skills/wix-manage/references/ecommerce/skill-graph.md +4 -4
- package/skills/wix-manage/references/forms/create-form.md +2 -0
- package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +2 -0
- package/skills/wix-manage/references/stores/create-product-from-image.md +91 -38
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +14 -7
- package/skills/wix-app/references/data-collection/extension-template.ts +0 -107
- package/skills/wix-headless/references/ORCHESTRATION.md +0 -269
- package/skills/wix-headless/references/commands/install-app.md +0 -42
- package/skills/wix-headless/references/commands/mcp-bootstrap.md +0 -28
- package/skills/wix-headless/references/designer/INSTRUCTIONS.md +0 -828
- package/skills/wix-headless/references/shared/MCP_PREFIX.md +0 -105
- package/skills/wix-headless/scripts/copy-utility-templates.mjs +0 -153
- package/skills/wix-headless/templates/ecom/components-ecom.css +0 -215
- package/skills/wix-manage/references/events/list-events.md +0 -203
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartBadge.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartView.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/cart.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/discounts.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/thank-you.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/GiftCardPurchase.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_home-teaser-snippet.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_nav-snippet.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/components-gift-cards.css +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/AddToCartButton.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/BackInStockForm.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/CategoryRail.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductCard.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductPurchase.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/SeoTags.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/categories.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/category/[slug].astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/[slug].astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/index.astro +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Wix MCP Tool Prefix — Discovery & Propagation
|
|
2
|
-
|
|
3
|
-
Wix MCP tools are exposed under one of two prefixes depending on how the user installed the integration:
|
|
4
|
-
|
|
5
|
-
| Install mode | Prefix |
|
|
6
|
-
|---|---|
|
|
7
|
-
| **Plugin** (typical for end users) | `mcp__plugin_<plugin-name>_wix-mcp-remote__` (e.g. `mcp__plugin_wix-headless_wix-mcp-remote__WixREADME`) |
|
|
8
|
-
| **Direct MCP server** | `mcp__wix-mcp-remote__` (e.g. `mcp__wix-mcp-remote__WixREADME`) |
|
|
9
|
-
|
|
10
|
-
Tool **suffixes** are identical in both modes: `WixREADME`, `CallWixSiteAPI`, `ListWixSites`, `ManageWixSite`, `SearchWixHeadlessDocumentation`, `SearchWixSDKDocumentation`, `SearchWixRESTDocumentation`, `BrowseWixRESTDocsMenu`, `ReadFullDocsArticle`, `ReadFullDocsMethodSchema`. Only the prefix differs.
|
|
11
|
-
|
|
12
|
-
Documentation in this plugin uses the canonical short form (`mcp__wix-mcp-remote__<suffix>`) for readability — substitute the discovered prefix at runtime.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Discovery — entry-point skills only, once per session
|
|
17
|
-
|
|
18
|
-
The entry-point skill (`wix-headless`) MUST run this before any other MCP call:
|
|
19
|
-
|
|
20
|
-
1. Use whatever tool-discovery primitive your runtime provides to look up `WixREADME`.
|
|
21
|
-
2. From the returned tool name, strip the trailing `WixREADME` — what remains (ending in `wix-mcp-remote__`) is the **MCP prefix**. Examples:
|
|
22
|
-
- Returned name `mcp__plugin_wix_wix-mcp-remote__WixREADME` → prefix `mcp__plugin_wix_wix-mcp-remote__`
|
|
23
|
-
- Returned name `mcp__wix-mcp-remote__WixREADME` → prefix `mcp__wix-mcp-remote__`
|
|
24
|
-
3. Call `<prefix>WixREADME` once to verify connectivity.
|
|
25
|
-
4. **If discovery returns no match, or the verify call fails:** stop and tell the user:
|
|
26
|
-
> *"Wix MCP tools are not available in this session. Please ensure the Wix MCP server is connected (or that the Wix plugin is enabled), then restart your client."*
|
|
27
|
-
5. Hold the discovered prefix in working memory for the rest of the session — use it for every MCP call AND pass it into every subagent prompt.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Propagation to subagents
|
|
32
|
-
|
|
33
|
-
Subagents (every Phase 1 / Phase 2 / Phase 3 / Phase 4 implementer) are isolated workers — they see only the prompt their parent gave them, not the parent's session state. Every subagent prompt MUST include this line verbatim near the top:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
MCP tool prefix: <discovered prefix>
|
|
37
|
-
Use this prefix for every Wix MCP call. Example: <prefix>CallWixSiteAPI, <prefix>WixREADME.
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Without this line the subagent will try the canonical short form and fail in plugin mode.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## `CallWixSiteAPI` call conventions — read before the first call
|
|
45
|
-
|
|
46
|
-
`CallWixSiteAPI` is the most error-prone tool in this plugin. Two failure modes recur; avoid both:
|
|
47
|
-
|
|
48
|
-
**1. Missing required wrapper params.** The tool requires — in addition to `method`, `url`, `body` — these wrapper fields:
|
|
49
|
-
|
|
50
|
-
- `siteId` — from `wix.config.json` (or the parent prompt)
|
|
51
|
-
- `reason` — one-sentence human reason, e.g. `"Install Wix Stores app for <brand>"`
|
|
52
|
-
- `sourceDocUrl` — the Wix docs URL the recipe is from, e.g. `"https://dev.wix.com/docs/picasso/wix-ai-docs/recipes-v2/manage/platform/recipe-install-wix-apps"`
|
|
53
|
-
|
|
54
|
-
**2. `body` passed as a stringified JSON.** `body` is typed `anyOf: [object, array]` — pass it as a real structured value. `body: "{\"tenant\":…}"` will be rejected with `Expected object, received string`.
|
|
55
|
-
|
|
56
|
-
**The safe pattern — follow on the first `CallWixSiteAPI` of each session:**
|
|
57
|
-
|
|
58
|
-
1. **Load the schema** via your runtime's tool-discovery primitive (the orchestrator's Step 0 already did this for the whole session per `<SKILL_ROOT>/references/commands/mcp-bootstrap.md` — only re-load if you hit a tool-not-found error).
|
|
59
|
-
2. Call with the full shape:
|
|
60
|
-
```
|
|
61
|
-
<prefix>CallWixSiteAPI(
|
|
62
|
-
siteId: "<siteId from wix.config.json>",
|
|
63
|
-
reason: "<one-sentence reason>",
|
|
64
|
-
sourceDocUrl: "<URL of the Wix docs recipe you're following>",
|
|
65
|
-
method: "POST",
|
|
66
|
-
url: "https://www.wixapis.com/<service>/<path>",
|
|
67
|
-
body: { …as a real object, not a string }
|
|
68
|
-
)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**When you see reference snippets written in prose-HTTP form** (e.g. `CallWixSiteAPI: POST /blog/v3/posts` followed by `body: { … }`), translate them into the full tool-call shape above — the prose form omits the wrapper fields for readability, not because they're optional.
|
|
72
|
-
|
|
73
|
-
## Defensive fallback — required in every implementer agent
|
|
74
|
-
|
|
75
|
-
If a Wix MCP call returns "tool not found" or the tool name appears unavailable for any reason:
|
|
76
|
-
|
|
77
|
-
1. Re-discover the tool via your runtime's tool-discovery primitive, looking up the suffix (e.g. `CallWixSiteAPI`).
|
|
78
|
-
2. Use the discovered tool name and retry the call.
|
|
79
|
-
3. **Do NOT bail.** Only escalate to the user if discovery itself returns no match.
|
|
80
|
-
|
|
81
|
-
This guards against parents that forgot to pass the prefix and against future prefix-scheme changes.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Prefer bundled reference docs over external doc reads
|
|
86
|
-
|
|
87
|
-
Your agent directory includes `.md` reference files with API recipes, call templates, and error handling tailored to your scope. These are your primary source — they document the exact call patterns, body shapes, and edge cases for your use case.
|
|
88
|
-
|
|
89
|
-
The Wix MCP also exposes documentation tools (`SearchWixRESTDocumentation`, `ReadFullDocsArticle`, `SearchWixSDKDocumentation`, etc.). These are useful when you hit an error or edge case not covered by your reference files. But **prefer your bundled `.md` files first** — each external doc read costs a tool call and 15-30s, and the bundled recipes are already validated for this plugin's flows.
|
|
90
|
-
|
|
91
|
-
**Rule of thumb:** read your reference files → try the documented recipe → only if you get an unexpected error or need an endpoint not covered, fall back to the MCP doc tools.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Absolute paths — never trust CWD-relative instruction locations
|
|
96
|
-
|
|
97
|
-
Subagents launched by the orchestrator run with the project directory as CWD (e.g. `/Users/.../headless-projects/chairloom/`), not the skill root. Your instruction file and its sibling references live **inside the skill**, not in your CWD — e.g. the stores instructions live at `<skill-root>/references/stores/INSTRUCTIONS.md`.
|
|
98
|
-
|
|
99
|
-
**Rule:** every implementer prompt MUST include an `Instruction file (absolute path)` line pointing at the right `INSTRUCTIONS.md`. Read that file and only that path. Then use the absolute paths it lists for sibling references. Never:
|
|
100
|
-
|
|
101
|
-
- Resolve `references/stores/INSTRUCTIONS.md` against your CWD — it doesn't exist there.
|
|
102
|
-
- `Glob **/INSTRUCTIONS.md` or `**/agents/**` to "find" your instructions — that walks the project tree and finds nothing relevant; it's the most expensive failure mode in current runs.
|
|
103
|
-
- Walk up from the project directory looking for the skill root — guess wrong and you'll burn minutes globbing.
|
|
104
|
-
|
|
105
|
-
If your prompt is missing the absolute `Instruction file` line, ask the parent (don't guess). The `wix-headless` skill is responsible for computing and passing this absolute path in every agent-launch prompt (see `references/ORCHESTRATION.md` § "Agent prompt template").
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Copy templated utility files into the project for the named phase.
|
|
3
|
-
// Invoked by the wix-headless skill orchestrator before Phase 3 Components or
|
|
4
|
-
// Phase 4 Pages dispatches, so that mechanical SDK-wrapper utilities
|
|
5
|
-
// (back-in-stock.ts, discounts.ts, categories.ts) are on disk by the time
|
|
6
|
-
// agents start.
|
|
7
|
-
//
|
|
8
|
-
// These files are pure templates — same shape regardless of brand. Letting an
|
|
9
|
-
// LLM regenerate them costs tokens and risks drift. Pre-copying is structurally
|
|
10
|
-
// better.
|
|
11
|
-
//
|
|
12
|
-
// Usage (both modes work):
|
|
13
|
-
// node <SKILL_ROOT>/scripts/copy-utility-templates.mjs <project-dir> <phase>
|
|
14
|
-
// curl -s https://dev.wix.com/skills/wix-headless/scripts/copy-utility-templates.mjs \
|
|
15
|
-
// | node --input-type=module - <project-dir> <phase>
|
|
16
|
-
//
|
|
17
|
-
// <phase> ∈ { "components", "pages" }
|
|
18
|
-
//
|
|
19
|
-
// Note: `node <(curl ...)` does NOT work for .mjs files — Node sees /dev/fd/N
|
|
20
|
-
// with no extension and rejects ESM syntax. Use the stdin form above.
|
|
21
|
-
//
|
|
22
|
-
// Template files auto-detect whether they can be read on disk (tgz install)
|
|
23
|
-
// and fall back to HTTP fetch when streamed via stdin.
|
|
24
|
-
//
|
|
25
|
-
// Reads `.wix/site.json` to discover which packs are loaded, then copies the
|
|
26
|
-
// matching templates for the given phase. Never overwrites an existing file
|
|
27
|
-
// (so user customisations and earlier orchestrator state are preserved).
|
|
28
|
-
|
|
29
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync, copyFileSync } from "node:fs";
|
|
30
|
-
import { join, dirname, resolve } from "node:path";
|
|
31
|
-
import { fileURLToPath } from "node:url";
|
|
32
|
-
|
|
33
|
-
const SKILL_URL = "https://dev.wix.com/skills/wix-headless";
|
|
34
|
-
|
|
35
|
-
// Mode detection — see check-manifest.mjs for the same pattern.
|
|
36
|
-
let SKILL_ROOT_DISK = null;
|
|
37
|
-
try {
|
|
38
|
-
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
39
|
-
const candidate = resolve(scriptDir, "..");
|
|
40
|
-
if (existsSync(join(candidate, "templates"))) {
|
|
41
|
-
SKILL_ROOT_DISK = candidate;
|
|
42
|
-
}
|
|
43
|
-
} catch {
|
|
44
|
-
// fileURLToPath may fail on non-file URLs; fall through to URL mode.
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Copy a template file (path relative to <SKILL_ROOT>/templates/) into the
|
|
48
|
-
// project at destPath. Returns { ok: true } on success, or { ok: false,
|
|
49
|
-
// reason: "..." } on failure (source missing, HTTP error, IO error).
|
|
50
|
-
async function copyTemplate(sourceRel, destPath) {
|
|
51
|
-
if (SKILL_ROOT_DISK) {
|
|
52
|
-
const src = join(SKILL_ROOT_DISK, "templates", sourceRel);
|
|
53
|
-
if (!existsSync(src)) return { ok: false, reason: `missing on disk: ${src}` };
|
|
54
|
-
try {
|
|
55
|
-
mkdirSync(dirname(destPath), { recursive: true });
|
|
56
|
-
copyFileSync(src, destPath);
|
|
57
|
-
return { ok: true };
|
|
58
|
-
} catch (e) {
|
|
59
|
-
return { ok: false, reason: e.message };
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
const url = `${SKILL_URL}/templates/${sourceRel}`;
|
|
63
|
-
try {
|
|
64
|
-
const r = await fetch(url);
|
|
65
|
-
if (r.status === 404) return { ok: false, reason: `missing at ${url}` };
|
|
66
|
-
if (!r.ok) return { ok: false, reason: `fetch ${url}: HTTP ${r.status}` };
|
|
67
|
-
const text = await r.text();
|
|
68
|
-
mkdirSync(dirname(destPath), { recursive: true });
|
|
69
|
-
writeFileSync(destPath, text);
|
|
70
|
-
return { ok: true };
|
|
71
|
-
} catch (e) {
|
|
72
|
-
return { ok: false, reason: e.message };
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Hardcoded mapping: { pack, phase, source (relative to templates dir), dest (relative to project) }.
|
|
77
|
-
// To add a new templated utility: ship the file under templates/<pack>/, then add
|
|
78
|
-
// an entry here. Keep this list small — only files that are pure SDK wrappers
|
|
79
|
-
// with no brand-specific content belong here.
|
|
80
|
-
const TEMPLATES = [
|
|
81
|
-
{ pack: "stores", phase: "components", source: "stores/back-in-stock.ts", dest: "src/utils/back-in-stock.ts" },
|
|
82
|
-
{ pack: "ecom", phase: "components", source: "ecom/discounts.ts", dest: "src/utils/discounts.ts" },
|
|
83
|
-
{ pack: "stores", phase: "pages", source: "stores/categories.ts", dest: "src/utils/categories.ts" },
|
|
84
|
-
];
|
|
85
|
-
|
|
86
|
-
const projectDir = process.argv[2];
|
|
87
|
-
const phase = process.argv[3];
|
|
88
|
-
|
|
89
|
-
if (!projectDir || !phase) {
|
|
90
|
-
console.error("usage: copy-utility-templates.mjs <project-dir> <phase>");
|
|
91
|
-
console.error(" <phase> ∈ { components, pages }");
|
|
92
|
-
process.exit(2);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (phase !== "components" && phase !== "pages") {
|
|
96
|
-
console.error(`copy-utility-templates: invalid phase "${phase}" — must be "components" or "pages"`);
|
|
97
|
-
process.exit(2);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const sitePath = join(projectDir, ".wix/site.json");
|
|
101
|
-
let loadedPacks;
|
|
102
|
-
try {
|
|
103
|
-
const site = JSON.parse(readFileSync(sitePath, "utf8"));
|
|
104
|
-
loadedPacks = new Set(site.verticals ?? []);
|
|
105
|
-
if (loadedPacks.size === 0) {
|
|
106
|
-
console.error(`copy-utility-templates: site.json.verticals is empty — has Setup completed?`);
|
|
107
|
-
process.exit(1);
|
|
108
|
-
}
|
|
109
|
-
} catch (e) {
|
|
110
|
-
console.error(`copy-utility-templates: cannot read ${sitePath} (${e.message}). Has Setup completed?`);
|
|
111
|
-
process.exit(1);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const candidates = TEMPLATES.filter((t) => t.phase === phase && loadedPacks.has(t.pack));
|
|
115
|
-
|
|
116
|
-
if (candidates.length === 0) {
|
|
117
|
-
console.log(`copy-utility-templates: no templates for phase "${phase}" with loaded packs ${[...loadedPacks].join(", ")} — nothing to do`);
|
|
118
|
-
process.exit(0);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const copied = [];
|
|
122
|
-
const skipped = [];
|
|
123
|
-
const errors = [];
|
|
124
|
-
|
|
125
|
-
for (const { pack, source, dest } of candidates) {
|
|
126
|
-
const destPath = join(projectDir, dest);
|
|
127
|
-
|
|
128
|
-
if (existsSync(destPath)) {
|
|
129
|
-
skipped.push(dest);
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const result = await copyTemplate(source, destPath);
|
|
134
|
-
if (result.ok) {
|
|
135
|
-
copied.push(dest);
|
|
136
|
-
} else {
|
|
137
|
-
errors.push(`failed to copy ${source} → ${dest} (pack "${pack}"): ${result.reason}`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const summary = {
|
|
142
|
-
phase,
|
|
143
|
-
packs: [...loadedPacks],
|
|
144
|
-
copied,
|
|
145
|
-
skipped,
|
|
146
|
-
errors,
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
console.log(JSON.stringify(summary, null, 2));
|
|
150
|
-
|
|
151
|
-
if (errors.length > 0) {
|
|
152
|
-
process.exit(1);
|
|
153
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
/* src/styles/components-ecom.css
|
|
2
|
-
*
|
|
3
|
-
* Ecom-pack component CSS. Owned by the ecom Phase 3 components agent.
|
|
4
|
-
*
|
|
5
|
-
* This file is the SINGLE source of truth for ecom-component classes.
|
|
6
|
-
* The designer's global.css does NOT publish .cart-summary, .cart-total,
|
|
7
|
-
* .cart-empty, or .checkout-btn — those all live here. See
|
|
8
|
-
* references/shared/STYLING.md § "Component-specific CSS is owned by the
|
|
9
|
-
* component, not the designer".
|
|
10
|
-
*
|
|
11
|
-
* Class groups in this file:
|
|
12
|
-
* - .cart-summary / .cart-total / .cart-empty / .checkout-btn → /cart page summary panel and empty state
|
|
13
|
-
* - .cart-item / .cart-item-* / .qty-* → CartView.tsx line items
|
|
14
|
-
* - .cart-discount / .cart-applied-discounts → CartView.tsx discount rows
|
|
15
|
-
* - .cart-badge / .cart-badge-* → CartBadge.tsx (mounted in Navigation)
|
|
16
|
-
*
|
|
17
|
-
* Tailwind v4 requires @reference in non-entrypoint CSS files that use @apply
|
|
18
|
-
* — without these, utilities like `size-6` fail at build with "Cannot apply
|
|
19
|
-
* unknown utility class". Do not remove.
|
|
20
|
-
*/
|
|
21
|
-
@reference "tailwindcss";
|
|
22
|
-
@reference "./global.css";
|
|
23
|
-
|
|
24
|
-
/* =========================================================================
|
|
25
|
-
Cart summary panel + total + checkout button + empty state.
|
|
26
|
-
Owned here, NOT in global.css. The .checkout-btn extends .btn-primary
|
|
27
|
-
(which IS designer-owned) and adds full-width + :disabled treatment.
|
|
28
|
-
========================================================================= */
|
|
29
|
-
.cart-summary {
|
|
30
|
-
background: var(--color-paper-warm, var(--color-cream));
|
|
31
|
-
border: 1px solid var(--color-rule);
|
|
32
|
-
padding: var(--spacing-xl);
|
|
33
|
-
border-radius: var(--radius-md);
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
gap: var(--spacing-sm);
|
|
37
|
-
}
|
|
38
|
-
@media (min-width: 768px) {
|
|
39
|
-
.cart-summary {
|
|
40
|
-
position: sticky;
|
|
41
|
-
top: var(--spacing-xl);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.cart-empty {
|
|
46
|
-
text-align: center;
|
|
47
|
-
padding-block: var(--spacing-3xl);
|
|
48
|
-
color: var(--color-mute);
|
|
49
|
-
}
|
|
50
|
-
.cart-empty .checkout-btn {
|
|
51
|
-
display: inline-flex;
|
|
52
|
-
width: auto;
|
|
53
|
-
max-width: 18rem;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* .checkout-btn composes the designer's `btn` @utility primitive plus the brand's
|
|
57
|
-
primary fill. Do NOT use `@apply btn-primary` here — Tailwind v4 only @applies
|
|
58
|
-
utilities declared with `@utility` (which `btn` is in global.css), not plain
|
|
59
|
-
custom classes like `.btn-primary` (which is just a regular CSS rule). The build
|
|
60
|
-
fails with "Cannot apply unknown utility class `btn-primary`" if you try.
|
|
61
|
-
The Phase 3 agent's brand-token swap (bark → navy/charcoal/coral/etc.) adapts
|
|
62
|
-
the var names without changing the composition shape. an earlier run on 2026-04-30 hit
|
|
63
|
-
this; the recovery cost ~1 min and a rebuild. */
|
|
64
|
-
.checkout-btn {
|
|
65
|
-
@apply btn;
|
|
66
|
-
background: var(--color-bark);
|
|
67
|
-
color: var(--color-cream);
|
|
68
|
-
box-shadow: var(--shadow-sm);
|
|
69
|
-
width: 100%;
|
|
70
|
-
margin-top: var(--spacing-md);
|
|
71
|
-
}
|
|
72
|
-
.checkout-btn:hover:not(:disabled) {
|
|
73
|
-
background: var(--color-tobacco);
|
|
74
|
-
box-shadow: var(--shadow-md);
|
|
75
|
-
}
|
|
76
|
-
.checkout-btn:disabled {
|
|
77
|
-
opacity: 0.5;
|
|
78
|
-
cursor: not-allowed;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* --- Cart badge icon safety net --- */
|
|
82
|
-
/* CartBadge.tsx renders an inline SVG bag icon + optional count span. The designer
|
|
83
|
-
owns .cart-badge in global.css; these rules guarantee an icon-button layout
|
|
84
|
-
(relative positioning anchor, centered icon, count pill overlap) even if the
|
|
85
|
-
designer's rule is purely aesthetic. */
|
|
86
|
-
.cart-badge {
|
|
87
|
-
@apply relative inline-flex items-center justify-center;
|
|
88
|
-
}
|
|
89
|
-
.cart-badge-icon {
|
|
90
|
-
@apply size-6 shrink-0;
|
|
91
|
-
}
|
|
92
|
-
.cart-badge-count {
|
|
93
|
-
@apply absolute -top-1 -right-2 min-w-5 h-5 px-1 inline-flex items-center justify-center rounded-full bg-bark text-cream text-xs font-body tabular-nums leading-none;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* --- Cart layout safety net --- */
|
|
97
|
-
/* .cart-item is a global contract class styled by the designer in global.css.
|
|
98
|
-
These rules ensure the row layout works even if the designer omits flex. */
|
|
99
|
-
.cart-item {
|
|
100
|
-
@apply flex flex-row gap-md;
|
|
101
|
-
}
|
|
102
|
-
.cart-item-image {
|
|
103
|
-
@apply shrink-0;
|
|
104
|
-
}
|
|
105
|
-
/* Clickable image + name link back to /products/<slug>.
|
|
106
|
-
At-rest underline + pointer cursor so the link is discoverable without
|
|
107
|
-
hovering (critical on touch). Muted rule-color underline keeps visual
|
|
108
|
-
weight in line with the body text; hover/focus escalates to tobacco. */
|
|
109
|
-
.cart-item-image-link {
|
|
110
|
-
@apply block shrink-0 cursor-pointer;
|
|
111
|
-
}
|
|
112
|
-
.cart-item-image-link:hover .cart-item-image,
|
|
113
|
-
.cart-item-image-link:focus-visible .cart-item-image {
|
|
114
|
-
@apply border-ink;
|
|
115
|
-
}
|
|
116
|
-
.cart-item-name-link {
|
|
117
|
-
@apply text-inherit cursor-pointer no-underline;
|
|
118
|
-
/* border-bottom is more predictable than text-decoration-line for inline
|
|
119
|
-
<a> inside <h3> (no text-decoration inheritance quirks). Muted ink at
|
|
120
|
-
rest, tobacco on hover. */
|
|
121
|
-
border-bottom: 1px solid var(--color-muted);
|
|
122
|
-
padding-bottom: 1px;
|
|
123
|
-
transition: color 150ms ease, border-color 150ms ease;
|
|
124
|
-
}
|
|
125
|
-
.cart-item-name-link:hover,
|
|
126
|
-
.cart-item-name-link:focus-visible {
|
|
127
|
-
@apply text-tobacco outline-none;
|
|
128
|
-
border-bottom-color: var(--color-tobacco);
|
|
129
|
-
}
|
|
130
|
-
.cart-item-info {
|
|
131
|
-
@apply flex-1 min-w-0;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* --- Description lines & modifiers --- */
|
|
135
|
-
.cart-item-option {
|
|
136
|
-
@apply text-sm text-bark/70 font-body my-0.5;
|
|
137
|
-
}
|
|
138
|
-
.cart-item-modifiers {
|
|
139
|
-
@apply mt-1;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* --- Quantity stepper --- */
|
|
143
|
-
.cart-item-qty {
|
|
144
|
-
@apply inline-flex items-center gap-sm mt-sm w-fit;
|
|
145
|
-
}
|
|
146
|
-
.qty-btn {
|
|
147
|
-
@apply size-7 inline-flex items-center justify-center border border-bark rounded bg-transparent text-bark cursor-pointer font-body text-base leading-none;
|
|
148
|
-
}
|
|
149
|
-
.qty-btn:disabled {
|
|
150
|
-
@apply opacity-30 cursor-not-allowed;
|
|
151
|
-
}
|
|
152
|
-
.qty-value {
|
|
153
|
-
@apply font-body text-sm min-w-6 text-center tabular-nums;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/* --- Unavailable state --- */
|
|
157
|
-
.cart-item-unavailable {
|
|
158
|
-
@apply text-sm text-red-600 font-medium font-body;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* --- Price + remove --- */
|
|
162
|
-
.cart-item-actions {
|
|
163
|
-
@apply flex flex-col items-end gap-1 shrink-0;
|
|
164
|
-
}
|
|
165
|
-
.cart-item-prices {
|
|
166
|
-
@apply flex items-center gap-sm;
|
|
167
|
-
}
|
|
168
|
-
.cart-item-full-price {
|
|
169
|
-
@apply text-sm text-bark/70 line-through font-body;
|
|
170
|
-
}
|
|
171
|
-
.cart-item-unit-price {
|
|
172
|
-
@apply font-body font-semibold whitespace-nowrap;
|
|
173
|
-
}
|
|
174
|
-
.cart-item-line-total {
|
|
175
|
-
@apply font-body text-xs text-bark/70 m-0;
|
|
176
|
-
}
|
|
177
|
-
.cart-item-remove {
|
|
178
|
-
@apply text-sm bg-transparent border-none text-bark/60 font-body cursor-pointer underline;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* --- Cart summary: discount + total rows ---
|
|
182
|
-
Subtotal uses the designer's .cart-subtotal contract class in global.css.
|
|
183
|
-
These rows appear only when priceSummary exposes a discount or a total
|
|
184
|
-
that differs from subtotal (see CartView.tsx extractSummary). */
|
|
185
|
-
.cart-discount {
|
|
186
|
-
@apply flex items-baseline justify-between gap-sm font-body text-sm mt-sm;
|
|
187
|
-
}
|
|
188
|
-
.cart-discount-name {
|
|
189
|
-
@apply text-xs text-bark/60;
|
|
190
|
-
}
|
|
191
|
-
.cart-discount-amount {
|
|
192
|
-
@apply whitespace-nowrap;
|
|
193
|
-
}
|
|
194
|
-
.cart-total {
|
|
195
|
-
border-top: 1px solid var(--color-rule);
|
|
196
|
-
padding-top: var(--spacing-md);
|
|
197
|
-
margin-top: var(--spacing-sm);
|
|
198
|
-
font-family: var(--font-display);
|
|
199
|
-
font-size: 1.25rem;
|
|
200
|
-
font-weight: 500;
|
|
201
|
-
display: flex;
|
|
202
|
-
justify-content: space-between;
|
|
203
|
-
align-items: baseline;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/* Applied-discounts row — name-only (no amount) for cases where the API
|
|
207
|
-
reports a promo NAME via appliedDiscounts[].discountName but no cart-level
|
|
208
|
-
amount in priceSummary.discount (common for line-item automatic discounts
|
|
209
|
-
— the savings already show inline via fullPrice/price strikethrough). */
|
|
210
|
-
.cart-applied-discounts {
|
|
211
|
-
@apply flex items-baseline justify-between gap-sm font-body text-sm mt-sm;
|
|
212
|
-
}
|
|
213
|
-
.cart-applied-discounts-name {
|
|
214
|
-
@apply text-right text-bark/80 italic;
|
|
215
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "List Events"
|
|
3
|
-
description: Queries events from Wix Events using Events API. Covers field sets (DETAILS, URLS, REGISTRATION), filtering by status/date, and pagination.
|
|
4
|
-
---
|
|
5
|
-
# List Events with Wix Events API
|
|
6
|
-
|
|
7
|
-
This recipe demonstrates how to query and list events from Wix Events using the REST API.
|
|
8
|
-
|
|
9
|
-
## Prerequisites
|
|
10
|
-
|
|
11
|
-
- Wix Events app installed on the site
|
|
12
|
-
- API access with events permissions
|
|
13
|
-
|
|
14
|
-
## Required APIs
|
|
15
|
-
|
|
16
|
-
- **Events API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/query-events)
|
|
17
|
-
- **Filter and Sort Guidelines**: [Documentation](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/filter-and-sort)
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Step 1: Verify Events App is Installed
|
|
22
|
-
|
|
23
|
-
Before querying events, ensure Wix Events is installed on the site. If not, use the [Install Wix Apps](../app-installation/install-wix-apps.md) recipe to install it.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Step 2: Query Events
|
|
28
|
-
|
|
29
|
-
**Endpoint**: `POST https://www.wixapis.com/events/v3/events/query`
|
|
30
|
-
|
|
31
|
-
**Request Body**:
|
|
32
|
-
```json
|
|
33
|
-
{
|
|
34
|
-
"query": {
|
|
35
|
-
"paging": {
|
|
36
|
-
"limit": 10
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"fields": ["DETAILS", "URLS"]
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Request**:
|
|
44
|
-
```bash
|
|
45
|
-
curl -X POST \
|
|
46
|
-
'https://www.wixapis.com/events/v3/events/query' \
|
|
47
|
-
-H 'Authorization: <AUTH>' \
|
|
48
|
-
-H 'Content-Type: application/json' \
|
|
49
|
-
-d '{
|
|
50
|
-
"query": {
|
|
51
|
-
"paging": {
|
|
52
|
-
"limit": 10
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"fields": ["DETAILS", "URLS"]
|
|
56
|
-
}'
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Available Field Sets
|
|
60
|
-
|
|
61
|
-
The `fields` parameter determines which data is returned. You MUST specify at least `"DETAILS"`.
|
|
62
|
-
|
|
63
|
-
| Field Set | Description |
|
|
64
|
-
|-----------|-------------|
|
|
65
|
-
| `DETAILS` | Core event information (required) |
|
|
66
|
-
| `URLS` | Event page URLs |
|
|
67
|
-
| `CATEGORIES` | Event categories |
|
|
68
|
-
| `AGENDA` | Event schedule/agenda |
|
|
69
|
-
| `SEO_SETTINGS` | SEO metadata |
|
|
70
|
-
| `REGISTRATION` | Registration settings |
|
|
71
|
-
| `TEXTS` | Custom text content |
|
|
72
|
-
| `FORM` | Registration form configuration |
|
|
73
|
-
| `DASHBOARD` | Dashboard settings |
|
|
74
|
-
| `FEED` | Social feed settings |
|
|
75
|
-
| `ONLINE_CONFERENCING_SESSION` | Virtual event settings |
|
|
76
|
-
|
|
77
|
-
### IMPORTANT NOTES:
|
|
78
|
-
- I MUST specify at least `"DETAILS"` in the `fields` array
|
|
79
|
-
- I MUST NEVER use `"FULL"` as a field value
|
|
80
|
-
- If the user wants event links, I MUST include `"URLS"` in the fields
|
|
81
|
-
- Follow the [Filter and Sort Guidelines](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/filter-and-sort) for query filtering
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Step 3: Filter Events (Optional)
|
|
86
|
-
|
|
87
|
-
Apply filters to narrow down results:
|
|
88
|
-
|
|
89
|
-
**Filter by Status**:
|
|
90
|
-
```json
|
|
91
|
-
{
|
|
92
|
-
"query": {
|
|
93
|
-
"filter": {
|
|
94
|
-
"status": "UPCOMING"
|
|
95
|
-
},
|
|
96
|
-
"paging": {
|
|
97
|
-
"limit": 10
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"fields": ["DETAILS"]
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
> **Note:** Valid status values are: `UPCOMING`, `STARTED`, `ENDED`, `CANCELED`, `DRAFT`.
|
|
105
|
-
|
|
106
|
-
**Filter by Date Range**:
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"query": {
|
|
110
|
-
"filter": {
|
|
111
|
-
"dateAndTimeSettings.startDate": {
|
|
112
|
-
"$gte": "2024-01-01T00:00:00Z",
|
|
113
|
-
"$lte": "2024-12-31T23:59:59Z"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"paging": {
|
|
117
|
-
"limit": 10
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"fields": ["DETAILS"]
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Response Structure
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"events": [
|
|
131
|
-
{
|
|
132
|
-
"id": "event-id-123",
|
|
133
|
-
"title": "Event Title",
|
|
134
|
-
"shortDescription": "Event description",
|
|
135
|
-
"status": "UPCOMING",
|
|
136
|
-
"dateAndTimeSettings": {
|
|
137
|
-
"startDate": "2024-06-15T10:00:00Z",
|
|
138
|
-
"endDate": "2024-06-15T18:00:00Z",
|
|
139
|
-
"timeZoneId": "America/New_York",
|
|
140
|
-
"dateAndTimeTbd": false,
|
|
141
|
-
"recurrenceStatus": "ONE_TIME"
|
|
142
|
-
},
|
|
143
|
-
"location": {
|
|
144
|
-
"type": "VENUE",
|
|
145
|
-
"address": {}
|
|
146
|
-
},
|
|
147
|
-
"slug": "event-slug"
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
"pagingMetadata": {
|
|
151
|
-
"count": 10,
|
|
152
|
-
"hasNext": true
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## Common Use Cases
|
|
160
|
-
|
|
161
|
-
### List Upcoming Events
|
|
162
|
-
```json
|
|
163
|
-
{
|
|
164
|
-
"query": {
|
|
165
|
-
"filter": {
|
|
166
|
-
"status": "UPCOMING",
|
|
167
|
-
"dateAndTimeSettings.startDate": {
|
|
168
|
-
"$gte": "2024-01-01T00:00:00Z"
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
"sort": [
|
|
172
|
-
{
|
|
173
|
-
"fieldName": "dateAndTimeSettings.startDate",
|
|
174
|
-
"order": "ASC"
|
|
175
|
-
}
|
|
176
|
-
],
|
|
177
|
-
"paging": {
|
|
178
|
-
"limit": 20
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
"fields": ["DETAILS", "URLS"]
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### List Events with Registration Info
|
|
186
|
-
```json
|
|
187
|
-
{
|
|
188
|
-
"query": {
|
|
189
|
-
"paging": {
|
|
190
|
-
"limit": 10
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
"fields": ["DETAILS", "REGISTRATION", "FORM"]
|
|
194
|
-
}
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
## Next Steps
|
|
200
|
-
|
|
201
|
-
- Create events using the [Create Event API](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/create-event)
|
|
202
|
-
- Manage RSVPs and registrations
|
|
203
|
-
- Configure event tickets and pricing
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|