webcake-storefront-mcp 1.31.3 → 1.31.4
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/dist/changelog.json +7 -7
- package/dist/guides.js +15 -0
- package/package.json +1 -1
package/dist/changelog.json
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "1.31.4",
|
|
4
|
+
"d": "26/06/2026",
|
|
5
|
+
"type": "Added",
|
|
6
|
+
"en": "The guide returned by get_http_function and get_site_custom_code now includes a verified end-to-end \"Custom data TABLES (collections)\" section…",
|
|
7
|
+
"vi": "Hướng dẫn trả về bởi get_http_function và get_site_custom_code nay bổ sung phần \"Custom data TABLES (collections)\" đã được xác minh thực tế, ghi lại…"
|
|
8
|
+
},
|
|
2
9
|
{
|
|
3
10
|
"v": "1.31.3",
|
|
4
11
|
"d": "26/06/2026",
|
|
@@ -33,12 +40,5 @@
|
|
|
33
40
|
"type": "Added",
|
|
34
41
|
"en": "New list_customers tool browses or searches the site's customer list; accepts page, limit, and term (name/phone/email keyword) and returns a compact…",
|
|
35
42
|
"vi": "Tool mới list_customers duyệt hoặc tìm kiếm danh sách khách hàng của site; nhận các tham số page, limit và term (từ khóa tên/điện thoại/email) và…"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"v": "1.29.0",
|
|
39
|
-
"d": "26/06/2026",
|
|
40
|
-
"type": "Added",
|
|
41
|
-
"en": "scaffold_global_sections now accepts a logo parameter (hosted image URL) that renders an image element in the header instead of the brand-name text…",
|
|
42
|
-
"vi": "scaffold_global_sections nay nhận thêm tham số logo (URL hình ảnh được host) để hiển thị phần tử image trong header thay vì node text tên thương hiệu."
|
|
43
43
|
}
|
|
44
44
|
]
|
package/dist/guides.js
CHANGED
|
@@ -101,6 +101,21 @@ await Members.updateOne({ id: created.id }, { tien_con_lai: 100000 });
|
|
|
101
101
|
const userId = request.customer?.id ?? ""; if (!userId) return { mess: "NO_ACCOUNT_CALL" };
|
|
102
102
|
try { /* … */ return { mess: "OK", ...data }; } catch (err) { console.error(err?.message || err); return { mess: "SYSTEM_ERROR" }; }
|
|
103
103
|
|
|
104
|
+
## Custom data TABLES (collections) — end-to-end (VERIFIED flow)
|
|
105
|
+
A "collection" is a custom DB table. To stand one up and use it from a function:
|
|
106
|
+
1. Create the table + columns with the MCP tools: create_collection({ name, columns:[{name,type},…] })
|
|
107
|
+
then update_collection_columns to change them. (Types: string|text|integer|float|boolean|
|
|
108
|
+
naive_datetime|binary_id|map|array.) The table always has id/inserted_at/updated_at/creator_id.
|
|
109
|
+
2. READ rows directly with the MCP tool query_collection_records({ table_name, where, order_by }).
|
|
110
|
+
3. WRITE rows from an HTTP function via webcake-data — db.model(table) gives full CRUD on it:
|
|
111
|
+
const T = db.model("my_table");
|
|
112
|
+
const row = await T.create({ email: "a@b.com" }); // insert
|
|
113
|
+
await T.updateOne({ id: row.id }, { email: "c@d.com" }); // update
|
|
114
|
+
await T.deleteMany({ email: "a@b.com" }); // delete
|
|
115
|
+
const rows = await T.find({ … }).select([…]).limit(50); // query
|
|
116
|
+
(There is NO direct dashboard record-INSERT API — record writes MUST go through a function.
|
|
117
|
+
Deploy the function with the update_http_function MCP tool, then call it with run_function.)
|
|
118
|
+
|
|
104
119
|
## Built-in @webcake/* modules (first arg is always request; they auth via global.token — these run
|
|
105
120
|
## INSIDE the function sandbox, so they reach the /cms_function endpoints the dashboard JWT can't)
|
|
106
121
|
Thin wrappers over the backend's /cms_function/{site_id}/... endpoints. Pass request so
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcake-storefront-mcp",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.4",
|
|
4
4
|
"description": "MCP server for the WebCake/StoreCake storefront builder — page CRUD, page authoring, products, orders, and more",
|
|
5
5
|
"mcpName": "io.github.vuluu2k/webcake-storefront-mcp",
|
|
6
6
|
"license": "MIT",
|