wix-cli-data-collection by wix/skills
npx skills add https://github.com/wix/skills --skill wix-cli-data-collection为 Wix CLI 应用创建 CMS 数据集合。数据集合扩展允许您的应用在安装到站点时自动创建 CMS 集合。集合存储结构化数据,可以从仪表板页面、站点页面、后端代码和外部应用程序访问。
重要提示: 此扩展会自动启用站点的代码编辑器,这是 Wix Data API 正常工作所必需的。没有此扩展,使用 Data API 的应用将需要 Wix 用户手动在其站点上启用代码编辑器,而这无法保证。借助数据集合扩展,您的应用可以可靠地使用 Data API 来读取和写入集合中的数据。
数据集合正常工作需要应用命名空间。命名空间限定您的集合 ID 范围,以防止应用之间的冲突。
如果在提示中提供了应用命名空间:
<实际命名空间>/集合后缀如果未提供应用命名空间:
<app-namespace>:<app-namespace>/集合后缀<app-namespace> 替换为 Wix 开发者中心中您的实际应用命名空间"idSuffix): 仅使用后缀,例如 广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
"products""<app-namespace>/products" — 必须与 idSuffix 完全匹配(区分大小写,不进行驼峰式/PascalCase 转换)referencedCollectionId 中: 仅使用 idSuffix(不是完整的限定 ID)— 系统会自动解析它idSuffix 是 "product-recommendations",API 调用使用 "<app-namespace>/product-recommendations",而不是 "<app-namespace>/productRecommendations"在 Wix CLI 应用中,所有 CMS 集合都在单个文件中定义:
文件: src/extensions/data/extensions.ts
该文件使用 @wix/astro/builders 中的 extensions.genericExtension() 模式来注册所有集合:
import { extensions } from "@wix/astro/builders";
export const dataExtension = extensions.genericExtension({
compId: "{{GENERATE_UUID}}",
compName: "data-extension",
compType: "DATA_COMPONENT",
compData: {
dataComponent: {
collections: [
// 所有集合在此定义
],
},
},
});
关键点: compId 必须是一个唯一的、静态的 UUID 字符串。为每个应用生成一个新的 UUID v4 — 不要使用 randomUUID() 或从示例中复制 UUID。创建或修改此文件后,请按照 wix-cli-extension-registration 生成 UUID 并在 src/extensions.ts 中注册扩展(集合正常工作所必需)。
要点:
@wix/astro/builders 中的 extensions.genericExtension()idSuffix、displayName、displayField、fields、dataPermissions,以及可选的 initialDatadisplayField 指定当从其他集合引用此集合中的项目时,CMS 显示哪个字段| 类型 | 描述 | 使用场景 |
|---|---|---|
TEXT | 单行文本 | 名称、标题 |
RICH_TEXT | 格式化的 HTML 文本 | 博客内容 |
RICH_CONTENT | 包含嵌入媒体的富内容 | 复杂的博客文章 |
NUMBER | 十进制数字 | 价格、数量 |
BOOLEAN | 真/假 | 开关、标志 |
DATE | 仅日期 | 生日 |
DATETIME | 日期和时间 | 时间戳 |
TIME | 仅时间 | 日程安排 |
IMAGE | 单个图像 | 缩略图 |
DOCUMENT | 文件附件 | |
VIDEO | 视频文件 | 媒体 |
AUDIO | 音频文件 | 播客 |
MEDIA_GALLERY | 多个媒体 | 画廊 |
REFERENCE | 链接到一个项目 | 作者 → 用户 |
MULTI_REFERENCE | 链接到多个项目 | 帖子 → 标签 |
ADDRESS | 结构化地址 | 位置 |
URL | URL 验证 | 链接 |
PAGE_LINK | 链接到 Wix 页面 | 内部导航 |
LANGUAGE | 语言代码 | 多语言内容 |
OBJECT | JSON 对象 | 灵活的数据 |
ARRAY | 值数组 | 通用数组 |
ARRAY_STRING | 字符串数组 | 标签列表 |
ARRAY_DOCUMENT | 文档数组 | 文件集合 |
ANY | 任何类型 | 最灵活 |
关键点:OBJECT 字段需要 objectOptions。 当使用 type: "OBJECT" 时,您必须包含 objectOptions 属性 — API 将拒绝没有它的 OBJECT 字段。如果不需要模式验证,请使用空对象 {}:
{
"key": "settings",
"displayName": "Settings",
"type": "OBJECT",
"objectOptions": {}
}
对于结构化对象,在 objectOptions.fields 内定义嵌套字段:
{
"key": "triggerRules",
"displayName": "Trigger Rules",
"type": "OBJECT",
"objectOptions": {
"fields": [
{ "key": "url", "displayName": "URL Condition", "type": "TEXT" },
{
"key": "scrollDepth",
"displayName": "Scroll Depth %",
"type": "NUMBER"
},
{ "key": "dateStart", "displayName": "Start Date", "type": "DATE" }
]
}
}
{
"key": "email",
"displayName": "Email Address",
"type": "TEXT",
"required": true,
"unique": true,
"defaultValue": null,
"description": "User's primary email"
}
| 属性 | 描述 |
|---|---|
key | 字段标识符(camelCase) |
displayName | 在 CMS 中显示的标签 |
type | 字段数据类型 |
required | 必须有值 |
unique | 不允许重复 |
defaultValue | 初始值 |
description | 帮助文本 |
lowerCamelCase,仅限 ASCII(例如,productName、isActive、createdAt)idSuffix): lower-kebab-case 或 lower_underscore(例如,product-categories、blog_posts)"Product Name"、"Is Active")每个集合都包含:_id、_createdDate、_updatedDate、_owner
访问级别控制谁可以读取、创建、更新和删除集合中的项目。
| 级别 | 描述 |
|---|---|
UNDEFINED | 未设置(继承默认值) |
ANYONE | 公共访问(包括访客) |
SITE_MEMBER | 任何登录用户(成员和协作者) |
SITE_MEMBER_AUTHOR | 登录用户,但成员只能访问自己的项目 |
CMS_EDITOR | 具有 CMS 访问权限的站点协作者 |
PRIVILEGED | CMS 管理员和特权用户 |
常见模式:
read: ANYONE, write: PRIVILEGEDread: SITE_MEMBER, write: SITE_MEMBER_AUTHORread: ANYONE, write: CMS_EDITORread: PRIVILEGED, write: PRIVILEGED权限层次结构(从最严格到最宽松):PRIVILEGED > CMS_EDITOR > SITE_MEMBER_AUTHOR > SITE_MEMBER > ANYONE > UNDEFINED
关键点:权限必须与数据访问的位置和方式相匹配。 数据的使用者决定了最低权限级别 — 设置比访问上下文更严格的权限将导致运行时故障(空结果或权限被拒绝错误)。
通过询问以下问题来确定权限:"谁与此数据交互,以及从哪里交互?"
| 访问上下文 | 谁看到/使用它 | 含义 |
|---|---|---|
站点小部件 (SITE_WIDGET) | 任何站点访客(公共) | 读取必须是 ANYONE。如果小部件接受输入(例如,评论、提交),插入也必须为 ANYONE 或 SITE_MEMBER。 |
| 嵌入式脚本 | 任何站点访客(公共) | 与站点小部件相同 — 读取必须是 ANYONE。写入取决于访客是否可以提交数据。 |
仪表板页面 (DASHBOARD_PAGE) | 仅限站点所有者/协作者 | 可以对所有操作使用 CMS_EDITOR 或 PRIVILEGED,因为只有授权用户才能访问仪表板。 |
| 后端代码(站点端) | 在访客上下文中运行 | 如果从页面代码或站点端模块调用,调用者具有访客级别的权限 — 数据必须在适当的公共级别可读/可写。 |
| 后端代码(提升) | 使用 @wix/essentials 中的 auth.elevate() 运行 | 可以绕过权限,但集合仍然需要为任何非提升的调用者设置正确的默认值。 |
如何应用此规则:
itemRead 必须是 ANYONE(因为小部件是公共的)。itemRead: ANYONE(小部件显示它)但 itemInsert: CMS_EDITOR(仅仪表板用户添加项目)。每个操作都是独立的。按蓝图类型划分的示例:
itemRead: ANYONE, itemInsert: CMS_EDITOR, itemUpdate: CMS_EDITOR, itemRemove: CMS_EDITORitemRead: ANYONE, itemInsert: ANYONE, itemUpdate: CMS_EDITOR, itemRemove: CMS_EDITORitemRead: SITE_MEMBER, itemInsert: SITE_MEMBER, itemUpdate: SITE_MEMBER_AUTHOR, itemRemove: CMS_EDITORitemRead: CMS_EDITOR, itemInsert: CMS_EDITOR, itemUpdate: CMS_EDITOR, itemRemove: CMS_EDITOR反模式: 在站点小部件查询的集合上设置 itemRead: PRIVILEGED — 小部件将为所有访客返回空结果,因为他们缺乏特权访问权限。
一对一 / 多对一 (REFERENCE):
{
"key": "category",
"displayName": "Category",
"type": "REFERENCE",
"referenceOptions": {
"referencedCollectionId": "categories"
}
}
多对多 (MULTI_REFERENCE):
{
"key": "tags",
"displayName": "Tags",
"type": "MULTI_REFERENCE",
"multiReferenceOptions": {
"referencedCollectionId": "tags"
}
}
关键约束:
referencedCollectionId 必须是同一计划中另一个集合的 idSuffix集合支持三种修改集合的操作类型:
创建一个新集合或替换具有相同 idSuffix 的现有集合。
使用时机: 创建新集合或完全替换现有集合。
通过将新数据与现有字段合并来修改现有集合。
使用时机: 添加字段、更新权限或修改集合属性。
行为:
从应用中删除集合。
使用时机: 删除不再需要的集合。
行为:
src/extensions/data/extensions.ts 中删除集合合并逻辑: 操作使用以 idSuffix 为键的 Map 来应用。首先将现有集合加载到 Map 中,然后每个操作修改它:INSERT 设置/替换,UPDATE 与现有合并(如果缺失则创建),DELETE 移除。最终的 Map 值成为输出集合。
对数据集合扩展的更改需要发布应用的新主要版本。当用户更新到新的主要版本时,他们的集合将按如下方式更新:
重要说明:
initialData。关键点:切勿创建 CMS 集合来存储嵌入式脚本的配置。
所有嵌入式脚本配置都必须通过嵌入式脚本参数 (embeddedScriptParameters) 进行,而不是通过 CMS 集合。
请勿为以下内容创建集合:
配置示例(使用参数,而非集合):
应仅为以下内容创建 CMS 集合:
决策规则:
关键点:站点小部件有一个内置的设置面板 (panel.tsx),用于处理所有小部件配置。
对于仅限 SITE_WIDGET 的蓝图(无 DASHBOARD_PAGE 或其他扩展):
collections: [](空数组)由小部件面板处理的配置(非集合):
仅为 SITE_WIDGET 创建集合,当满足以下所有条件时:
不要创建聚合字段。 如果您有单独的 rating 字段,请动态计算平均值 — 不要存储像 averageRating 这样的计算值。
不要重复配置。 如果嵌入式脚本参数已经包含 { headline, color },请不要也创建具有相同数据的 CMS 集合。
不要创建单值集合。 像 { theme: "dark" } 这样只有一个字段的集合应该是一个嵌入式脚本参数或小部件设置。
initialData 中的每个项目必须与集合模式完全匹配:
lowerCamelCase 并与模式匹配TEXT → 字符串,NUMBER → 数字,BOOLEAN → 布尔值DATE/DATETIME → 使用 { "$date": "2024-01-15T10:30:00.000Z" } 格式REFERENCE → 提供引用集合的 idSuffix请求: "创建一个用于处理费用的集合,并附带示例数据"
生成的文件: src/extensions/data/extensions.ts
import { extensions } from "@wix/astro/builders";
export const dataExtension = extensions.genericExtension({
compId: "{{GENERATE_UUID}}",
compName: "data-extension",
compType: "DATA_COMPONENT",
compData: {
dataComponent: {
collections: [
{
schemaUrl: "https://www.wix.com/",
idSuffix: "additional-fees",
displayName: "Additional Fees",
displayField: "title",
fields: [
{ key: "title", displayName: "Fee Title", type: "TEXT" },
{ key: "amount", displayName: "Fee Amount", type: "NUMBER" },
],
dataPermissions: {
itemRead: "ANYONE",
itemInsert: "PRIVILEGED",
itemUpdate: "PRIVILEGED",
itemRemove: "PRIVILEGED",
},
initialData: [
{ title: "Handling Fee", amount: 5 },
{ title: "Gift Wrapping", amount: 3.5 },
],
},
],
},
},
});
请求: "为产品和类别创建带有关系的集合"
集合:
categories - 类别定义products - 引用类别的产品两个集合都在同一个 src/extensions/data/extensions.ts 文件中定义,其中 products 集合使用 REFERENCE 字段链接到 categories。有关完整的多集合示例,请参阅 扩展模板。
软删除: 添加 isDeleted (BOOLEAN, default: false)
状态/工作流: 添加 status (TEXT) 并带有值,如 draft/pending/published
URL 别名: 添加 slug (TEXT, unique) 用于 SEO 友好的 URL
所有者跟踪: 添加 createdBy (REFERENCE → 自定义集合,而非 Members)
注意: 对于所有者跟踪,请创建一个自定义用户集合,而不是直接引用 Wix Members。
src/extensions/data/extensions.ts 的模板每周安装次数
186
仓库
GitHub 星标
3
首次出现
2026年2月8日
安全审计
安装于
opencode165
cursor87
codex82
gemini-cli80
github-copilot77
amp72
Creates CMS data collections for Wix CLI apps. The data collections extension allows your app to automatically create CMS collections when it's installed on a site. Collections store structured data that can be accessed from dashboard pages, site pages, backend code, and external applications.
Important: This extension automatically enables the site's code editor, which is required for the Wix Data APIs to work. Without this extension, apps using Data APIs would need the Wix user to manually enable the code editor on their site, which isn't guaranteed. With the data collections extension, your app can reliably use Data APIs to read and write data in the collections.
App namespace is REQUIRED for data collections to work. The namespace scopes your collection IDs to prevent conflicts between apps.
If app namespace is provided in the prompt:
<actual-namespace>/collection-suffixIf app namespace is NOT provided:
<app-namespace> in all code examples: <app-namespace>/collection-suffix<app-namespace> with your actual app namespace from Wix Dev Center"idSuffix): Use just the suffix, e.g., "products""<app-namespace>/products" — MUST match idSuffix exactly (case-sensitive, no camelCase/PascalCase transformation)referencedCollectionId: Use the idSuffix only (not the full scoped ID) — the system resolves it automaticallyidSuffix is "product-recommendations", API calls use "<app-namespace>/product-recommendations" NOT In Wix CLI apps, all CMS collections are defined in a single file:
File: src/extensions/data/extensions.ts
This file uses the extensions.genericExtension() pattern from @wix/astro/builders to register all collections:
import { extensions } from "@wix/astro/builders";
export const dataExtension = extensions.genericExtension({
compId: "{{GENERATE_UUID}}",
compName: "data-extension",
compType: "DATA_COMPONENT",
compData: {
dataComponent: {
collections: [
// All collections defined here
],
},
},
});
CRITICAL: The compId must be a unique, static UUID string. Generate a fresh UUID v4 for each app - do NOT use randomUUID() or copy UUIDs from examples. After creating or modifying this file, follow wix-cli-extension-registration for UUID generation and to register the extension in src/extensions.ts (required for collections to work).
Key points:
extensions.genericExtension() from @wix/astro/buildersidSuffix, displayName, displayField, fields, dataPermissions, and optionally initialDatadisplayField specifies which field the CMS displays when referencing items in this collection from other collections| Type | Description | Use Case |
|---|---|---|
TEXT | Single-line text | Names, titles |
RICH_TEXT | Formatted HTML text | Blog content |
RICH_CONTENT | Rich content with embedded media | Complex blog posts |
NUMBER | Decimal numbers | Prices, quantities |
BOOLEAN | True/false | Toggles, flags |
CRITICAL: OBJECT fields requireobjectOptions. When using type: "OBJECT", you MUST include the objectOptions property — the API will reject OBJECT fields without it. Use an empty object {} if you don't need schema validation:
{
"key": "settings",
"displayName": "Settings",
"type": "OBJECT",
"objectOptions": {}
}
For structured objects, define nested fields inside objectOptions.fields:
{
"key": "triggerRules",
"displayName": "Trigger Rules",
"type": "OBJECT",
"objectOptions": {
"fields": [
{ "key": "url", "displayName": "URL Condition", "type": "TEXT" },
{
"key": "scrollDepth",
"displayName": "Scroll Depth %",
"type": "NUMBER"
},
{ "key": "dateStart", "displayName": "Start Date", "type": "DATE" }
]
}
}
{
"key": "email",
"displayName": "Email Address",
"type": "TEXT",
"required": true,
"unique": true,
"defaultValue": null,
"description": "User's primary email"
}
| Property | Description |
|---|---|
key | Field identifier (camelCase) |
displayName | Label shown in CMS |
type | Field data type |
required | Must have value |
unique | No duplicates allowed |
defaultValue | Initial value |
lowerCamelCase, ASCII only (e.g., productName, isActive, createdAt)idSuffix): lower-kebab-case or lower_underscore (e.g., product-categories, blog_posts)"Product Name", )Every collection includes: _id, _createdDate, _updatedDate, _owner
Access levels control who can read, create, update, and delete items in collections.
| Level | Description |
|---|---|
UNDEFINED | Not set (inherits defaults) |
ANYONE | Public access (including visitors) |
SITE_MEMBER | Any signed-in user (members and collaborators) |
SITE_MEMBER_AUTHOR | Signed-in users, but members only access own items |
CMS_EDITOR | Site collaborators with CMS Access permission |
PRIVILEGED |
Common patterns:
read: ANYONE, write: PRIVILEGEDread: SITE_MEMBER, write: SITE_MEMBER_AUTHORread: ANYONE, write: CMS_EDITORread: PRIVILEGED, write: PRIVILEGEDPermission hierarchy (most to least restrictive): PRIVILEGED > CMS_EDITOR > SITE_MEMBER_AUTHOR > SITE_MEMBER > ANYONE > UNDEFINED
CRITICAL: Permissions must match where and how the data is accessed. The consumer of the data determines the minimum permission level — setting permissions more restrictive than the access context will cause runtime failures (empty results or permission-denied errors).
Determine permissions by asking: "Who interacts with this data, and from where?"
| Access Context | Who Sees / Uses It | Implication |
|---|---|---|
Site Widget (SITE_WIDGET) | Any site visitor (public) | Reads must be ANYONE. If the widget accepts input (e.g., reviews, submissions), inserts must also be ANYONE or SITE_MEMBER. |
| Embedded Script | Any site visitor (public) | Same as site widget — reads must be ANYONE. Writes depend on whether visitors can submit data. |
Dashboard Page (DASHBOARD_PAGE) |
How to apply this:
itemRead must be ANYONE (because the widget is public).itemRead: ANYONE (widget displays it) but itemInsert: CMS_EDITOR (only dashboard users add items). Each operation is independent.Examples by blueprint type:
itemRead: ANYONE, itemInsert: CMS_EDITOR, itemUpdate: CMS_EDITOR, itemRemove: CMS_EDITORitemRead: ANYONE, itemInsert: ANYONE, itemUpdate: CMS_EDITOR, itemRemove: CMS_EDITORitemRead: SITE_MEMBER, itemInsert: SITE_MEMBER, , Anti-pattern: Setting itemRead: PRIVILEGED on a collection that a site widget queries — the widget will return empty results for all visitors because they lack privileged access.
One-to-One / Many-to-One (REFERENCE):
{
"key": "category",
"displayName": "Category",
"type": "REFERENCE",
"referenceOptions": {
"referencedCollectionId": "categories"
}
}
Many-to-Many (MULTI_REFERENCE):
{
"key": "tags",
"displayName": "Tags",
"type": "MULTI_REFERENCE",
"multiReferenceOptions": {
"referencedCollectionId": "tags"
}
}
CRITICAL Constraints:
referencedCollectionId MUST be the idSuffix of another collection in the same planCollections support three operation types for modifying collections:
Creates a new collection or replaces an existing one with the same idSuffix.
Use when: Creating a new collection or completely replacing an existing collection.
Modifies an existing collection by merging new data with existing fields.
Use when: Adding fields, updating permissions, or modifying collection properties.
Behavior:
Removes a collection from the app.
Use when: Removing a collection that is no longer needed.
Behavior:
src/extensions/data/extensions.tsMerge logic: Operations are applied using a Map keyed by idSuffix. Existing collections are loaded into the Map first, then each operation modifies it: INSERT sets/replaces, UPDATE merges with existing (or creates if missing), DELETE removes. The final Map values become the output collections.
Changes to your data collections extension require releasing a new major version of your app. When a user updates to the new major version, their collections are updated as follows:
Important notes:
initialData is ignored during updates.CRITICAL: NEVER create CMS collections to store configuration for embedded scripts.
All embedded script configuration must go through embedded script parameters (embeddedScriptParameters), not CMS collections.
DO NOT create collections for:
Examples of configuration (use parameters, NOT collections):
CMS collections should ONLY be created for:
Decision Rule:
CRITICAL: Site widgets have a built-in settings panel (panel.tsx) that handles ALL widget configuration.
For SITE_WIDGET-only blueprints (no DASHBOARD_PAGE or other extensions):
collections: [] (empty array)Configuration handled by widget panel (NOT collections):
Only create collections for SITE_WIDGET when ALL of these conditions are met:
Don't create aggregated fields. If you have individual rating fields, calculate averages dynamically — don't store computed values like averageRating.
Don't duplicate configuration. If embedded script parameters already hold { headline, color }, don't also create a CMS collection with the same data.
Don't create single-value collections. A collection with one field like { theme: "dark" } should be an embedded script parameter or widget setting instead.
Each item in initialData must match the collection schema exactly:
lowerCamelCase and match the schemaTEXT → string, NUMBER → number, BOOLEAN → booleanDATE/DATETIME → use { "$date": "2024-01-15T10:30:00.000Z" } formatREFERENCE → provide the idSuffix of the referenced collectionRequest: "Create a collection for handling fees with example data"
Generated file: src/extensions/data/extensions.ts
import { extensions } from "@wix/astro/builders";
export const dataExtension = extensions.genericExtension({
compId: "{{GENERATE_UUID}}",
compName: "data-extension",
compType: "DATA_COMPONENT",
compData: {
dataComponent: {
collections: [
{
schemaUrl: "https://www.wix.com/",
idSuffix: "additional-fees",
displayName: "Additional Fees",
displayField: "title",
fields: [
{ key: "title", displayName: "Fee Title", type: "TEXT" },
{ key: "amount", displayName: "Fee Amount", type: "NUMBER" },
],
dataPermissions: {
itemRead: "ANYONE",
itemInsert: "PRIVILEGED",
itemUpdate: "PRIVILEGED",
itemRemove: "PRIVILEGED",
},
initialData: [
{ title: "Handling Fee", amount: 5 },
{ title: "Gift Wrapping", amount: 3.5 },
],
},
],
},
},
});
Request: "Create collections for products and categories with relationships"
Collections:
categories - Category definitionsproducts - Products that reference categoriesBoth collections are defined in the same src/extensions/data/extensions.ts file, with the products collection using a REFERENCE field to link to categories. See the extension template for a complete multi-collection example.
Soft Delete: Add isDeleted (BOOLEAN, default: false)
Status/Workflow: Add status (TEXT) with values like draft/pending/published
URL Slug: Add slug (TEXT, unique) for SEO-friendly URLs
Owner Tracking: Add createdBy (REFERENCE → custom collection, not Members)
Note: For owner tracking, create a custom collection for users rather than referencing Wix Members directly.
src/extensions/data/extensions.tsWeekly Installs
186
Repository
GitHub Stars
3
First Seen
Feb 8, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode165
cursor87
codex82
gemini-cli80
github-copilot77
amp72
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
116,600 周安装
Nansen 聪明钱 Alpha 发现工具 - 追踪智能资金代币积累信号
212 周安装
Python网络安全工具开发指南:构建高效安全测试应用与扫描器
157 周安装
TechNews Skill:AI驱动科技新闻聚合与摘要工具,自动抓取TechMeme热点并分析社交媒体热议
136 周安装
Google Search Console (GSC) 技能:自动化获取搜索分析、索引状态与SEO洞察
135 周安装
LangGraph 实现指南:构建有状态多参与者智能体应用的图架构框架
131 周安装
Java架构专家 | Java 21、Spring Boot 3、微服务架构、性能优化实战指南
141 周安装
"<app-namespace>/productRecommendations"DATE | Date only | Birthdays |
DATETIME | Date with time | Timestamps |
TIME | Time only | Schedules |
IMAGE | Single image | Thumbnails |
DOCUMENT | File attachment | PDFs |
VIDEO | Video file | Media |
AUDIO | Audio file | Podcasts |
MEDIA_GALLERY | Multiple media | Galleries |
REFERENCE | Link to one item | Author → User |
MULTI_REFERENCE | Link to many items | Post → Tags |
ADDRESS | Structured address | Locations |
URL | URL validation | Links |
PAGE_LINK | Link to Wix page | Internal navigation |
LANGUAGE | Language code | Multi-language content |
OBJECT | JSON object | Flexible data |
ARRAY | Array of values | Generic arrays |
ARRAY_STRING | Array of strings | Tags list |
ARRAY_DOCUMENT | Array of documents | File collections |
ANY | Any type | Most flexible |
description| Help text |
"Is Active"| CMS administrators and privileged users |
| Site owner / collaborators only |
Can use CMS_EDITOR or PRIVILEGED for all operations since only authorized users access the dashboard. |
| Backend code (site-side) | Runs in visitor context | If called from page code or site-side modules, the caller has visitor-level permissions — data must be readable/writable at the appropriate public level. |
| Backend code (elevated) | Runs with auth.elevate() from @wix/essentials | Can bypass permissions, but the collection still needs correct defaults for any non-elevated callers. |
itemUpdate: SITE_MEMBER_AUTHORitemRemove: CMS_EDITORitemRead: CMS_EDITOR, itemInsert: CMS_EDITOR, itemUpdate: CMS_EDITOR, itemRemove: CMS_EDITOR