@wix/agent-skills 1.16.3 → 1.17.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.
Files changed (55) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +134 -127
  3. package/skills/wix-app/references/SITE_PLUGIN.md +2 -2
  4. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
  5. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
  6. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +92 -48
  7. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +15 -6
  8. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
  9. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +29 -42
  10. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +153 -449
  11. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +53 -29
  12. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
  13. package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
  14. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
  15. package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +11 -3
  16. package/skills/wix-app/references/editor-react-component/PARTS.md +46 -24
  17. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
  18. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
  19. package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
  20. package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
  21. package/skills/wix-base44-connector/SKILL.md +34 -17
  22. package/skills/wix-base44-connector/scripts/utils.js +33 -25
  23. package/skills/wix-headless/entry/bootstrap.mjs +9 -2
  24. package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
  25. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +42 -23
  26. package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
  27. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
  28. package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
  29. package/skills/wix-manage/SKILL.md +11 -1
  30. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
  31. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
  32. package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
  33. package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
  34. package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
  35. package/skills/wix-manage/references/sites/query-sites.md +72 -161
  36. package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
  37. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -9
  38. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +10 -7
  39. package/skills/wix-vibe-headless/platforms/base44.md +13 -10
  40. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +2 -0
  41. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
  42. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
  43. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
  44. package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
  45. package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
  46. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +15 -8
  47. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
  48. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
  49. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
  50. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
  51. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
  52. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -516
  53. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
  54. package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
  55. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
