@wix/agent-skills 1.18.0 → 1.18.2
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/package.json +1 -1
- package/skills/wix-app/SKILL.md +4 -4
- package/skills/wix-app/references/APP_VALIDATION.md +7 -33
- package/skills/wix-app/references/DASHBOARD_PAGE.md +18 -14
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +75 -92
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +23 -26
- package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +7 -6
- package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +71 -4
- package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +67 -7
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +1 -1
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +9 -6
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +59 -89
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +23 -4
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +29 -14
- package/skills/wix-base44-connector/SKILL.md +168 -48
- package/skills/wix-base44-connector/scripts/{utils.js → utils.cjs} +69 -48
- package/skills/wix-docs/SKILL.md +109 -111
- package/skills/wix-docs/references/API_SPEC_SEARCH.md +35 -23
- package/skills/wix-docs/references/CALLING.md +91 -0
- package/skills/wix-docs/references/EXTRACTING.md +5 -3
- package/skills/wix-headless/references/DOC_DISCOVERY.md +9 -3
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +57 -10
- package/skills/wix-manage/SKILL.md +106 -92
- package/skills/wix-manage/references/dashboard-navigation/routes.json +12 -52
- package/skills/wix-manage/references/ecommerce/shipping/ecom-shipping-api.md +0 -2
- package/skills/wix-manage/references/forms/create-form.md +272 -184
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +13 -10
- package/skills/wix-manage/references/forms/update-form.md +122 -0
- package/skills/wix-manage/references/media/generate-image-with-ai.md +86 -0
- package/skills/wix-manage/references/seo/manage-content-plan.md +247 -0
- package/skills/wix-manage/references/seo/manage-seo-tags.md +59 -6
- package/skills/wix-manage/references/stores/change-store-currency.md +10 -0
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +16 -1
- package/skills/wix-manage/references/stores/update-product-with-options.md +9 -0
- package/skills/wix-vibe-headless/SKILL.md +17 -18
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +1 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +118 -0
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +55 -62
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +31 -29
- package/skills/wix-vibe-headless/platforms/base44.md +12 -5
- package/skills/wix-vibe-headless/platforms/generic.md +13 -12
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +4 -8
- package/skills/wix-vibe-headless/references/blog/seed/{seed-blog.js → seed-blog.cjs} +2 -3
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +5 -14
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +5 -9
- package/skills/wix-vibe-headless/references/bookings/seed/{seed-bookings.js → seed-bookings.cjs} +2 -2
- package/skills/wix-vibe-headless/references/bookings/seed/{seed-rentals.js → seed-rentals.cjs} +3 -3
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +1 -1
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +2 -2
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/events/seed/{seed-events.js → seed-events.cjs} +2 -2
- package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +24 -7
- package/skills/wix-vibe-headless/references/forms/seed/SEED.md +91 -17
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +2 -3
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +1 -1
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/portfolio/seed/{seed-portfolio.js → seed-portfolio.cjs} +2 -2
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +5 -14
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +1 -1
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/pricing-plans/seed/{seed-pricing-plans.js → seed-pricing-plans.cjs} +2 -2
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +5 -15
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/restaurants/seed/{seed-restaurants.js → seed-restaurants.cjs} +2 -2
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +359 -327
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +1 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +63 -78
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +59 -43
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +46 -10
- package/skills/wix-vibe-headless/references/storefront/seed/{seed-store.js → seed-store.cjs} +163 -25
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +0 -75
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# Forms — seeding (Form Schemas v4 REST)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Two actions live in this doc — decide which one you're doing before reading on.** Both are
|
|
4
|
+
**admin/build-time** work over an elevated credential, and both run through the same six steps:
|
|
5
|
+
|
|
6
|
+
| action | when | the steps it uses |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| **CREATE a form** — `POST` | there's no form yet: the app needs a contact / quote / application form and nothing has been created for it | all six, in order |
|
|
9
|
+
| **REVISE a form** — `PATCH` | the form already exists and a request changes **what it collects**: *"add a dropdown for job industry"*, *"make the phone optional"*, *"add a file upload"*, *"drop the budget question"* | 1 (auth) → 3 (author just the new field) → **4b · Revising a form later** → 5 (re-verify) → 6 (rewrite the config, then wire the control) |
|
|
10
|
+
|
|
11
|
+
A field the visitor can fill that isn't in the schema is **silent data loss** — no submission, no
|
|
12
|
+
inbox, no contact, and the submit still resolves `true`. So never local component state, and never
|
|
13
|
+
delete-and-recreate a live form: **`PATCH` it**, keeping the `formId` the UI already imports.
|
|
14
|
+
|
|
15
|
+
The six steps, each with a section below:
|
|
4
16
|
|
|
5
17
|
1. **Authenticate** — get an elevated credential; the public client ID cannot write.
|
|
6
|
-
2. **Install the Wix Forms app** — idempotent, and nothing works until it's there.
|
|
18
|
+
2. **Install the Wix Forms app** — idempotent, and nothing works until it's there. *(create only.)*
|
|
7
19
|
3. **Author the form body** — adapt the every-field payload to what the request asks for.
|
|
8
|
-
4. **Create the form** — POST each body; a `200` here means almost nothing.
|
|
20
|
+
4. **Create the form** — POST each body; a `200` here means almost nothing. *(revising: **4b**.)*
|
|
9
21
|
5. **Verify it works** — read the form back, and **submit to it once** for real.
|
|
10
22
|
6. **Hand off** — the verified `formId` + field `target`s are written to a file the UI imports.
|
|
11
23
|
|
|
@@ -13,7 +25,7 @@ Creating a form is an **admin/build-time** job, in six sequential steps. Each ha
|
|
|
13
25
|
|
|
14
26
|
Wix Forms is a **CRM** API, not Business Solutions. Read the page before writing a call you don't
|
|
15
27
|
find here — never guess a shape. For anything these pages don't settle — a response shape you didn't
|
|
16
|
-
expect, or an operation this doc doesn't cover — use the
|
|
28
|
+
expect, or an operation this doc doesn't cover — use the documentation skill available in your environment to search + read the
|
|
17
29
|
live Wix API reference.
|
|
18
30
|
|
|
19
31
|
| step | title | page | what it settles |
|
|
@@ -22,7 +34,7 @@ live Wix API reference.
|
|
|
22
34
|
| 3 | Create Form | https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/create-form.md | the create call, plus 10 complete request examples — the source of the payload below |
|
|
23
35
|
| 3 | Form object | https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/form-object.md | each property individually, incl. form-level settings this doc doesn't cover |
|
|
24
36
|
| 4 | Form Schemas API | https://dev.wix.com/docs/api-reference/crm/forms/form-schemas.md | every schema method (get, list, delete, enable/disable) |
|
|
25
|
-
|
|
|
37
|
+
| 4b | Update Form | https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/update-form.md | the `PATCH`: revising a form without losing its `formId`, and the whole-array replace semantics |
|
|
26
38
|
| 4 | List Forms Providers Configs | https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms-providers-configs.md | the Forms **app's** ceiling on fields and forms — **not** the site's plan cap, which this call cannot tell you (see step 4) |
|
|
27
39
|
| 5 | Create Submission | https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/create-submission.md | the submission call used to prove the form accepts data |
|
|
28
40
|
| 5 | About Submission Values | https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/about-submission-values.md | the value shape each `inputType` submits — string, array, address object, … |
|
|
@@ -77,8 +89,10 @@ costs nothing.
|
|
|
77
89
|
## 3 · Author the form body — every field type
|
|
78
90
|
|
|
79
91
|
There is **one** create call:
|
|
80
|
-
`POST https://www.wixapis.com/form-schema-service/v4/forms` with
|
|
81
|
-
|
|
92
|
+
`POST https://www.wixapis.com/form-schema-service/v4/forms` with
|
|
93
|
+
`{ "form": { "namespace": "wix.form_app.form", … } }` — that namespace is the Wix Forms app's, and
|
|
94
|
+
the only one the owner's dashboard shows. **You author that body**, starting from the payload below
|
|
95
|
+
and adapting it to the request.
|
|
82
96
|
|
|
83
97
|
The payload is one form holding **every field type Wix Forms supports**. Each field block is copied
|
|
84
98
|
verbatim from the official Create Form examples, so the `identifier` / `inputType` / `componentType`
|
|
@@ -155,10 +169,18 @@ owner's dashboard, or on the first real submission.
|
|
|
155
169
|
- **`required` lives at `inputOptions.required`**, never inside a validation block.
|
|
156
170
|
- **`validation` is always present**, even as `{}`, and nests under the **`inputType`** options
|
|
157
171
|
object — not the `componentType` one.
|
|
172
|
+
- **A choice field's `identifier` IS its kind** — `DROPDOWN`, `RADIO_GROUP`, `CHECKBOX_GROUP`,
|
|
173
|
+
`TAGS` — matching the `componentType`, never `TEXT_INPUT`: the identifier routes the field to its
|
|
174
|
+
renderer, so `TEXT_INPUT` + `componentType: DROPDOWN` is accepted and stored as a text input. (A
|
|
175
|
+
long answer is `TEXT_AREA` for the same reason.)
|
|
158
176
|
- **A choice field declares its options twice** — the component's `options[]` and the validation
|
|
159
177
|
`enum` (`STRING`) or `items.stringOptions.enum` + `itemType` (`ARRAY`) — and the two must agree.
|
|
160
178
|
Get it wrong and the create still returns `200`: the field is created as a **plain text box**,
|
|
161
179
|
losing its choices. Only the 5a component check catches it.
|
|
180
|
+
- **A choice field that came back as a text box: read which options block came home.**
|
|
181
|
+
`textInputOptions` where you sent `dropdownOptions` is that fallback — and with a well-formed block
|
|
182
|
+
and `enum`, the cause is the `identifier`. Re-sending it, or delete-and-re-add with the same
|
|
183
|
+
identifier, reproduces it.
|
|
162
184
|
- **`target` is the immutable submission key**: starts with an ASCII letter, letters/digits/`_`
|
|
163
185
|
only, no `__`, unique within the form. Use field's label converted to snake_case with _ and 6 random alphanumeric
|
|
164
186
|
characters as the field target, e.g. "First name" -> `first_name_a689be`.
|
|
@@ -1578,7 +1600,7 @@ always on the public host, never `/_api/`:
|
|
|
1578
1600
|
|
|
1579
1601
|
```
|
|
1580
1602
|
POST https://www.wixapis.com/form-schema-service/v4/forms
|
|
1581
|
-
{ "form": { … the body from step 3 … } }
|
|
1603
|
+
{ "form": { "namespace": "wix.form_app.form", … the rest of the body from step 3 … } }
|
|
1582
1604
|
```
|
|
1583
1605
|
|
|
1584
1606
|
Read **`form.id`** from the response — that's the `formId` the rest of the run carries. **Record it
|
|
@@ -1625,16 +1647,64 @@ proves the form works. Two failures worth recognizing before you retry:
|
|
|
1625
1647
|
than discovering the limit after a full authoring pass, and count every entry in `formFields`, the
|
|
1626
1648
|
`SUBMIT_BUTTON` included.
|
|
1627
1649
|
|
|
1628
|
-
|
|
1650
|
+
## 4b · Revising a form later
|
|
1651
|
+
|
|
1652
|
+
Add a field, relabel one, tighten a rule, retire one — a `PATCH`, never a second create. Everything
|
|
1653
|
+
above still applies; this is the delta.
|
|
1654
|
+
|
|
1655
|
+
**Read the form back first — you need its `revision`.** The `formId` comes from
|
|
1656
|
+
`src/rest/wix-forms.config.js` (`WIX_FORMS.<key>.formId`), never typed by hand:
|
|
1629
1657
|
|
|
1630
1658
|
```
|
|
1659
|
+
GET https://www.wixapis.com/form-schema-service/v4/forms?namespace=wix.form_app.form&formIds=<formId>
|
|
1631
1660
|
PATCH https://www.wixapis.com/form-schema-service/v4/forms/<formId>
|
|
1632
|
-
{ "form": { …, "revision": "<
|
|
1661
|
+
{ "form": { …the whole object you just read, with your change…, "revision": "<its current revision>" } }
|
|
1633
1662
|
```
|
|
1634
1663
|
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1664
|
+
- **`namespace` is a required query parameter on the read**, hence the `?namespace=` above. Without it
|
|
1665
|
+
the read `400`s with `namespace has size 0, expected 10 or more` — a violation naming a *field*, so
|
|
1666
|
+
it reads like a body problem. Fix the call, not the payload.
|
|
1667
|
+
- **The read-back is the `PATCH` body.** Apply the change to what the `GET` returned and send that.
|
|
1668
|
+
`namespace` is immutable and travels along; **there is no `fieldMask`**, and no `revision` outside
|
|
1669
|
+
`form`. Inventing either is a silent partial write.
|
|
1670
|
+
- **`formFields` replaces wholesale.** Wix: *"Any field that's missing from the array you send is
|
|
1671
|
+
moved to `deletedFormFields`, so resend every field you want to keep."* `steps` behaves the same
|
|
1672
|
+
way. Drops are recoverable from `deletedFormFields` — if you notice, which is step 5's job.
|
|
1673
|
+
- **A stale `revision` is rejected** — re-`GET` and re-apply; never guess or increment it.
|
|
1674
|
+
- **A new field needs three things generated**: a fresh UUID `id`, a `target` unique in the form
|
|
1675
|
+
(`job_industry_7f2b`), and — for a choice field — an options block whose `enum` and `options[]`
|
|
1676
|
+
agree. Step 3 is the shape, and its warnings still hold.
|
|
1677
|
+
|
|
1678
|
+
**Add the layout item too** — append to `steps[<n>].layout.large.items`, mirroring into `medium` /
|
|
1679
|
+
`small` if the form has them:
|
|
1680
|
+
|
|
1681
|
+
```json
|
|
1682
|
+
{ "fieldId": "<the new field's id>", "row": <next row>, "column": 0, "width": 12, "height": 1 }
|
|
1683
|
+
```
|
|
1684
|
+
|
|
1685
|
+
A field missing from the layout isn't dropped, but it sorts last and has no defined position in the
|
|
1686
|
+
owner's builder. To place it mid-form, insert at that `row` and bump every item at or after it — `row`
|
|
1687
|
+
restarts at 0 per step.
|
|
1688
|
+
|
|
1689
|
+
**Changing a field's component type in place** — a text input that should have been a dropdown — means
|
|
1690
|
+
the choice `identifier` and **only** the new options block; don't leave `textInputOptions` beside
|
|
1691
|
+
`dropdownOptions`. A read-back still showing `textInputOptions` is the identifier, not the block.
|
|
1692
|
+
|
|
1693
|
+
**The other revisions:**
|
|
1694
|
+
|
|
1695
|
+
- **label, placeholder, options, validation, order** — patch and stop. The client reads all of those
|
|
1696
|
+
live from the schema, so no config rewrite and no code change follows.
|
|
1697
|
+
- **retiring a field the form has submissions for** — set `hidden: true` ("hidden from submitters":
|
|
1698
|
+
the field stops being rendered, and the submissions already collected under it keep their meaning)
|
|
1699
|
+
rather than dropping it from the array. Drop only a field added by mistake in this same run.
|
|
1700
|
+
- **never rename a `target`** — it's the storage key, so a rename orphans every submission already
|
|
1701
|
+
collected under the old one. Change the *label* instead.
|
|
1702
|
+
|
|
1703
|
+
**Then re-run step 5 in full** — a `PATCH` regresses a form exactly as a create does, and §5a is where
|
|
1704
|
+
a dropdown that silently became a text input gets caught. Then step 6, revising: add the read-back
|
|
1705
|
+
`target` to `src/rest/wix-forms.config.js` (the one sanctioned edit to that file outside a seed run,
|
|
1706
|
+
and only *after* step 5 passes) and wire the control per `INSTRUCTIONS.md`. The field is live for new
|
|
1707
|
+
submissions; past ones don't carry it. Step 4's plan gates apply to an added field too.
|
|
1638
1708
|
|
|
1639
1709
|
## 5 · Verify it works
|
|
1640
1710
|
|
|
@@ -1671,6 +1741,9 @@ against the returned `form.formFields`:
|
|
|
1671
1741
|
GET https://www.wixapis.com/form-schema-service/v4/forms/<formId>/summary
|
|
1672
1742
|
```
|
|
1673
1743
|
|
|
1744
|
+
*(The summary and the single-form `GET` take the id in the path, so neither needs the `namespace`
|
|
1745
|
+
query parameter — every **listing** read does.)*
|
|
1746
|
+
|
|
1674
1747
|
Assert `formSummary.fields` is **non-empty**, with one entry per input field you sent (everything in
|
|
1675
1748
|
`formFields` except the `SUBMIT_BUTTON`). The summary is exactly what the Wix dashboard renders, so a
|
|
1676
1749
|
short or empty count means the form is blank — or partly blank — **for the owner**, even while the
|
|
@@ -1735,8 +1808,8 @@ DELETE https://www.wixapis.com/form-submission-service/v4/submissions/<id>
|
|
|
1735
1808
|
The id comes from the 5c response as **`submission.id`**: REST returns `id`, not the `_id` the
|
|
1736
1809
|
reference schema shows (that's the SDK's shape). Do this every time — the owner's inbox is a real
|
|
1737
1810
|
business inbox, and a probe left in it looks like a real enquiry. If a probe ever escapes, find it
|
|
1738
|
-
with `POST /form-submission-service/v4/submissions/namespace/query
|
|
1739
|
-
`namespace`.
|
|
1811
|
+
with `POST /form-submission-service/v4/submissions/namespace/query`, filtered by `formId` and
|
|
1812
|
+
`"namespace": "wix.form_app.form"`.
|
|
1740
1813
|
|
|
1741
1814
|
## 6 · Hand off
|
|
1742
1815
|
|
|
@@ -1745,8 +1818,9 @@ form, keyed by the form's name lowercased with each run of non-alphanumerics col
|
|
|
1745
1818
|
`_` (`"Quote request"` → `quote_request`):
|
|
1746
1819
|
|
|
1747
1820
|
```js
|
|
1748
|
-
// Written by the seed run once step 5 passed. Do not
|
|
1749
|
-
//
|
|
1821
|
+
// Written by the seed run once step 5 passed. Do not create it early: its existence is what proves
|
|
1822
|
+
// the form schemas were created AND verified. Its only later edit is a verified schema change —
|
|
1823
|
+
// see step 4b; never a hand-typed field.
|
|
1750
1824
|
export const WIX_FORMS = {
|
|
1751
1825
|
contact: { formId: "…", name: "Contact", targets: { email: true, message: true } },
|
|
1752
1826
|
};
|
|
@@ -72,16 +72,9 @@ fallback — a runtime error, or a field the snippets don't cover (see "Fallback
|
|
|
72
72
|
> the top of the file — read that, not the whole body, if you need the contract.
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
## STEP 2 — Theme
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`, `text-foreground`,
|
|
79
|
-
`bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg`, `font-display`). Those tokens
|
|
80
|
-
are **already set to the brand by the design phase**, so the shipped auth surfaces are themed with
|
|
81
|
-
zero work here. To adjust the palette, edit `index.css` (`:root` **and** `.dark`) — the base44 way;
|
|
82
|
-
**never add a parallel theme file (e.g. a `theme.css`) or restyle the shipped JSX.** Build the
|
|
83
|
-
Home/Header you add (STEP 3) from the **same** base44 tokens/classes so it matches automatically. A
|
|
84
|
-
dark brand is just base44's dark palette in `index.css` — no per-component work.
|
|
75
|
+
## STEP 2 — Theme
|
|
76
|
+
Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
|
|
77
|
+
share the same colors and typography.
|
|
85
78
|
|
|
86
79
|
## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
87
80
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
@@ -254,10 +247,9 @@ Members Area app:
|
|
|
254
247
|
|
|
255
248
|
Fallback only — when you hit an error or need something not shown here (password reset, custom SSO
|
|
256
249
|
connection ids, a profile field these snippets don't have): read the relevant shipped file under
|
|
257
|
-
`src/rest/`, or look it up via the
|
|
250
|
+
`src/rest/`, or look it up via the documentation skill available in your environment.
|
|
258
251
|
|
|
259
252
|
## Hard rules
|
|
260
|
-
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
261
253
|
- **Custom login only** — the member logs in on **your** UI; never redirect them to a Wix-hosted login page.
|
|
262
254
|
- **One shared client** — login swaps the token set on `wix-client.js`; reuse it for everything so the
|
|
263
255
|
member identity carries across the app. Never mint a second client or re-mint anonymously after login.
|
|
@@ -283,7 +275,6 @@ site's `metaSiteId` from the handoff / `ListWixSites`):
|
|
|
283
275
|
|
|
284
276
|
## Verify (before declaring done)
|
|
285
277
|
- [ ] Client files copied into `src/`; `WIX_CLIENT_ID` set (not the placeholder).
|
|
286
|
-
- [ ] Brand palette lives in `index.css` (`:root`/`.dark`); no parallel theme file; shipped components/pages not restyled or rewritten.
|
|
287
278
|
- [ ] Opened the vertical's data route(s) (not just the home page) — `/login` and `/account` — and confirmed the shipped components render themed (surface, text, brand) with images.
|
|
288
279
|
- [ ] `Layout` (fixed `<WixManageBanner/>` + `<Header/>` region, then `<Outlet/>` + Footer) wraps all routes; shipped `Login`/`Account`/`Callback` untouched; content clears the fixed chrome; `<MemberProvider>` wraps the tree; `<MemberMenu/>` in the header.
|
|
289
280
|
- [ ] Sign-up: `register()` reaches `SUCCESS` (or `REQUIRE_EMAIL_VERIFICATION` handled via the code entry).
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**Nothing to seed.** Members login is the identity layer: members **self-register** through the
|
|
4
4
|
Wix login page, so there is no member to create at build time and nothing lands in a `seeded`
|
|
5
|
-
map. There is intentionally no `seed-*.
|
|
5
|
+
map. There is intentionally no `seed-*.cjs` here.
|
|
6
6
|
|
|
7
7
|
The members work is entirely **frontend wiring** (custom login, account area, gated content) —
|
|
8
8
|
see this vertical's `INSTRUCTIONS.md` and the reference components.
|
|
9
9
|
|
|
10
10
|
_Optional, off by default:_ only if a run's prompt explicitly asks to exercise the pricing-plans
|
|
11
11
|
purchase path end-to-end, one test member may be created — keep this off so headless runs stay
|
|
12
|
-
deterministic and don't stall on an interactive login. If you need that, use the
|
|
13
|
-
skill for the current member-create shape (source: `wix-headless/references/SEED.md` § members).
|
|
12
|
+
deterministic and don't stall on an interactive login. If you need that, use the documentation skill available in your environment for the current member-create shape (source: `wix-headless/references/SEED.md` § members).
|
|
14
13
|
|
|
15
14
|
## Reference
|
|
16
15
|
Members self-register, so this vertical seeds nothing. These are the methods to read if you do reach
|
|
@@ -48,16 +48,9 @@ end). (Files missing? the install's `deploy` result lists what it wrote; re-run
|
|
|
48
48
|
`references/portfolio/app/` → `src/`.)
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
## STEP 2 — Theme
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`, `text-foreground`,
|
|
55
|
-
`bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg`, `font-display`). Those tokens
|
|
56
|
-
are **already set to the brand by the design phase**, so the shipped pages are themed with zero work
|
|
57
|
-
here. To adjust the palette, edit `index.css` (`:root` **and** `.dark`) — the base44 way; **never add
|
|
58
|
-
a parallel theme file (e.g. a `theme.css`) or restyle the shipped JSX.** Build the Home/Header you add
|
|
59
|
-
(STEP 3) from the **same** base44 tokens/classes so it matches automatically. A dark brand is just
|
|
60
|
-
base44's dark palette in `index.css` — no per-component work.
|
|
51
|
+
## STEP 2 — Theme
|
|
52
|
+
Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
|
|
53
|
+
share the same colors and typography.
|
|
61
54
|
|
|
62
55
|
## STEP 3 — Wire routes (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
63
56
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
@@ -196,12 +189,11 @@ Cover images live at `collection.coverImage.imageInfo.url` and `project.coverIma
|
|
|
196
189
|
|
|
197
190
|
Fallback only — when you hit an error or need something not shown here (collection SEO, portfolio
|
|
198
191
|
settings, a field these snippets don't have): read the relevant shipped file under `src/`, or look
|
|
199
|
-
it up via the
|
|
192
|
+
it up via the documentation skill available in your environment / the Portfolio API reference. Each helper in `wix-portfolio.js`
|
|
200
193
|
links its own reference page inline; the whole area is here:
|
|
201
194
|
- Portfolio (collections, projects, project items): https://dev.wix.com/docs/api-reference/business-solutions/portfolio.md
|
|
202
195
|
|
|
203
196
|
## Hard rules
|
|
204
|
-
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
205
197
|
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped
|
|
206
198
|
`Portfolio`/`CollectionPage`/`ProjectDetail` to add chrome.
|
|
207
199
|
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your
|
|
@@ -222,7 +214,6 @@ Seed collections and projects per `seed/SEED.md` — separate from this client b
|
|
|
222
214
|
|
|
223
215
|
## Verify (before declaring done)
|
|
224
216
|
- [ ] Client files copied into `src/`; `WIX_CLIENT_ID` set (not the placeholder).
|
|
225
|
-
- [ ] Brand palette lives in `index.css` (`:root`/`.dark`); no parallel theme file; shipped components/pages not restyled or rewritten.
|
|
226
217
|
- [ ] Opened the vertical's data route(s) (`/portfolio`, a collection, a project) — not just the home page — and confirmed the shipped components render themed (surface, text, brand) with images.
|
|
227
218
|
- [ ] `Layout` (fixed `<WixManageBanner/>` + `<Header/>` region, then `<Outlet/>` + Footer) wraps all
|
|
228
219
|
routes; shipped `Portfolio`/`CollectionPage`/`ProjectDetail` untouched; content clears the fixed chrome.
|
|
@@ -16,7 +16,7 @@ export default function ProjectMedia({ item }) {
|
|
|
16
16
|
}
|
|
17
17
|
if (item.type === "VIDEO") {
|
|
18
18
|
// resolutions[].url is the confirmed field; posters[0] is the poster (sub-shape not in the
|
|
19
|
-
// helper JSDoc — posters[0].url used here; confirm in
|
|
19
|
+
// helper JSDoc — posters[0].url used here; confirm in documentation skill available in your environment if a brand needs more).
|
|
20
20
|
const vi = item.video?.videoInfo;
|
|
21
21
|
const src = https(vi?.resolutions?.[0]?.url);
|
|
22
22
|
const poster = https(vi?.posters?.[0]?.url);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Portfolio — seeding
|
|
2
2
|
|
|
3
|
-
Seed a Wix Portfolio by **calling `seed-portfolio.
|
|
3
|
+
Seed a Wix Portfolio by **calling `seed-portfolio.cjs`** — don't hand-write the REST calls. It's
|
|
4
4
|
a build-time module (run via `exec_tool`, not shipped in the app) that abstracts every Wix
|
|
5
5
|
Portfolio seed operation. `require` it and call the functions with plain data.
|
|
6
6
|
|
|
@@ -17,11 +17,7 @@ first, then thread their real ids into each project.
|
|
|
17
17
|
```js
|
|
18
18
|
// build-time exec_tool
|
|
19
19
|
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
20
|
-
const
|
|
21
|
-
// exec_tool's require can return EMPTY exports for these build-time modules — load the file itself:
|
|
22
|
-
const seed = (() => { const m = { exports: {} };
|
|
23
|
-
new Function("module", "exports", "require", fs.readFileSync("/app/.agents/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js", "utf8"))(m, m.exports, require);
|
|
24
|
-
return m.exports; })();
|
|
20
|
+
const seed = require(require("path").resolve(".agents/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.cjs"));
|
|
25
21
|
const ctx = { token: accessToken, siteId: WIX_METASITE_ID };
|
|
26
22
|
|
|
27
23
|
const summary = await seed.setupPortfolio(ctx, {
|
|
@@ -79,7 +75,7 @@ hide. `setupPortfolio` **installs the Wix Portfolio app first** (`installPortfol
|
|
|
79
75
|
|
|
80
76
|
## Reference
|
|
81
77
|
If a call returns a shape you didn't expect, or you need an operation this module doesn't cover,
|
|
82
|
-
use the
|
|
78
|
+
use the documentation skill available in your environment to search + read the live Wix API reference — never guess. The
|
|
83
79
|
authoritative source recipe is `wix-headless/references/inline-recipes/setup-portfolio.md`.
|
|
84
80
|
|
|
85
81
|
**Transcribed from the recipe — NOT yet live-verified.** The endpoints/fields mirror
|
package/skills/wix-vibe-headless/references/portfolio/seed/{seed-portfolio.js → seed-portfolio.cjs}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
//
|
|
7
7
|
// Usage (build-time exec_tool):
|
|
8
8
|
// const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix"); // Base44
|
|
9
|
-
// const seed = require("/app/.agents/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.
|
|
9
|
+
// const seed = require("/app/.agents/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.cjs");
|
|
10
10
|
// const ctx = { token: accessToken, siteId: WIX_METASITE_ID };
|
|
11
11
|
//
|
|
12
12
|
// const collections = await seed.createCollections(ctx, [{ title, description }]); // STEP 1
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
// await seed.createProjectItems(ctx, [{ projectId: projects[0].id, sortOrder: 1, title, imageId: files[0].id, height:1024, width:1024 }]);
|
|
20
20
|
//
|
|
21
21
|
// **NOT yet live-verified — transcribed from setup-portfolio.md.** If any call fails with a
|
|
22
|
-
// shape the caller didn't expect, fall back to the
|
|
22
|
+
// shape the caller didn't expect, fall back to the documentation skill available in your environment (search + read the live Wix
|
|
23
23
|
// API reference) — never guess. Source recipe (authoritative):
|
|
24
24
|
// wix-headless/references/inline-recipes/setup-portfolio.md.
|
|
25
25
|
|
|
@@ -51,16 +51,9 @@ end). (Files missing? the install's `deploy` result lists what it wrote; re-run
|
|
|
51
51
|
`references/pricing-plans/app/` → `src/`.)
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
## STEP 2 — Theme
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`--muted`, `--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`,
|
|
58
|
-
`text-foreground`, `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg`,
|
|
59
|
-
`font-display`). Those tokens are **already set to the brand by the design phase**, so the shipped
|
|
60
|
-
pages are themed with zero work here. To adjust the palette, edit `index.css` (`:root` **and**
|
|
61
|
-
`.dark`) — the base44 way; **never add a parallel theme file (e.g. a `theme.css`) or restyle the
|
|
62
|
-
shipped JSX.** Build the Home/Header you add (STEP 3) from the **same** base44 tokens/classes so it
|
|
63
|
-
matches automatically. A dark brand is just base44's dark palette in `index.css` — no per-component work.
|
|
54
|
+
## STEP 2 — Theme
|
|
55
|
+
Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
|
|
56
|
+
share the same colors and typography.
|
|
64
57
|
|
|
65
58
|
## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
66
59
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
@@ -192,7 +185,7 @@ window.location.href = await checkout(plan.id, { thankYouPageUrl: `${window.loca
|
|
|
192
185
|
const orders = await getMyPlanOrders({ orderStatuses: ["ACTIVE"] }); // omit orderStatuses for all
|
|
193
186
|
|
|
194
187
|
// Plan image: plan.image is a WixMedia object { id, width, height, altText } with NO .url. The shipped
|
|
195
|
-
// cards render text only to avoid this. To show it, resolve the WixMedia `id` to a URL (
|
|
188
|
+
// cards render text only to avoid this. To show it, resolve the WixMedia `id` to a URL (documentation skill available in your environment),
|
|
196
189
|
// or omit — never <img src={plan.image}> / <img src={plan.image.url}> (undefined / [object Object]).
|
|
197
190
|
```
|
|
198
191
|
|
|
@@ -208,10 +201,9 @@ method, and body first (never guess):
|
|
|
208
201
|
- Headless redirect session: https://dev.wix.com/docs/api-reference/business-management/headless/redirects/create-redirect-session.md
|
|
209
202
|
|
|
210
203
|
Fallback only — when you hit an error or need something not shown here: read the relevant shipped
|
|
211
|
-
file under `src/`, or look it up via the
|
|
204
|
+
file under `src/`, or look it up via the documentation skill available in your environment.
|
|
212
205
|
|
|
213
206
|
## Hard rules
|
|
214
|
-
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
215
207
|
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped
|
|
216
208
|
`Plans`/`PlanDetail`/`MyPlans` to add chrome.
|
|
217
209
|
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your
|
|
@@ -233,7 +225,6 @@ in parallel.
|
|
|
233
225
|
|
|
234
226
|
## Verify (before declaring done)
|
|
235
227
|
- [ ] Client files copied into `src/`; `WIX_CLIENT_ID` set (not the placeholder).
|
|
236
|
-
- [ ] Brand palette lives in `index.css` (`:root`/`.dark`); no parallel theme file; shipped components/pages not restyled or rewritten.
|
|
237
228
|
- [ ] Opened the vertical's data route(s) (not just the home page) and confirmed the shipped
|
|
238
229
|
components render themed (surface, text, brand) with images.
|
|
239
230
|
- [ ] `Layout` (fixed `<WixManageBanner/>` + `<Header/>` region, then `<Outlet/>` + Footer) wraps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Member plan-order row — pure UI for the "My plans" screen. Renders only fields the Order object
|
|
2
2
|
// actually returns (planName, status, start/end dates); for anything else (amount paid, next-billing)
|
|
3
|
-
// look it up in the Orders API reference (
|
|
3
|
+
// look it up in the Orders API reference (documentation skill available in your environment) — never invent it. Styled with base44 design
|
|
4
4
|
// tokens (shadcn Tailwind classes).
|
|
5
5
|
|
|
6
6
|
// Each status carries its OWN text colour: a shared `text-primary-foreground` over a varying
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pricing Plans — seeding
|
|
2
2
|
|
|
3
|
-
Seed Wix Pricing Plans (Plans V3) by **calling `seed-pricing-plans.
|
|
3
|
+
Seed Wix Pricing Plans (Plans V3) by **calling `seed-pricing-plans.cjs`** — don't hand-write the
|
|
4
4
|
REST calls. It's a build-time module (run via `exec_tool`, not shipped in the app) that abstracts
|
|
5
5
|
every Pricing Plans + Benefit Programs seed operation. `require` it and call the functions with
|
|
6
6
|
plain data.
|
|
@@ -10,11 +10,7 @@ plain data.
|
|
|
10
10
|
```js
|
|
11
11
|
// build-time exec_tool
|
|
12
12
|
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
13
|
-
const
|
|
14
|
-
// exec_tool's require can return EMPTY exports for these build-time modules — load the file itself:
|
|
15
|
-
const seed = (() => { const m = { exports: {} };
|
|
16
|
-
new Function("module", "exports", "require", fs.readFileSync("/app/.agents/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js", "utf8"))(m, m.exports, require);
|
|
17
|
-
return m.exports; })();
|
|
13
|
+
const seed = require(require("path").resolve(".agents/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.cjs"));
|
|
18
14
|
const ctx = { token: accessToken, siteId: WIX_METASITE_ID };
|
|
19
15
|
|
|
20
16
|
// setupPricingPlans installs the Wix Pricing Plans app first (idempotent) — base44 sites may not have it.
|
|
@@ -74,7 +70,7 @@ is NOT a plan field or a perk). Those ids come from the **bookings seed**
|
|
|
74
70
|
|
|
75
71
|
## Reference
|
|
76
72
|
If a call returns a shape you didn't expect, or you need an operation this module doesn't cover,
|
|
77
|
-
use the
|
|
73
|
+
use the documentation skill available in your environment to search + read the live Wix API reference — never guess. The
|
|
78
74
|
authoritative source recipe is `wix-headless/references/inline-recipes/setup-pricing-plans.md`.
|
|
79
75
|
|
|
80
76
|
Read a method's page before writing its call: it carries the exact body shape, the required
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
//
|
|
8
8
|
// Usage (build-time exec_tool):
|
|
9
9
|
// const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix"); // Base44
|
|
10
|
-
// const seed = require("/app/.agents/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.
|
|
10
|
+
// const seed = require("/app/.agents/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.cjs");
|
|
11
11
|
// const ctx = { token: accessToken, siteId: WIX_METASITE_ID };
|
|
12
12
|
//
|
|
13
13
|
// // Bookings is seeded FIRST — its service ids feed a plan's coverage (see SEED.md).
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
// // Then, per plan that covers bookings services (STEP 2; skip entirely with no bookings):
|
|
21
21
|
// await seed.attachBookingsCoverage(ctx, plans[0].id, plans[0].coveredServiceIds);
|
|
22
22
|
//
|
|
23
|
-
// If any call fails with a shape the caller didn't expect, fall back to the
|
|
23
|
+
// If any call fails with a shape the caller didn't expect, fall back to the documentation skill available in your environment
|
|
24
24
|
// (search + read the live Wix API reference) — never guess. Source recipe (authoritative):
|
|
25
25
|
// wix-headless/references/inline-recipes/setup-pricing-plans.md.
|
|
26
26
|
|
|
@@ -51,17 +51,9 @@ end). (Files missing? the install's `deploy` result lists what it wrote; re-run
|
|
|
51
51
|
`references/restaurants/app/` → `src/`.)
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
## STEP 2 — Theme
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`--foreground`, `--card`, `--primary`, `--muted`, `--border`, `--radius`, `--font-*`) via shadcn
|
|
58
|
-
Tailwind classes (`bg-card`, `text-foreground`, `bg-primary`, `text-muted-foreground`,
|
|
59
|
-
`border-border`, `rounded-lg`, `font-display`). Those tokens are **already set to the brand by the
|
|
60
|
-
design phase**, so the shipped pages are themed with zero work here. To adjust the palette, edit
|
|
61
|
-
`index.css` (`:root` **and** `.dark`) — the base44 way; **never add a parallel theme file (e.g. a
|
|
62
|
-
`theme.css`) or restyle the shipped JSX.** Build the Home/Header you add (STEP 3) from the **same**
|
|
63
|
-
base44 tokens/classes so it matches automatically. A dark brand is just base44's dark palette in
|
|
64
|
-
`index.css` — no per-component work.
|
|
54
|
+
## STEP 2 — Theme
|
|
55
|
+
Use the existing Base44 theme in `src/index.css` so your pages and the shipped components
|
|
56
|
+
share the same colors and typography.
|
|
65
57
|
|
|
66
58
|
## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
67
59
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
@@ -217,7 +209,7 @@ Building something beyond the shipped pages, or need a path these snippets don't
|
|
|
217
209
|
Modifier up-charges / price-variant selection / special requests on the **cart line** are **not**
|
|
218
210
|
wired into `addItemToCart` — the restaurants `catalogReference.options` shape for these isn't
|
|
219
211
|
documented for client add-to-cart, so `ItemDialog` displays modifier groups for the diner but sends
|
|
220
|
-
only quantity. To wire them, confirm the shape via the
|
|
212
|
+
only quantity. To wire them, confirm the shape via the documentation skill available in your environment / the reference first,
|
|
221
213
|
never guess:
|
|
222
214
|
- Restaurants API reference: https://dev.wix.com/docs/api-reference/business-solutions/restaurants.md
|
|
223
215
|
- Sample flows (cart options): https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/sample-flows.md
|
|
@@ -226,10 +218,9 @@ never guess:
|
|
|
226
218
|
in lets them see their own order/reservation history.
|
|
227
219
|
|
|
228
220
|
Fallback only — when you hit an error or need something not shown here: read the relevant shipped
|
|
229
|
-
file under `src/`, or look it up via the
|
|
221
|
+
file under `src/`, or look it up via the documentation skill available in your environment.
|
|
230
222
|
|
|
231
223
|
## Hard rules
|
|
232
|
-
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
233
224
|
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped `Menu`/`Reservations` to add chrome.
|
|
234
225
|
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your `Header` is plain in-flow markup (not `position:fixed`).
|
|
235
226
|
- Order through the shipped cart: `addItem()` → `checkout()` (redirect-session) — never a hand-built `/checkout`, ordering, or reservation URL.
|
|
@@ -252,7 +243,6 @@ run in parallel.
|
|
|
252
243
|
|
|
253
244
|
## Verify (before declaring done)
|
|
254
245
|
- [ ] Client files copied into `src/`; `WIX_CLIENT_ID` set (not the placeholder).
|
|
255
|
-
- [ ] Brand palette lives in `index.css` (`:root`/`.dark`); no parallel theme file; shipped components/pages not restyled or rewritten.
|
|
256
246
|
- [ ] Opened `/menu` and `/reservations` (not just the home page) and confirmed the shipped components render themed (surface, text, brand) with images.
|
|
257
247
|
- [ ] `Layout` (fixed `<WixManageBanner/>` + `<Header/>` region, then `<Outlet/>` + Footer) wraps all routes; shipped `Menu`/`Reservations` untouched; content clears the fixed chrome; `<OrderCartProvider>` wraps the tree; `<OrderCartDrawer/>` mounted; `<OrderCartButton/>` in the header.
|
|
258
248
|
- [ ] `getFullMenu()` renders real sections/items with prices, variants, modifiers, and labels; empty catalog shows the shipped empty state (no mock items).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Restaurants — seeding
|
|
2
2
|
|
|
3
|
-
Seed a Wix Restaurants site by **calling `seed-restaurants.
|
|
3
|
+
Seed a Wix Restaurants site by **calling `seed-restaurants.cjs`** — don't hand-write the REST calls.
|
|
4
4
|
It's a build-time module (run via `exec_tool`, not shipped in the app) that abstracts every seed
|
|
5
5
|
operation across the vertical's four recipes: the **menu** (always) plus three on-demand add-ons —
|
|
6
6
|
**online ordering**, **table reservations**, and **experiences**. `require` it and call the functions
|
|
@@ -18,11 +18,7 @@ across exec calls. Online ordering and table reservations run only when the plan
|
|
|
18
18
|
```js
|
|
19
19
|
// build-time exec_tool
|
|
20
20
|
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
21
|
-
const
|
|
22
|
-
// exec_tool's require can return EMPTY exports for these build-time modules — load the file itself:
|
|
23
|
-
const seed = (() => { const m = { exports: {} };
|
|
24
|
-
new Function("module", "exports", "require", fs.readFileSync("/app/.agents/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js", "utf8"))(m, m.exports, require);
|
|
25
|
-
return m.exports; })();
|
|
21
|
+
const seed = require(require("path").resolve(".agents/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.cjs"));
|
|
26
22
|
const ctx = { token: accessToken, siteId: WIX_METASITE_ID };
|
|
27
23
|
|
|
28
24
|
const result = await seed.setupRestaurants(ctx, {
|
|
@@ -155,7 +151,7 @@ await seed.createExperiences(ctx, loc.id, [{ configuration: { /* per Create-Expe
|
|
|
155
151
|
|
|
156
152
|
## Reference
|
|
157
153
|
If a call returns a shape you didn't expect, or you need an operation this module doesn't cover, use the
|
|
158
|
-
|
|
154
|
+
documentation skill available in your environment to search + read the live Wix API reference — never guess. The **Experiences** create
|
|
159
155
|
payload especially lives in the docs (fields evolve). The authoritative source recipes are
|
|
160
156
|
`wix-headless/references/inline-recipes/setup-restaurants.md`, `setup-restaurant-orders.md`,
|
|
161
157
|
`setup-restaurant-reservations.md`, and `setup-restaurant-experiences.md`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
//
|
|
7
7
|
// Usage (build-time exec_tool):
|
|
8
8
|
// const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix"); // Base44 (generic: use $TOKEN)
|
|
9
|
-
// const seed = require("/app/.agents/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.
|
|
9
|
+
// const seed = require("/app/.agents/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.cjs");
|
|
10
10
|
// const ctx = { token: accessToken, siteId: WIX_METASITE_ID };
|
|
11
11
|
//
|
|
12
12
|
// // --- MENU (always; the seedable core) ---
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
//
|
|
39
39
|
// **NOT yet live-verified — transcribed from setup-restaurants.md / setup-restaurant-orders.md /
|
|
40
40
|
// setup-restaurant-reservations.md / setup-restaurant-experiences.md.** If any call fails with a
|
|
41
|
-
// shape the caller didn't expect, fall back to the
|
|
41
|
+
// shape the caller didn't expect, fall back to the documentation skill available in your environment (search + read the live Wix API
|
|
42
42
|
// reference) — never guess.
|
|
43
43
|
//
|
|
44
44
|
// ── PRECONDITIONS the recipes flag (record in the handoff, do NOT fail the seed) ─────────────────
|