@wix/agent-skills 1.31.2 → 1.32.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 +4 -12
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +39 -15
- package/skills/wix-app/references/BACKEND_API.md +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +11 -8
- package/skills/wix-app/references/SDK_MODULE_MAP.md +1 -1
- package/skills/wix-app/references/STORES_VERSIONING.md +24 -2
- package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +9 -13
- package/skills/wix-app/references/dashboard-page/IMAGE_RENDERING.md +61 -0
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +54 -64
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +14 -21
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +37 -30
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +43 -29
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +40 -39
- package/skills/wix-app/references/editor-react-component/PARTS.md +8 -6
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +22 -2
- package/skills/wix-app/scripts/scan-a11y-eslint.cjs +39 -16
- package/skills/wix-app/scripts/sdk-curated.json +45 -0
- package/skills/wix-app/scripts/sdk-lookup.cjs +1180 -0
- package/skills/wix-base44-connector/SKILL.md +4 -2
- package/skills/wix-base44-connector/scripts/utils.cjs +5 -2
- package/skills/wix-headless-kit/SKILL.md +4 -1
- package/skills/wix-headless-kit/guides/api-run.md +14 -20
- package/skills/wix-headless-kit/install/pins.json +1 -1
- package/skills/wix-manage/SKILL.md +30 -8
- package/skills/wix-manage/references/automations/actions.md +134 -0
- package/skills/wix-manage/references/automations/activation-status.md +64 -48
- package/skills/wix-manage/references/automations/api-catalog.md +213 -77
- package/skills/wix-manage/references/automations/automation-model.md +199 -0
- package/skills/wix-manage/references/automations/bracket-expressions.md +132 -0
- package/skills/wix-manage/references/automations/build-and-manage-automations.md +305 -26
- package/skills/wix-manage/references/automations/triggers.md +190 -0
- package/skills/wix-manage/references/collaborators/manage-site-collaborators.md +128 -0
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +3 -1
- package/skills/wix-manage/references/forms/read-forms-and-submissions.md +277 -0
- package/skills/wix-manage/references/forms/update-form.md +5 -0
- package/skills/wix-manage/references/seo/manage-url-redirects.md +33 -4
- package/skills/wix-manage/references/sites/create-headless-site.md +14 -5
- package/skills/wix-manage/references/sites/upload-static-site.md +373 -302
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +3 -3
|
@@ -17,6 +17,8 @@ Change what a form collects — **add a field, relabel one, tighten a rule, reor
|
|
|
17
17
|
|
|
18
18
|
## The call
|
|
19
19
|
|
|
20
|
+
**No `formId` yet** ("my contact form")? List the forms and pick it by `name`: `GET https://www.wixapis.com/form-schema-service/v4/forms?namespace=wix.form_app.form&fieldsets=METADATA` returns only names and IDs. That call skips disabled forms; if the form isn't there, call again with `&enabled=false`.
|
|
21
|
+
|
|
20
22
|
```bash
|
|
21
23
|
# 1 · read the form back: you need its current revision, and every field you intend to keep
|
|
22
24
|
curl -X GET \
|
|
@@ -40,6 +42,7 @@ curl -X PATCH \
|
|
|
40
42
|
|
|
41
43
|
- **⚠️ `namespace` is a REQUIRED query parameter on the read, and this is what a revise run trips over.** Without it the read returns `400 namespace has size 0, expected 10 or more, namespace must not be empty` — a violation naming a *field*, so it reads like a body problem. Fix the call, don't reshape the payload. (The filter on `POST .../v4/forms/query` needs it too.)
|
|
42
44
|
- **The read-back is the body.** Apply your change to what the `GET` returned and send that as `form`. `namespace` is **immutable** and travels along; **there is no `fieldMask`**, and no `revision` outside `form` — inventing either is a silent partial write.
|
|
45
|
+
- **⚠️ Delete the legacy `fields` array before you send.** The read-back carries `fields` (the old field list) next to `formFields`. Send both and the old list wins: the `PATCH` returns `200` and bumps `revision`, but a field you added only to `formFields` is dropped, and only its layout item is kept. Spreading the whole form (`{ ...form, formFields }`) does exactly this. Remove `fields` and `deletedFields` first: `const { fields, deletedFields, ...body } = form`.
|
|
43
46
|
- **⚠️ Append to `formFields`; never rebuild the entries you read.** `[...form.formFields, newField]` works. Mapping the array to "clean up" each field — dropping `fieldType`, re-shaping an options block — fails with `fieldType cannot be provided with any these fields: input_options, display_options` on **every** field at once. The read-back's field objects are already a valid write shape: pass them through untouched and touch only the one field you are changing.
|
|
44
47
|
- **`formFields` is replaced wholesale.** Wix: *"Any field that's missing from the array you send is moved to `deletedFormFields`, so resend every field you want to keep."* Same for `steps[].layout` — miss an item and that field goes unplaced, which renders empty. Drops are recoverable from `deletedFormFields`, but nothing announces them.
|
|
45
48
|
- **A stale `revision` is rejected** — re-`GET` and re-apply; never guess or increment it.
|
|
@@ -108,6 +111,7 @@ Then hand back the dashboard links ([Forms Dashboard Navigation](./forms-dashboa
|
|
|
108
111
|
| `fieldType cannot be provided with any these fields: input_options, display_options` — on every field | The read-back's `formFields` were re-mapped or "cleaned" before sending | Send the fields exactly as read and append the new one: `[...form.formFields, newField]` |
|
|
109
112
|
| `inputType enum must be in [UNKNOWN_INPUT_TYPE, STRING, NUMBER, …]` | An invented `inputType` such as `ENUM` (with an `enumOptions` block) for a choice field | A dropdown or radio is `inputType: "STRING"` with `stringOptions.componentType`; multi choice is `ARRAY` |
|
|
110
113
|
| The `PATCH` is rejected for a `revision` mismatch | Someone (or an earlier call) updated the form since your read | Re-`GET` and re-apply the change; never increment the revision yourself |
|
|
114
|
+
| The `PATCH` returns `200` and bumps `revision`, but the new field is missing from the read-back (its layout item is there) | The body still carried the legacy `fields` array from the read-back, and the server applied that old list | Remove `fields` and `deletedFields` from the body, re-`GET`, and send again. Don't retry the same body |
|
|
111
115
|
| Fields that were on the form are gone after the update | `formFields` was sent partial — the omitted fields moved to `deletedFormFields` | Re-send them in a further `PATCH`, from `deletedFormFields` in the read-back; always send the whole array |
|
|
112
116
|
| Surviving fields render empty for the owner | `steps[].layout` was sent without their items | Re-send every layout item, including `SUBMIT_BUTTON`'s; re-verify with `/summary` |
|
|
113
117
|
| The added dropdown/radio reads back as a text input with `textInputOptions` | `identifier` was `TEXT_INPUT` rather than the choice kind — `componentType` alone doesn't route the renderer | Set `identifier` to the choice kind and re-send. Deleting and re-adding the field with the same `identifier` reproduces it ([Create Form](./create-form.md) § Choice fields) |
|
|
@@ -118,6 +122,7 @@ Then hand back the dashboard links ([Forms Dashboard Navigation](./forms-dashboa
|
|
|
118
122
|
|
|
119
123
|
## Related Documentation
|
|
120
124
|
|
|
125
|
+
- [Read Forms and Submissions](./read-forms-and-submissions.md) — finding the form to update when you have no `formId` yet
|
|
121
126
|
- [Create Form](./create-form.md) — composing fields, the identifier table, choice fields, the layout rules, plan caps
|
|
122
127
|
- [Forms Dashboard Navigation](./forms-dashboard-navigation.md) — the builder and submissions links to hand back
|
|
123
128
|
- [Update Form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/update-form) — the `PATCH` contract and its replace semantics
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Manage URL Redirects on a Wix Site"
|
|
3
|
-
description: "Retrieve, create, and delete URL redirects on a Wix site using the public SEO Redirects API. Covers exact and group redirects, language-scoped redirects for multilingual sites,
|
|
3
|
+
description: "Retrieve, create, and delete URL redirects on a Wix site using the public SEO Redirects API. Covers exact and group redirects, language-scoped redirects for multilingual sites, bulk creates of up to 100 and bulk deletes of up to 500, and the change flow for a redirect that already exists. This API has no query, search, or update method: List Redirects is the only read-many. Redirects do not chain, so creating one that points at a path another redirect starts from permanently deletes that other redirect; list and check before every write."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Manage URL Redirects on a Wix Site
|
|
@@ -72,6 +72,12 @@ directly - do not go looking for the shapes in the docs first.
|
|
|
72
72
|
| Bulk Create Redirects | `POST /bulk/redirects/create` |
|
|
73
73
|
| Bulk Delete Redirects | `POST /bulk/redirects/delete` |
|
|
74
74
|
|
|
75
|
+
**`POST /redirects` is not Create Redirect.** It looks like the standard create
|
|
76
|
+
path, but it is not part of this API and rejects a `{ "redirect": ... }` body
|
|
77
|
+
with a 400. Create one redirect with `POST /create-redirect` and many with
|
|
78
|
+
`POST /bulk/redirects/create`. Do not build any other path from the method
|
|
79
|
+
names: `/list-redirects` and `/redirects/query` return 404.
|
|
80
|
+
|
|
75
81
|
Create Redirect takes the redirect nested under `redirect`. `options` and
|
|
76
82
|
`language` are optional, `id` only when preserving an existing redirect's
|
|
77
83
|
identity:
|
|
@@ -185,7 +191,7 @@ count as the same path.
|
|
|
185
191
|
|
|
186
192
|
**There is no query endpoint and no search endpoint.** Most Wix APIs have one, so
|
|
187
193
|
this is the second place an agent goes wrong. Do not call, construct, or go
|
|
188
|
-
looking for `POST /v1/redirects/query`, a `/search` path, or any filtered variant:
|
|
194
|
+
looking for `POST /v1/redirects/query`, `/list-redirects`, a `/search` path, or any filtered variant:
|
|
189
195
|
they do not exist, and trying one wastes a turn and returns nothing useful.
|
|
190
196
|
|
|
191
197
|
- **List Redirects** returns every redirect on the site in one response. It takes
|
|
@@ -213,8 +219,9 @@ redirect is not in effect, and if the create fails the old redirect is gone.
|
|
|
213
219
|
|
|
214
220
|
## Batches
|
|
215
221
|
|
|
216
|
-
**Bulk Create Redirects** and **Bulk Delete Redirects**
|
|
217
|
-
|
|
222
|
+
**Bulk Create Redirects** takes 1 to 100 redirects and **Bulk Delete Redirects**
|
|
223
|
+
takes 1 to 500 IDs. A larger list is rejected as a whole with a 400, so split it
|
|
224
|
+
first. Both report each item separately **inside a successful response**:
|
|
218
225
|
|
|
219
226
|
- Read every outcome from `results[].itemMetadata`, matched to your request by
|
|
220
227
|
`originalIndex`. A failed item carries `error.code`, such as `FROM_URL_EXISTS`
|
|
@@ -225,6 +232,28 @@ report each one separately **inside a successful response**:
|
|
|
225
232
|
- A malformed request, such as an empty list, is rejected as a whole with a 400
|
|
226
233
|
and returns no per-item results.
|
|
227
234
|
|
|
235
|
+
There is no import endpoint. To migrate a list of old URLs, such as a CSV from
|
|
236
|
+
another platform, follow this path and nothing else:
|
|
237
|
+
|
|
238
|
+
1. Parse the whole list before any call. Skip the header row, trim whitespace,
|
|
239
|
+
and drop exact duplicate rows. Each row is one exact redirect unless the user
|
|
240
|
+
asked for a whole section.
|
|
241
|
+
2. Call **List Redirects** once and run the checks above against every row. If
|
|
242
|
+
either check matches any row, the same rule applies as for a single create:
|
|
243
|
+
name every row and every existing redirect at stake, end your turn without
|
|
244
|
+
writing, and continue only after the user answers. A row whose `to` equals an
|
|
245
|
+
existing redirect's `from` is the dangerous one - Bulk Create deletes that
|
|
246
|
+
redirect with no error to catch afterwards. If nothing matched, continue in
|
|
247
|
+
the same turn.
|
|
248
|
+
3. Split the rows into chunks of 100 and call **Bulk Create Redirects** once per
|
|
249
|
+
chunk, in order. 250 rows is three calls: 100, 100, then 50.
|
|
250
|
+
4. Read each chunk's `results[].itemMetadata` and keep a running count. Never
|
|
251
|
+
delete a redirect that reported success in order to create it again, and
|
|
252
|
+
never resend a chunk that succeeded. A success with no `id` means the same
|
|
253
|
+
redirect was already on the site, not that the write was lost.
|
|
254
|
+
5. Report the total from those results. Call List Redirects again only if
|
|
255
|
+
`bulkActionMetadata.undetailedFailures` was not `0`.
|
|
256
|
+
|
|
228
257
|
Two more sharp edges to report truthfully:
|
|
229
258
|
|
|
230
259
|
- A successful **Bulk Delete** item means the deletion was found and sent, not
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Create Headless Site"
|
|
3
|
-
description: Creates a Wix Headless website: a site in the user's Wix account whose frontend is files uploaded to Wix hosting, with the Wix business backend behind it through APIs.
|
|
3
|
+
description: Creates a Wix Headless website: a site in the user's Wix account whose frontend is files uploaded to Wix hosting, with the Wix business backend behind it through APIs. The site is created and its pages put live by Upload a Website or HTML Files; a Wix Business Solution (a store, blog, bookings and more) is then integrated into it by the Wix Headless kit, from its cold start.
|
|
4
4
|
---
|
|
5
5
|
# Create Headless Site
|
|
6
6
|
|
|
7
7
|
A Wix Headless site is a site in the user's Wix account whose frontend is files
|
|
8
8
|
uploaded to Wix hosting and served at a `*.wix-site-host.com` URL, with the Wix
|
|
9
|
-
business backend (stores, bookings, forms, a CMS) behind it through APIs.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
business backend (stores, bookings, forms, a CMS) behind it through APIs. It comes
|
|
10
|
+
to be in two steps:
|
|
11
|
+
|
|
12
|
+
1. **Create the site and put its pages live**: [Upload a Website or HTML Files](upload-static-site.md),
|
|
13
|
+
online at https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md.
|
|
14
|
+
It holds the call that creates the site, then uploads the pages, the user's or
|
|
15
|
+
ones you write, and changes them later on the same site and URL.
|
|
16
|
+
2. **Integrate Wix Headless into it**: a Wix Business Solution built on shipped code (a
|
|
17
|
+
store, a blog, bookings, events, a CMS, forms, members and more, with its pages,
|
|
18
|
+
data layer and seed) comes from the Wix Headless kit, starting at its cold start,
|
|
19
|
+
https://www.wix.com/skills/headless-cold-start/headless-kit.md. It takes a machine
|
|
20
|
+
from nothing (the skills, the Wix CLI sign-in) to a built, seeded, released site on
|
|
21
|
+
the same site and URL; the upload recipe says how to run it with no shell of your own.
|