@@ -0,0 +1,250 @@
1
+ ---
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, batches 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
+ ---
5
+
6
+ # Manage URL Redirects on a Wix Site
7
+
8
+ Use the public **SEO Redirects API** to manage where a Wix site sends visitors who
9
+ request an old or moved URL. The API selects the site from the caller's
10
+ authorization context.
11
+
12
+ If the run already identifies a site - one connected site, or a site ID supplied
13
+ by the environment - use it and continue. Ask which site only when several are
14
+ available and nothing in the request or the context picks one. Do not stop to ask
15
+ for a site ID the API never takes.
16
+
17
+ A redirect returns a 301 permanent redirect, takes effect on the live site
18
+ immediately with no site publish, and **takes precedence over a real page at the
19
+ same path**. Creating a redirect from a path that still serves a page makes that
20
+ page unreachable until the redirect is deleted.
21
+
22
+ ## Redirects do not chain, they replace
23
+
24
+ This is the single most important thing to know, and it is not what most agents
25
+ assume. If an existing redirect **starts at** the path your new redirect points
26
+ to, the two do not form a chain. The existing one is **deleted**, and your create
27
+ proceeds.
28
+
29
+ So with `/blog` -> `/news` already on the site, creating `/old-blog` -> `/blog`
30
+ does **not** produce `/old-blog` -> `/blog` -> `/news`. It produces
31
+ `/old-blog` -> `/blog`, and `/blog` -> `/news` is gone for good. Never describe
32
+ the result as a chain, a hop, or a redirect sequence.
33
+
34
+ ## Run this check before every create
35
+
36
+ Do not skip it because the user's request was explicit. The user asking for a
37
+ redirect is not the same as the user agreeing to lose a different one.
38
+
39
+ 1. Call **List Redirects**.
40
+ 2. Compare the redirect you are about to create against every existing one:
41
+ - an existing redirect whose `from` equals your new `to` **will be deleted**
42
+ (loop resolution, described above);
43
+ - an existing redirect whose `from` equals your new `from` means your create
44
+ **fails** with `FROM_URL_EXISTS` and writes nothing.
45
+ - Paths differing only by a trailing slash count as equal for both checks.
46
+ 3. **If either matched, end your turn without writing.** Name the exact redirect
47
+ at stake and what happens to it, then stop and wait for the user's answer.
48
+
49
+ This is a rule about turn structure, not about intent: **never put a create in
50
+ the same response as the List Redirects that found the conflict.** Reporting
51
+ the conflict and creating the redirect anyway is the failure this rule exists
52
+ to prevent - the user cannot answer a question you already acted on. If your
53
+ next action after listing is a write, you have skipped this step.
54
+ 4. If neither matched, no deletion is possible: create it in the same turn and
55
+ report the result. Do not ask permission you do not need.
56
+
57
+ `options.forceReplace` is the only way to overwrite a taken `from` path, and it
58
+ **deletes** the redirect holding it. Never set it on your own initiative. Offer it
59
+ only after reporting the conflict, and only if the user asks to replace.
60
+
61
+ ## The six methods and their request shapes
62
+
63
+ Every path is under `https://www.wixapis.com/seo-redirects-service/v1`. Use these
64
+ directly - do not go looking for the shapes in the docs first.
65
+
66
+ | Method | Call |
67
+ |---|---|
68
+ | List Redirects | `GET /redirects` - no body, no parameters |
69
+ | Get Redirect | `GET /redirects/{redirectId}` |
70
+ | Create Redirect | `POST /create-redirect` - body below |
71
+ | Delete Redirect | `DELETE /redirects/{redirectId}` - empty response |
72
+ | Bulk Create Redirects | `POST /bulk/redirects/create` |
73
+ | Bulk Delete Redirects | `POST /bulk/redirects/delete` |
74
+
75
+ Create Redirect takes the redirect nested under `redirect`. `options` and
76
+ `language` are optional, `id` only when preserving an existing redirect's
77
+ identity:
78
+
79
+ ```json
80
+ {
81
+ "redirect": {
82
+ "from": "/old-blog",
83
+ "to": "/blog",
84
+ "options": { "groupRedirect": true },
85
+ "language": "fr"
86
+ }
87
+ }
88
+ ```
89
+
90
+ The two bulk methods take flat lists. Bulk Create's `returnFullEntity` returns
91
+ each created redirect in `results[].item`:
92
+
93
+ ```json
94
+ { "redirects": [ { "from": "/old-pricing", "to": "/pricing" } ], "returnFullEntity": true }
95
+ ```
96
+
97
+ ```json
98
+ { "redirectIds": ["5b07d9de-6a9f-494d-8066-a7b66c970270"] }
99
+ ```
100
+
101
+ ## Worked example: the request that deletes something
102
+
103
+ The user asks to send `/old-blog` and everything under it to `/blog`.
104
+
105
+ **1. List first.**
106
+
107
+ ```
108
+ GET https://www.wixapis.com/seo-redirects-service/v1/redirects
109
+ ```
110
+
111
+ ```json
112
+ {
113
+ "redirects": [
114
+ {
115
+ "id": "583fe7d7-2944-436f-870a-09eb6d2e52fa",
116
+ "from": "/blog",
117
+ "to": "/news",
118
+ "createdDate": "2026-08-20T09:12:44.000Z"
119
+ }
120
+ ]
121
+ }
122
+ ```
123
+
124
+ **2. Compare.** The new `to` is `/blog`, and an existing redirect's `from` is
125
+ `/blog`. That is the deletion case. **End the turn here** - report that creating
126
+ this redirect deletes `/blog` -> `/news` permanently, and that the two will not
127
+ chain, then wait.
128
+
129
+ **3. Only after the user agrees**, create it:
130
+
131
+ ```
132
+ POST https://www.wixapis.com/seo-redirects-service/v1/create-redirect
133
+ ```
134
+
135
+ ```json
136
+ { "redirect": { "from": "/old-blog", "to": "/blog", "options": { "groupRedirect": true } } }
137
+ ```
138
+
139
+ ```json
140
+ {
141
+ "redirect": {
142
+ "id": "9c4a1f2e-77b0-4b13-a2c8-6e0d3f5b8a91",
143
+ "from": "/old-blog",
144
+ "to": "/blog",
145
+ "options": { "groupRedirect": true }
146
+ }
147
+ }
148
+ ```
149
+
150
+ `/blog` -> `/news` is now gone. Say so - do not report it as still in place, and
151
+ do not describe the result as `/old-blog` -> `/blog` -> `/news`.
152
+
153
+ ## When a write fails
154
+
155
+ Report the failure and stop. Do **not** retry with a different request shape, a
156
+ different path, `forceReplace` added, or a bulk call in place of a single one. A
157
+ failed create wrote nothing, so there is nothing to clean up, and a mutated retry
158
+ is a second attempt at a decision the user has not agreed to.
159
+
160
+ On the first `403` or `PERMISSION_DENIED`, stop and report the missing
161
+ authorization for managing SEO settings. Do not try another site, path, or method.
162
+
163
+ ## Choose exact or group
164
+
165
+ | User intent | Setting |
166
+ |---|---|
167
+ | "Redirect this one URL" | omit `options`, or `options.groupRedirect: false` |
168
+ | "Redirect this section", "everything under /blog" | `options.groupRedirect: true` |
169
+
170
+ A group redirect carries the rest of the URL over to the target: from
171
+ `/forum/questions/` to `/forum/faqs/` sends `/forum/questions/my-post` to
172
+ `/forum/faqs/my-post`. An exact and a group redirect that share a `from` path are
173
+ two different redirects.
174
+
175
+ For a multilingual site, set `language` to apply the redirect to one language
176
+ only; omit it to apply to every language. A language-scoped path is stored
177
+ **without** the language prefix, so `/fr/about` with `language: "fr"` comes back
178
+ as `/about`. Deleting a language-scoped redirect stops it working but it can
179
+ still appear in List Redirects.
180
+
181
+ `from` cannot be the site root, and two paths differing only by a trailing slash
182
+ count as the same path.
183
+
184
+ ## Read: List Redirects is the only way to read many
185
+
186
+ **There is no query endpoint and no search endpoint.** Most Wix APIs have one, so
187
+ 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:
189
+ they do not exist, and trying one wastes a turn and returns nothing useful.
190
+
191
+ - **List Redirects** returns every redirect on the site in one response. It takes
192
+ no filter, sort, cursor, or paging parameter at all. Filter, sort, and slice the
193
+ returned array yourself. It also returns redirects Wix created for the site
194
+ owner, such as when a page's URL slug was renamed in the editor.
195
+ - **Get Redirect** retrieves one by ID.
196
+
197
+ ## Change an existing redirect
198
+
199
+ There is **no update method**, and as above no query method. To change a redirect:
200
+
201
+ 1. Call **Get Redirect** and keep the whole response.
202
+ 2. Call **Delete Redirect** with the same ID.
203
+ 3. Call **Create Redirect** with every field you retrieved, with your change applied.
204
+
205
+ Carry the whole redirect across, not only what changed. Create Redirect fills an
206
+ omitted field with its default rather than the previous value, so dropping
207
+ `options` turns a group redirect into an exact one and dropping `language` turns a
208
+ language-scoped redirect into a global one. Keep `id` to preserve the redirect's
209
+ identity, or omit it for a new one.
210
+
211
+ Confirm with the user before step 2: between the delete and the create the
212
+ redirect is not in effect, and if the create fails the old redirect is gone.
213
+
214
+ ## Batches
215
+
216
+ **Bulk Create Redirects** and **Bulk Delete Redirects** take 1 to 500 items and
217
+ report each one separately **inside a successful response**:
218
+
219
+ - Read every outcome from `results[].itemMetadata`, matched to your request by
220
+ `originalIndex`. A failed item carries `error.code`, such as `FROM_URL_EXISTS`
221
+ or `REDIRECT_NOT_FOUND`.
222
+ - `bulkActionMetadata.undetailedFailures` counts items whose outcome is
223
+ **unknown**: they carry no error and may or may not have been written. Call
224
+ List Redirects to find out. Never report them as successes.
225
+ - A malformed request, such as an empty list, is rejected as a whole with a 400
226
+ and returns no per-item results.
227
+
228
+ Two more sharp edges to report truthfully:
229
+
230
+ - A successful **Bulk Delete** item means the deletion was found and sent, not
231
+ confirmed. Call List Redirects if the user needs confirmation.
232
+ - Bulk Create is **not atomic**. If an item's conflicting or loop-causing
233
+ redirect is deleted and the write then fails, the deleted redirect is gone and
234
+ nothing replaces it. Repeating the same request recreates it.
235
+
236
+ Creating a redirect identical to one already on the site changes nothing and
237
+ succeeds: Create Redirect echoes the request back without an `id` or
238
+ `createdDate`, and Bulk Create reports success with no `id`. Do not present that
239
+ as a newly created redirect.
240
+
241
+ ## Reading errors
242
+
243
+ - On a 400, read `details.validationError.fieldViolations` and report the named
244
+ field rather than guessing.
245
+ - **Known divergence:** the reference documents `REDIRECT_NOT_FOUND` for an
246
+ unknown redirect ID on Get Redirect and Delete Redirect. The API currently
247
+ returns a generic 404 without that code. Treat any 404 on those two methods as
248
+ "no redirect with that ID", and do not tell the user the ID was valid.
249
+ - No webhook or event is emitted when a redirect is created or deleted. Never
250
+ treat the absence of an event as the absence of a change.
@@ -1,173 +1,58 @@
1
1
  ---
