@wix/agent-skills 1.24.0 → 1.25.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 +1 -0
- package/package.json +2 -1
- package/skills/wix-app/SKILL.md +4 -1
- package/skills/wix-app/references/BUSINESS_MANAGER_THEME.md +108 -0
- package/skills/wix-app/references/BUSINESS_MANAGER_TOKENS.md +81 -0
- package/skills/wix-app/references/DASHBOARD_MODAL.md +41 -0
- package/skills/wix-app/references/DASHBOARD_PAGE.md +2 -0
- package/skills/wix-app/references/DASHBOARD_PLUGIN.md +19 -4
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +5 -4
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +8 -7
- package/skills/wix-app/references/dashboard-page/DYNAMIC_PARAMETERS.md +21 -38
- package/skills/wix-headless/SKILL.md +0 -1
- package/skills/wix-headless/references/CAPABILITIES.md +3 -3
- package/skills/wix-headless/references/DISCOVERY.md +1 -1
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/SEED.md +1 -1
- package/skills/wix-headless/references/SETUP.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +1 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +2 -2
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +3 -14
- package/skills/wix-headless/scripts/bootstrap.mjs +156 -0
- package/skills/wix-headless-kit/SKILL.md +4 -4
- package/skills/wix-headless-kit/install/AGENTS.md +2 -2
- package/skills/wix-headless-kit/install/bootstrap.mjs +156 -0
- package/skills/wix-headless-kit/install/check.mjs +1 -1
- package/skills/wix-manage/SKILL.md +2 -8
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +250 -18
- package/skills/wix-manage/references/cms/cms-schema-management.md +52 -1
- package/skills/wix-manage/references/cms/cms-data-operations-extended.md +0 -263
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +0 -162
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "CMS References And Relationships"
|
|
3
|
-
description: "Add, replace, or remove items from MULTI_REFERENCE fields. Use insert-references, replace-references, remove-references endpoints. Required for managing multi-reference relationships - these CANNOT be set via regular insert/update/patch operations. Also covers single references and querying with expanded references."
|
|
4
|
-
---
|
|
5
|
-
# CMS References & Relationships
|
|
6
|
-
|
|
7
|
-
> **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
|
|
8
|
-
|
|
9
|
-
This recipe covers linking CMS collections together using reference fields.
|
|
10
|
-
|
|
11
|
-
## Prerequisites
|
|
12
|
-
|
|
13
|
-
1. Wix CMS enabled on the site
|
|
14
|
-
2. At least two collections to link together
|
|
15
|
-
3. API access with CMS permissions
|
|
16
|
-
|
|
17
|
-
## Required APIs
|
|
18
|
-
|
|
19
|
-
- **Collections API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction)
|
|
20
|
-
- **Data Items API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction)
|
|
21
|
-
|
|
22
|
-
## Reference Types
|
|
23
|
-
|
|
24
|
-
| Type | Field Type | Relationship | Example |
|
|
25
|
-
|------|------------|--------------|---------|
|
|
26
|
-
| Single Reference | `REFERENCE` | One-to-one, Many-to-one | Product → Category |
|
|
27
|
-
| Multi-Reference | `MULTI_REFERENCE` | One-to-many, Many-to-many | Product → Tags |
|
|
28
|
-
|
|
29
|
-
## Add a Single Reference Field
|
|
30
|
-
|
|
31
|
-
**Endpoint**: `POST /wix-data/v2/collections/create-field`
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
curl -X POST \
|
|
35
|
-
'https://www.wixapis.com/wix-data/v2/collections/create-field' \
|
|
36
|
-
-H 'Content-Type: application/json' \
|
|
37
|
-
-H 'Authorization: <AUTH>' \
|
|
38
|
-
-d '{
|
|
39
|
-
"dataCollectionId": "Products",
|
|
40
|
-
"field": {
|
|
41
|
-
"key": "category",
|
|
42
|
-
"displayName": "Category",
|
|
43
|
-
"type": "REFERENCE",
|
|
44
|
-
"typeMetadata": {
|
|
45
|
-
"reference": {
|
|
46
|
-
"referencedCollectionId": "Categories"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}'
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Add a Multi-Reference Field
|
|
54
|
-
|
|
55
|
-
**Endpoint**: `POST /wix-data/v2/collections/create-field`
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
curl -X POST \
|
|
59
|
-
'https://www.wixapis.com/wix-data/v2/collections/create-field' \
|
|
60
|
-
-H 'Content-Type: application/json' \
|
|
61
|
-
-H 'Authorization: <AUTH>' \
|
|
62
|
-
-d '{
|
|
63
|
-
"dataCollectionId": "Products",
|
|
64
|
-
"field": {
|
|
65
|
-
"key": "tags",
|
|
66
|
-
"displayName": "Tags",
|
|
67
|
-
"type": "MULTI_REFERENCE",
|
|
68
|
-
"typeMetadata": {
|
|
69
|
-
"multiReference": {
|
|
70
|
-
"referencedCollectionId": "Tags",
|
|
71
|
-
"referencingFieldKey": "products",
|
|
72
|
-
"referencingDisplayName": "Products"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}'
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Insert Multi-Reference Links
|
|
80
|
-
|
|
81
|
-
**Endpoint**: `POST /wix-data/v2/bulk/items/insert-references`
|
|
82
|
-
|
|
83
|
-
```json
|
|
84
|
-
{
|
|
85
|
-
"dataCollectionId": "Products",
|
|
86
|
-
"dataItemReferences": [
|
|
87
|
-
{
|
|
88
|
-
"referringItemId": "product-item-id",
|
|
89
|
-
"referringItemFieldName": "tags",
|
|
90
|
-
"referencedItemId": "tag-1-item-id"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"referringItemId": "product-item-id",
|
|
94
|
-
"referringItemFieldName": "tags",
|
|
95
|
-
"referencedItemId": "tag-2-item-id"
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
"returnEntity": true
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Replace All References
|
|
103
|
-
|
|
104
|
-
**Endpoint**: `POST /wix-data/v2/items/replace-references`
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"dataCollectionId": "Products",
|
|
109
|
-
"referringItemId": "product-item-id",
|
|
110
|
-
"referringItemFieldName": "tags",
|
|
111
|
-
"newReferencedItemIds": ["new-tag-1-id", "new-tag-2-id", "new-tag-3-id"]
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
> **Note**: To remove all references, pass an empty array for `newReferencedItemIds`.
|
|
116
|
-
|
|
117
|
-
## Remove References (Bulk)
|
|
118
|
-
|
|
119
|
-
**Endpoint**: `POST /wix-data/v2/bulk/items/remove-references`
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"dataCollectionId": "Products",
|
|
124
|
-
"dataItemReferences": [
|
|
125
|
-
{
|
|
126
|
-
"referringItemId": "product-id-1",
|
|
127
|
-
"referringItemFieldName": "tags",
|
|
128
|
-
"referencedItemId": "tag-to-remove-id"
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Query with Referenced Items Expanded
|
|
135
|
-
|
|
136
|
-
**Endpoint**: `POST /wix-data/v2/items/query`
|
|
137
|
-
|
|
138
|
-
```json
|
|
139
|
-
{
|
|
140
|
-
"dataCollectionId": "Products",
|
|
141
|
-
"query": {
|
|
142
|
-
"filter": {
|
|
143
|
-
"inStock": true
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
"includeReferencedItems": ["category", "tags"]
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Reference Query Operators
|
|
151
|
-
|
|
152
|
-
| Operator | Description | Example |
|
|
153
|
-
|----------|-------------|---------|
|
|
154
|
-
| `$eq` | Exact match (single reference) | `{ "category": "id" }` |
|
|
155
|
-
| `$hasSome` | Has at least one of | `{ "tags": { "$hasSome": ["id1", "id2"] } }` |
|
|
156
|
-
| `$hasAll` | Has all of | `{ "tags": { "$hasAll": ["id1", "id2"] } }` |
|
|
157
|
-
|
|
158
|
-
## Related Documentation
|
|
159
|
-
|
|
160
|
-
- [Data Items API Reference](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction)
|
|
161
|
-
- [Collections API Reference](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction)
|
|
162
|
-
- [CMS Schema Management Recipe](cms-schema-management.md)
|