wix-stores-versioning by wix/skills
npx skills add https://github.com/wix/skills --skill wix-stores-versioningWix Stores 有两个不向后兼容的目录版本:
| 版本 | 状态 |
|---|---|
| V1_CATALOG | 旧版(例如,products、inventory) |
| V3_CATALOG | 当前版本(例如,productsV3、inventoryItemsV3) |
V3 模块通常带有 V3 后缀。请使用 Wix MCP 来搜索你需要的具体模块。
在执行任何 Stores 操作前,务必检查目录版本:
import { catalogVersioning, products, productsV3 } from '@wix/stores';
async function getProducts() {
const { catalogVersion } = await catalogVersioning.getCatalogVersion();
if (catalogVersion === 'STORES_NOT_INSTALLED') {
return [];
}
if (catalogVersion === 'V3_CATALOG') {
// 使用 V3 模块
const result = await productsV3.queryProducts().limit(10).find();
return result.items;
}
// 使用 V1 模块
const result = await products.queryProducts().limit(10).find();
return result.items;
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
务必为你使用的每个 API 方法查找所需权限:
SearchWixSDKDocumentation 搜索该方法ReadFullDocsArticle 阅读完整文档以获取所需权限getCatalogVersion()使用 MCP 工具搜索特定版本的文档:
SearchWixSDKDocumentation - 搜索方法和权限ReadFullDocsArticle - 在需要时阅读完整文档搜索查询(结果会同时显示 V1 和 V3 的命名空间):
"getCatalogVersion" → 权限和用法"createProduct" → productsV3 (V3) 和 products (V1)"queryProducts" → productsV3 (V3) 和 products (V1)"getInventoryItem" → inventoryItemsV3 (V3) 和 inventory (V1)重要提示: 找到方法后,使用 ReadFullDocsArticle 获取包含所需权限的完整文档。将它们返回给用户。
V1 和 V3 具有不同的字段结构。有关字段映射,请参阅:目录 V1 到 V3 迁移指南
每周安装量
129
代码仓库
GitHub 星标数
3
首次出现
2026年3月2日
安全审计
安装于
opencode126
cursor48
amp47
gemini-cli47
codex47
kimi-cli47
Wix Stores has two catalog versions that are NOT backwards compatible :
| Version | Status |
|---|---|
| V1_CATALOG | Legacy (e.g., products, inventory) |
| V3_CATALOG | Current (e.g., productsV3, inventoryItemsV3) |
V3 modules typically have a V3 suffix. Use Wix MCP to search for the specific module you need.
Always check catalog version before any Stores operation:
import { catalogVersioning, products, productsV3 } from '@wix/stores';
async function getProducts() {
const { catalogVersion } = await catalogVersioning.getCatalogVersion();
if (catalogVersion === 'STORES_NOT_INSTALLED') {
return [];
}
if (catalogVersion === 'V3_CATALOG') {
// Use V3 module
const result = await productsV3.queryProducts().limit(10).find();
return result.items;
}
// Use V1 module
const result = await products.queryProducts().limit(10).find();
return result.items;
}
Always look up permissions for each API method you use:
SearchWixSDKDocumentationReadFullDocsArticle to get the required permissionsgetCatalogVersion() at the start of each flowUse MCP tools to search for version-specific documentation:
SearchWixSDKDocumentation - Search for methods and permissionsReadFullDocsArticle - Read full documentation when neededSearch queries (results show both V1 and V3 namespaces):
"getCatalogVersion" → permissions and usage"createProduct" → productsV3 (V3) and products (V1)"queryProducts" → productsV3 (V3) and products (V1)"getInventoryItem" → inventoryItemsV3 (V3) and inventory (V1)Important: After finding the method, use ReadFullDocsArticle to get the full documentation including required permissions. Return them to the user.
V1 and V3 have different field structures. For field mapping, see: Catalog V1 to V3 Migration Guide
Weekly Installs
129
Repository
GitHub Stars
3
First Seen
Mar 2, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode126
cursor48
amp47
gemini-cli47
codex47
kimi-cli47
Lark Skill Maker 教程:基于飞书CLI创建AI技能,自动化工作流与API调用指南
30,100 周安装