2
2
  name: "Query Sites"
3
- description: Lists and queries all sites associated with a Wix account using the Sites API. Covers filtering, sorting, and cursor-based pagination.
3
+ description: List, count, and find the sites in a Wix account. Covers the namespace filter for headless sites, counting before enumerating, cursor pagination, and resolving a site by name.
4
4
  ---
5
5
  # Query Sites
6
6
 
7
- This recipe demonstrates how to list and query the sites associated with a Wix account.
7
+ List, count, and find the sites in a Wix account.
8
8
 
9
- ## Prerequisites
9
+ - **Auth**: account-level (a Wix user token, or an account-level API key). `wix token` prints one.
10
+ - **Permission**: `SITE_LIST.READ` (scope `SCOPE.ACC-DC-OS.READ-SITE`).
11
+ - **Endpoints**: list `POST https://www.wixapis.com/site-list/v2/sites/query` · count
12
+ `POST https://www.wixapis.com/site-list/v2/sites/count`.
10
13
 
11
- - Account-level API access (authenticated as a Wix user or using an account-level API key)
12
- - Permission `SITE_LIST.READ` (scope `SCOPE.ACC-DC-OS.READ-SITE`)
14
+ ## Include headless sites — filter by `namespace`
13
15
 
14
- ## Required APIs
16
+ Both endpoints see only `WIX`-namespace sites by default; **headless sites** (anything built on a
17
+ connected OAuth app) are silently excluded. Filter on both namespaces to see everything:
15
18
 
