@wix/agent-skills 1.2.0 → 1.3.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
CHANGED
|
@@ -90,7 +90,7 @@ When a major bump is required (a breaking change in the underlying `wix-cli`), t
|
|
|
90
90
|
|
|
91
91
|
## Releasing
|
|
92
92
|
|
|
93
|
-
Run the [`release-bump`](.github/workflows/release-bump.yml) workflow from the **Actions** tab and pick a `version_strategy`.
|
|
93
|
+
Run the [`release-bump`](.github/workflows/release-bump.yml) workflow from the **Actions** tab and pick a `version_strategy`. The rest is automatic — the bump PR auto-merges once checks pass and [`release.yml`](.github/workflows/release.yml) publishes to npm via Trusted Publishing.
|
|
94
94
|
|
|
95
95
|
## Contributing
|
|
96
96
|
|
package/package.json
CHANGED
|
@@ -23,8 +23,10 @@ This recipe covers basic Create, Read, Update, Delete (CRUD) operations for Wix
|
|
|
23
23
|
Before inserting or updating items, you need to know the collection's field names and types. If you don't already know the schema:
|
|
24
24
|
|
|
25
25
|
1. **Query existing items** - Fetch a few items to infer field names from the data
|
|
26
|
-
2. **Get collection schema** - Use `GET /collections/{
|
|
27
|
-
3. **List collections** - Use `GET /collections?fields=
|
|
26
|
+
2. **Get collection schema** - Use `GET /collections/{dataCollectionId}` for full field definitions
|
|
27
|
+
3. **List collections** - Use `GET /collections?fields=displayName` to see what collections exist (see [Schema Management](cms-schema-management.md))
|
|
28
|
+
|
|
29
|
+
It may be, that user refers to schema by its `displayName` rather than `id`, if collection is not found list all collections to find the right `id` (`dataCollectionId`) to use.
|
|
28
30
|
|
|
29
31
|
---
|
|
30
32
|
|
|
@@ -351,6 +353,28 @@ curl -X DELETE \
|
|
|
351
353
|
}
|
|
352
354
|
```
|
|
353
355
|
|
|
356
|
+
## Field Types Reference
|
|
357
|
+
|
|
358
|
+
| Type | Description | Example Value |
|
|
359
|
+
|------|-------------|---------------|
|
|
360
|
+
| `TEXT` | String | `"Hello World"` |
|
|
361
|
+
| `NUMBER` | Numeric | `99.99` |
|
|
362
|
+
| `BOOLEAN` | True/false | `true` |
|
|
363
|
+
| `DATE` | Date only | `"2024-01-15"` |
|
|
364
|
+
| `DATETIME` | Date and time | `{ "$date": "2024-01-15T10:00:00.000Z" }` |
|
|
365
|
+
| `IMAGE` | Image reference (HTTP url or wix:image://v1/{mediaId}/{friendlyName}) | `"wix:image://v1/3f72369f2219e2ee853e9e3df0217ce1.jpg/Colorful%20Business%20Cards.jpg"` |
|
|
366
|
+
| `VIDEO` | Video reference (HTTP url or wix:video://v1/{mediaId}/{friendlyName}) | `"wix:video://v1/11062b_484182533ede4b9a81329daf20238867/Sketching%20Design%20Concepts#posterUri=11062b_484182533ede4b9a81329daf20238867f000.jpg&posterWidth=1920&posterHeight=1080"` |
|
|
367
|
+
| `DOCUMENT` | Document reference (HTTP url or wix:document://v1/{mediaId}) | `"wix:document://v1/..."` |
|
|
368
|
+
| `URL` | Web URL | `"https://example.com"` |
|
|
369
|
+
| `RICH_TEXT` | HTML content | `"<p>Rich text</p>"` |
|
|
370
|
+
| `EMAIL` | Email | `"example@wix.com"` |
|
|
371
|
+
| `RICH_CONTENT` | Structured content | Complex object |
|
|
372
|
+
| `ADDRESS` | Address object | Address fields |
|
|
373
|
+
| `ARRAY_STRING` | Array of strings | `["tag1", "tag2"]` |
|
|
374
|
+
| `OBJECT` | JSON object | `{"key": "value"}` |
|
|
375
|
+
| `REFERENCE` | Single reference | Item ID string |
|
|
376
|
+
| `MULTI_REFERENCE` | Multiple references, use separate *reference* endpoints to manipulate, `include` to include in queries | Array of IDs |
|
|
377
|
+
|
|
354
378
|
---
|
|
355
379
|
|
|
356
380
|
## Query Operators
|
|
@@ -20,7 +20,7 @@ This recipe covers managing the structure (schema) of Wix CMS collections using
|
|
|
20
20
|
**Lightweight listing (recommended for existence checks)**:
|
|
21
21
|
```bash
|
|
22
22
|
curl -X GET \
|
|
23
|
-
'https://www.wixapis.com/wix-data/v2/collections?fields=
|
|
23
|
+
'https://www.wixapis.com/wix-data/v2/collections?fields=displayName' \
|
|
24
24
|
-H 'Authorization: <AUTH>'
|
|
25
25
|
```
|
|
26
26
|
|