16
- - **Query Sites API**: [REST](https://dev.wix.com/docs/api-reference/account-level/sites/sites/query-sites)
17
-
18
- > Returns up to **100** sites per request. Use cursor paging (below) to retrieve more.
19
-
20
- ---
21
-
22
- ## Query Sites
23
-
24
- **Endpoint**: `POST https://www.wixapis.com/site-list/v2/sites/query`
25
-
26
- The request takes a `query` object that supports `filter`, `sort`, and `cursorPaging`.
27
-
28
- **Request Body**:
29
- ```json
30
- {
31
- "query": {
32
- "filter": { "editorType": "EDITOR" },
33
- "sort": [{ "fieldName": "createdDate", "order": "ASC" }],
34
- "cursorPaging": { "limit": 50 }
35
- }
36
- }
37
- ```
38
-
39
- All three fields are optional — `{ "query": { "cursorPaging": { "limit": 50 } } }` lists every site.
40
-
41
- **Request**:
42
19
  ```bash
43
- curl -X POST \
44
- 'https://www.wixapis.com/site-list/v2/sites/query' \
45
- -H 'Authorization: <AUTH>' \
46
- -H 'Content-Type: application/json' \
47
- -d '{
48
- "query": {
49
- "filter": { "editorType": "EDITOR" },
50
- "sort": [{ "fieldName": "createdDate", "order": "ASC" }],
51
- "cursorPaging": { "limit": 50 }
52
- }
53
- }'
54
- ```
55
-
56
- ---
57
-
58
- ## Response Structure
59
-
60
- The response has the sites array plus **two** paging objects: a top-level `cursorPaging`
61
- (echoes the applied limit and the next cursor) and `metadata` (count, `cursors.next`, `hasNext`).
62
-
63
- > ⚠️ There is **no** `pagingMetadata` field. Read paging info from `metadata`.
64
-
65
- ```json
66
- {
67
- "sites": [
68
- {
69
- "id": "f6061c5f-6aa3-42f8-8822-36a4981dabb2",
70
- "htmlAppId": "70df538d-906c-44ca-9f27-c186b62f2b2b",
71
- "name": "my-site-47",
72
- "displayName": "My Site 47",
73
- "createdDate": "2023-02-01T14:56:09.831Z",
74
- "updatedDate": "2026-06-22T03:55:49.031Z",
75
- "published": true,
76
- "premium": false,
77
- "viewUrl": "https://username.wixsite.com/my-site-47",
78
- "editUrl": "/editor/f6061c5f-6aa3-42f8-8822-36a4981dabb2?editorSessionId=...",
79
- "thumbnail": "/site-thumbnail/f6061c5f-6aa3-42f8-8822-36a4981dabb2",
80
- "ownerAccountId": "e6a89eda-d100-4b2d-8a47-3040e2134497",
81
- "contributorAccountIds": [],
82
- "editorType": "EDITOR",
83
- "blocked": false,
84
- "namespace": "WIX",
85
- "domainConnected": false,
86
- "parentChildRole": "NONE"
87
- }
88
- ],
89
- "cursorPaging": {
90
- "limit": 50,
91
- "cursor": "<cursor-for-next-page>"
92
- },
93
- "metadata": {
94
- "count": 50,
95
- "cursors": {
96
- "next": "<cursor-for-next-page>"
97
- },
98
- "hasNext": true
99
- }
100
- }
20
+ curl -X POST 'https://www.wixapis.com/site-list/v2/sites/query' \
21
+ -H 'Authorization: <ACCOUNT_TOKEN>' -H 'Content-Type: application/json' \
22
+ -d '{ "query": { "filter": { "namespace": { "$in": ["WIX", "HEADLESS"] } }, "cursorPaging": { "limit": 100 } } }'
101
23
  ```
102
24
 
103
- ### Site object fields
104
-
105
- Each entry in `sites` has these fields (from the `Site` schema):
106
-
107
- | Field | Type | Notes |
108
- |---|---|---|
109
- | `id` | string | Site ID — use for site-level API calls |
110
- | `htmlAppId` | string | Internal HTML app ID |
111
- | `name` | string | URL slug / internal name |
112
- | `displayName` | string | Human-readable site name |
113
- | `createdDate` / `updatedDate` | datetime | |
114
- | `trashedDate` | datetime | Present only if the site is in the trash |
115
- | `published` | boolean | Whether the site is published |
116
- | `premium` | boolean | Whether the site has a Wix Premium (paid) plan |
117
- | `viewUrl` | string | Public site address; empty string when unpublished. **There is no `siteUrl` field.** |
118
- | `editUrl` | string | Relative editor path; prefix with `https://manage.wix.com` to open |
119
- | `thumbnail` | string | Relative thumbnail path |
120
- | `ownerAccountId` | string | |
121
- | `contributorAccountIds` | string[] | |
122
- | `editorType` | string | e.g. `EDITOR`, `ODEDITOR` — also a valid `filter` field |
123
- | `blocked` | boolean | |
124
- | `folderId` / `parentId` | string | Set for sites organized in folders / parent-child setups |
125
- | `namespace` | string | e.g. `WIX` |
126
- | `domainConnected` | boolean | |
127
- | `parentChildRole` | string | e.g. `NONE` |
25
+ `query` takes optional `filter`, `sort` (e.g. `[{ "fieldName": "createdDate", "order": "DESC" }]`),
26
+ and `cursorPaging` (max `limit` 100).
128
27
 
129
- ---
28
+ ## Count before you enumerate
130
29
 
131
- ## Pagination
30
+ An account can hold thousands of sites. To find one by name, search (see "Find a site by name")
31
+ rather than enumerate. To walk the whole list, count first and decide whether that's worth it:
132
32
 
133
- Cursor-based. Read the next cursor from `metadata.cursors.next` and stop when
134
- `metadata.hasNext` is `false`.
33
+ ```bash
34
+ curl -X POST 'https://www.wixapis.com/site-list/v2/sites/count' \
35
+ -H 'Authorization: <ACCOUNT_TOKEN>' -H 'Content-Type: application/json' \
36
+ -d '{ "filter": { "namespace": { "$in": ["WIX", "HEADLESS"] } } }' # → { "count": 1335 }
37
+ ```
135
38
 
136
- > The cursor does **not** carry the page limit, and it already encodes the filter/sort
137
- > from the first request. On follow-up pages send **only** the cursor (plus `limit` if you
138
- > want a non-default page size) — do **not** repeat `filter` or `sort`.
39
+ Enumerating costs **~0.7s per 100 sites** (100 → ~0.7s, 500 → ~3.4s, ~1,300 → ~9s). For a large
40
+ count, render the first N sites with a "…and N more" note instead of fetching all of them.
139
41
 
140
- **First request**:
141
- ```json
142
- {
143
- "query": {
144
- "filter": { "editorType": "EDITOR" },
145
- "sort": [{ "fieldName": "createdDate", "order": "ASC" }],
146
- "cursorPaging": { "limit": 50 }
147
- }
148
- }
149
- ```
42
+ ## Paginate
150
43
 
151
- **Next page** (cursor from `metadata.cursors.next`):
152
- ```json
153
- {
154
- "query": {
155
- "cursorPaging": {
156
- "limit": 50,
157
- "cursor": "<metadata.cursors.next from previous response>"
158
- }
159
- }
160
- }
161
- ```
44
+ The next cursor is at `metadata.cursors.next` (there is **no** `pagingMetadata` field); it already
45
+ encodes the filter/sort, so follow-up pages send only the cursor:
162
46
 
163
- **Loop**:
164
47
  ```javascript
165
- async function listAllSites() {
48
+ async function listAllSites(wixPost) {
166
49
  const sites = [];
167
50
  let cursor = null;
168
51
  do {
169
- const cursorPaging = cursor ? { limit: 100, cursor } : { limit: 100 };
170
- const res = await wixRequest({ query: { cursorPaging } }); // POST .../site-list/v2/sites/query
52
+ const query = cursor
53
+ ? { cursorPaging: { limit: 100, cursor } }
54
+ : { filter: { namespace: { $in: ["WIX", "HEADLESS"] } }, cursorPaging: { limit: 100 } };
55
+ const res = await wixPost("/site-list/v2/sites/query", { query });
171
56
  sites.push(...res.sites);
172
57
  cursor = res.metadata.hasNext ? res.metadata.cursors.next : null;
173
58
  } while (cursor);
@@ -175,23 +60,49 @@ async function listAllSites() {
175
60
  }
176
61
  ```
177
62
 
178
- ---
179
-
180
- ## Common Use Cases
63
+ ## Find a site by name
181
64
 
182
- ### List all sites
183
- Omit `filter` and page through with `cursorPaging` until `metadata.hasNext` is `false`.
65
+ Substring-search by display name with `GET manage.wix.com/account/sites/api/sites/search`. It
66
+ returns full site records (headless included) and, with `getCount=true`, the total:
184
67
 
185
- ### Find a specific site
186
- Prefer server-side `filter` (e.g. `{ "editorType": "EDITOR" }`) and `sort` over fetching
187
- everything and filtering client-side. Filterable fields match the site object (e.g. `name`,
188
- `displayName`, `editorType`, `published`).
68
+ ```bash
69
+ curl 'https://manage.wix.com/account/sites/api/sites/search?query=kintsugi&getCount=true' \
70
+ -H 'Authorization: <ACCOUNT_TOKEN>' -H 'accept: application/json'
71
+ # → { "sites": [ { "metaSiteId", "displayName", "namespace", "published", "editUrl", … } ], "totalCount": 5 }
72
+ ```
189
73
 
190
- ---
74
+ ## Response — the `Site` object
75
+
76
+ `sites` is an array of:
77
+
78
+ ```typescript
79
+ interface Site {
80
+ id: string; // site ID — use for site-level API calls
81
+ htmlAppId: string;
82
+ name: string; // URL slug / internal name; opaque `headless-<id>` for headless sites
83
+ displayName: string; // human-readable name
84
+ createdDate: string; // ISO datetime
85
+ updatedDate: string; // ISO datetime
86
+ trashedDate?: string; // present only when the site is in the trash
87
+ published: boolean;
88
+ premium: boolean; // has a Wix Premium (paid) plan
89
+ viewUrl: string; // public address; "" when unpublished (there is no `siteUrl` field)
90
+ editUrl: string; // relative; prefix with https://manage.wix.com to open
91
+ thumbnail: string;
92
+ ownerAccountId: string;
93
+ contributorAccountIds: string[];
94
+ editorType: string; // EDITOR | ODEDITOR | STUDIO | EDITORLESS
95
+ blocked: boolean;
96
+ folderId?: string; // set for sites organized in folders / parent-child setups
97
+ namespace: string; // WIX | HEADLESS
98
+ domainConnected: boolean;
99
+ parentChildRole: string; // e.g. NONE
100
+ }
101
+ ```
191
102
 
192
103
  ## Next Steps
193
104
 
194
- After finding a site:
195
- - Use the site `id` for site-level API calls
196
- - Create new sites using [Create Site from Template](create-site-from-template.md)
197
- - Manage site settings and content
105
+ Use a site's `id` for site-level API calls — derive a site token from the account token
106
+ (`wix token --site <id>`, or the `oauth2/token` refresh-grant in wix-auth `device-flow`), then read
107
+ its context via [Read Site Context](read-site-context.md) or create sites with
108
+ [Create Site from Template](create-site-from-template.md).
@@ -25,8 +25,7 @@ This distinction must stay explicit in mapper output.
25
25
  It owns the purchase flow and operational commerce entities that are reused across multiple vertical apps.
26
26
 
27
27
  Typical `eCommerce` entities:
28
- - carts
29
- - checkouts
28
+ - carts (the unified cart + checkout entity)
30
29
  - orders
31
30
  - order billing / refunds
32
31
  - payment and fulfillment state tied to orders
@@ -90,19 +89,19 @@ Main page:
90
89
  - [Integrating with Wix's Business Solutions](https://dev.wix.com/docs/build-apps/get-started/overview/integrating-with-wix-s-business-solutions)
91
90
 
92
91
  Short description:
93
- - Shared commerce platform for purchase flow and order operations. It is the canonical target for carts, checkouts, and orders, even when catalog data originates in a vertical app such as Stores or Bookings.
92
+ - Shared commerce platform for purchase flow and order operations. It is the canonical target for carts (Cart V2, which now also covers checkout) and orders, even when catalog data originates in a vertical app such as Stores or Bookings.
94
93
 
95
94
  Primary entities:
96
95
 
97
96
  | Entity | What it does | Docs |
98
97
  | --- | --- | --- |
99
- | `cart` | First phase of the purchase flow; holds line items, buyer references, discounts, and pricing context before checkout | [About the eCommerce Cart API](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/cart/cart/introduction) |
100
- | `current-cart` | Visitor/member scoped cart used in live purchase flows | [About the eCommerce Current Cart API](https://dev.wix.com/docs/sdk/backend-modules/ecom/current-cart/introduction) |
101
- | `checkout` | Second phase of purchase flow; holds calculated prices, tax, billing, shipping, and discount state before order creation | [About the eCommerce Checkout API](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) |
98
+ | `cart` | The unified purchase-flow entity — holds line items, buyer/contact info, discounts, delivery, billing, and payment context all the way through placing the order. | [About the Cart API](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/cart-v2/introduction) |
99
+ | `current-cart` | The current cart for a visitor/member session — the same entity as `cart`, addressed by the shopper's session rather than a cart id. | [About the Cart API](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/cart-v2/introduction) |
102
100
  | `order` | Final commerce record for completed or externally recorded purchases | [About the Orders API](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/orders/introduction) |
103
101
  | `order-billing` | Payment capture, void, and refund operations for eCommerce orders | [About the Order Billing API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/introduction) |
104
102
 
105
103
  Mapper notes:
104
+ - **A source system's separate "checkout" has no distinct Wix target.** The cart is the unified purchase-flow entity (there's no separate checkout), so map a source checkout's *input* state onto `cart`: billing → `paymentInfo.billingAddress`, shipping/delivery → `deliveryInfo`, applied coupons → cart `coupons`. **Calculated price *and* payment figures are NOT stored on the cart** — both the price totals (`summary.priceSummary`) and the payment breakdown (`summary.paymentSummary` — amount due, gift-card deductions, and the like) are computed on demand by Calculate/Estimate Cart (returned in a `CartSummary`), and the final figures live on the `order` after placement — so don't try to persist a source checkout's computed totals on the cart.
106
105
  - If the source platform exposes products and orders in one model, split catalog entities into the vertical app and transaction entities into `ecommerce`.
107
106
  - If the source has historical orders but no cart or checkout history, map directly to `order` and document missing pre-purchase state.
108
107
 
@@ -6,24 +6,27 @@ initial prompt, and the Wix connector is already configured.
6
6
  Your Wix client id is in your prompt — a public, buyer-facing credential (anonymous visitor tokens
7
7
  only), safe in the frontend; use it directly for the Wix client setup.
8
8
 
9
- > **`wix-vibe-headless` and `wix-docs` are the complete build and seed path for this app.** **Do NOT use the Base44 commerce kit (or any Base44 solution kit).**
9
+ > **The Wix skills installed below are the complete build and seed path for this app.** **Do NOT use the Base44 commerce kit (or any Base44 solution kit).**
10
10
 
11
11
  Follow STEPs 1–4 below exactly (run STEP 3 in parallel with STEP 2).
12
12
 
13
13
  ## STEP 1 — Install the Wix skills and deploy the storefront vertical to the app
14
14
 
15
- Install two skills — they land under `.agents/skills/`:
15
+ Install three skills — they land under `.agents/skills/`:
16
16
  - **`wix-vibe-headless`** — the storefront build + seed guide (STEPs 2–3): your main source of truth.
17
- - **`wix-docs`** — a **fallback**: search + read the Wix API docs for anything `wix-vibe-headless`
18
- doesn't cover.
17
+ - **`wix-manage`** — REST recipes for managing and configuring the site (install apps, seed
18
+ catalogs, business setup).
19
+ - **`wix-base44-connector`** — building on Wix from the Base44 sandbox: site context, API
20
+ contracts, and the docs **fallback** — find + read the Wix API docs for anything
21
+ `wix-vibe-headless` doesn't cover.
19
22
 
20
- Run this through exec_tool, exactly as written — installs both skills, deploys the `storefront` REST scaffolds + UI into `src/`, and pins the AGENTS.md note.
23
+ Run this through exec_tool, exactly as written — installs all three skills, deploys the `storefront` REST scaffolds + UI into `src/`, and pins the AGENTS.md note.
21
24
 
22
25
  ```js
23
26
  const { execSync } = require('child_process');
24
27
  const { existsSync, readdirSync } = require('fs');
25
28
  const results = {};
26
- for (const skill of ['wix-vibe-headless', 'wix-docs']) {
29
+ for (const skill of ['wix-vibe-headless', 'wix-manage', 'wix-base44-connector']) {
27
30
  if (existsSync(`/app/.agents/skills/${skill}/SKILL.md`)) { results[skill] = 'already_installed'; continue; }
28
31
  try {
29
32
  const out = execSync(`CI=1 npx -y skills add wix/skills/skills/${skill} --yes 2>&1`,
@@ -58,7 +61,7 @@ cleanup truly seems needed, ask the user first.
58
61
  Seed by calling the storefront's ready-made seed module — read
59
62
  `.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md` and load its `seed-*.js` via
60
63
  its loader snippet (build-time exec_tool); call its functions with your data. Gaps or an unexpected
61
- shape → the **`wix-docs`** skill.
64
+ shape → the **`wix-base44-connector`** skill's doc discovery.
62
65
 
63
66
  **Auth for these admin calls is the already-configured Wix headless connector — nothing else.** Get its
64
67
  access token and send it as a bearer token:
@@ -73,7 +76,8 @@ Inline via exec_tool, `base44` is already declared — use it directly; do **not
73
76
  inline it throws *"Identifier 'base44' has already been declared."*).
74
77
 
75
78
  **Product images.** Generate with **Base44's built-in image generation**, then attach via the
76
- storefront seed module's image-attach step — `wix-docs` if the module doesn't cover it.
79
+ storefront seed module's image-attach step — `wix-base44-connector` doc discovery if the module
80
+ doesn't cover it.
77
81
 
78
82
  **Seed images with the FINAL url, in one call.** Use the real `https://media.base44.com/...` url
79
83
  from the **completed** `generate_image` result and pass it straight into your single `setupStore`
@@ -101,4 +105,4 @@ const res = await fetch("https://www.wixapis.com/<api-path>", {
101
105
  return await res.json();
102
106
  ```
103
107
 
104
- `base44` is already declared inline in exec_tool — use it directly; do **not** import `@base44/sdk` or call `createClient()`. For what to call, check the storefront seed module (`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md`) or look up the endpoint via `wix-docs`.
108
+ `base44` is already declared inline in exec_tool — use it directly; do **not** import `@base44/sdk` or call `createClient()`. For what to call, check the storefront seed module (`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md`) or look up the endpoint via the `wix-base44-connector` skill's doc discovery.
@@ -6,24 +6,27 @@ initial prompt, and the Wix connector is already configured.
6
6
  Your Wix client id is in your prompt — a public, buyer-facing credential (anonymous visitor tokens
7
7
  only), safe in the frontend; use it directly for the Wix client setup.
8
8
 
9
- > **`wix-vibe-headless` and `wix-docs` are the complete build path for this app.** **Do NOT use the Base44 commerce kit (or any Base44 solution kit).** **This flow builds the client only — there is no seeding step.**
9
+ > **The Wix skills installed below are the complete build path for this app.** **Do NOT use the Base44 commerce kit (or any Base44 solution kit).** **This flow builds the client only — there is no seeding step.**
10
10
 
11
11
  Follow STEPs 1–3 below exactly.
12
12
 
13
13
  ## STEP 1 — Install the Wix skills and deploy the storefront vertical to the app
14
14
 
15
- Install two skills — they land under `.agents/skills/`:
15
+ Install three skills — they land under `.agents/skills/`:
16
16
  - **`wix-vibe-headless`** — the storefront build guide (STEP 2): your main source of truth.
17
- - **`wix-docs`** — a **fallback**: search + read the Wix API docs for anything `wix-vibe-headless`
18
- doesn't cover.
17
+ - **`wix-manage`** — REST recipes for managing and configuring the site (install apps, seed
18
+ catalogs, business setup).
19
+ - **`wix-base44-connector`** — building on Wix from the Base44 sandbox: site context, API
20
+ contracts, and the docs **fallback** — find + read the Wix API docs for anything
21
+ `wix-vibe-headless` doesn't cover.
19
22
 
20
- Run this through exec_tool, exactly as written — installs both skills, deploys the `storefront` REST scaffolds + UI into `src/`, and pins the AGENTS.md note.
23
+ Run this through exec_tool, exactly as written — installs all three skills, deploys the `storefront` REST scaffolds + UI into `src/`, and pins the AGENTS.md note.
21
24
 
22
25
  ```js
23
26
  const { execSync } = require('child_process');
24
27
  const { existsSync, readdirSync } = require('fs');
25
28
  const results = {};
26
- for (const skill of ['wix-vibe-headless', 'wix-docs']) {
29
+ for (const skill of ['wix-vibe-headless', 'wix-manage', 'wix-base44-connector']) {
27
30
  if (existsSync(`/app/.agents/skills/${skill}/SKILL.md`)) { results[skill] = 'already_installed'; continue; }
28
31
  try {
29
32
  const out = execSync(`CI=1 npx -y skills add wix/skills/skills/${skill} --yes 2>&1`,
@@ -71,4 +74,4 @@ const res = await fetch("https://www.wixapis.com/<api-path>", {
71
74
  return await res.json();
72
75
  ```
73
76
 
74
- `base44` is already declared inline in exec_tool — use it directly; do **not** import `@base44/sdk` or call `createClient()`. For what to call, check the storefront seed module (`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md`) or look up the endpoint via `wix-docs`.
77
+ `base44` is already declared inline in exec_tool — use it directly; do **not** import `@base44/sdk` or call `createClient()`. For what to call, check the storefront seed module (`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md`) or look up the endpoint via the `wix-base44-connector` skill's doc discovery.