sbuilder-mcp 0.5.0 → 0.6.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/CHANGELOG.md +8 -0
- package/CHANGELOG.vi.md +8 -0
- package/README.md +1 -1
- package/README.vi.md +1 -1
- package/dist/catalog/api.generated.js +97 -2
- package/dist/catalog/checkout.generated.js +4989 -0
- package/dist/catalog/shapes.generated.js +1 -1
- package/dist/domains/site/review.js +14 -1
- package/dist/tools/store.js +112 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ All notable changes to this project are documented in this file.
|
|
|
6
6
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
7
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.6.0] - 2026-09-08
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_store now takes action:"form" alongside action:"checkout", seeding any of the platform's 17 form templates (contact, subscribe, order, address, consult, booking, stay, feedback, event, quote, apply, and the five auth forms login, register, forgot, verify, reset) with their own field document, instead of the checkout order form being the only one this server could build; it creates the form, PUTs it back whole (a bare create is otherwise silently renamed and turned custom), then saves the template's field document, deleting the form again if either write fails. It makes no page, since where a login form belongs is a design decision — place it with sb_add and point specials.formId at the id returned.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- sb_review no longer reports empty_container on a global section's or app block's reference node, since a page stores its shared header or footer as an empty node stamped globalRef or appBlockRef that the platform composes the master into on read; the fix the finding used to name, adding something inside it, was decomposed away by the very next save.
|
|
16
|
+
|
|
9
17
|
## [0.5.0] - 2026-09-08
|
|
10
18
|
|
|
11
19
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,14 @@ Mọi thay đổi đáng chú ý của dự án được ghi lại trong file n
|
|
|
6
6
|
Định dạng dựa trên [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
7
|
và dự án tuân theo [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.6.0] - 2026-09-08
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_store giờ nhận action:"form" bên cạnh action:"checkout", gieo bất kỳ template nào trong 17 template form của nền tảng (contact, subscribe, order, address, consult, booking, stay, feedback, event, quote, apply, và năm form xác thực login, register, forgot, verify, reset) cùng field document riêng của nó, thay vì trước đây server này chỉ dựng được đúng order form của checkout; nó tạo form, PUT lại nguyên vẹn (nếu không thì một lần tạo đơn thuần sẽ bị âm thầm đổi tên và chuyển thành custom), rồi lưu field document của template, và xoá lại form nếu một trong hai lệnh ghi đó thất bại. Nó không tạo trang, vì đặt form login ở đâu là quyết định thiết kế — hãy đặt form bằng sb_add rồi trỏ specials.formId vào id được trả về.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- sb_review không còn báo cáo empty_container trên node tham chiếu của một global section hay app block, vì một trang lưu header hoặc footer dùng chung dưới dạng node rỗng gắn cờ globalRef hoặc appBlockRef mà nền tảng sẽ ghép bản gốc vào khi đọc; cách sửa mà finding này từng nêu ra — thêm gì đó vào bên trong — sẽ bị lần lưu kế tiếp phân rã mất ngay.
|
|
16
|
+
|
|
9
17
|
## [0.5.0] - 2026-09-08
|
|
10
18
|
|
|
11
19
|
### Added
|
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ make, because those mean "this person's account".
|
|
|
98
98
|
| `sb_look` | Save, render, and return screenshots plus measured node boxes and layout defects measured on the render |
|
|
99
99
|
| `sb_event` | Give a node a click action — open the cart, go to a page, open a pop-up |
|
|
100
100
|
| `sb_bind` | Bind a node's content to real store data, or make a button add to the cart |
|
|
101
|
-
| `sb_store` | Run a store flow that must happen in a fixed order —
|
|
101
|
+
| `sb_store` | Run a store flow that must happen in a fixed order — the four writes that make a working checkout, or any of the platform's 17 form templates (login, register, forgot, contact, subscribe …) with its own field document |
|
|
102
102
|
| `sb_undo` | Put back what a PUT replaced — the platform has no page history or restore, so this is the only way back |
|
|
103
103
|
|
|
104
104
|
Twenty-eight tools, **484 API operations** (158 of the 212 writes carrying a body shape read
|
package/README.vi.md
CHANGED
|
@@ -95,7 +95,7 @@ là "tài khoản của người này".
|
|
|
95
95
|
| `sb_look` | Lưu, render, trả về ảnh chụp kèm box đo được của node và lỗi bố cục đo trên bản render |
|
|
96
96
|
| `sb_event` | Gắn click action cho một node — mở giỏ, sang trang, mở pop-up |
|
|
97
97
|
| `sb_bind` | Gắn nội dung một node vào dữ liệu cửa hàng thật, hoặc biến một nút thành nút thêm vào giỏ |
|
|
98
|
-
| `sb_store` | Chạy một luồng cửa hàng bắt buộc đúng thứ tự —
|
|
98
|
+
| `sb_store` | Chạy một luồng cửa hàng bắt buộc đúng thứ tự — bốn lệnh ghi tạo nên trang thanh toán, hoặc gieo bất kỳ template nào trong 17 form của nền tảng (login, register, forgot, contact, subscribe …) kèm field document của nó |
|
|
99
99
|
| `sb_undo` | Trả lại thứ mà một lệnh PUT đã ghi đè — nền tảng không có lịch sử trang hay restore, nên đây là đường về duy nhất |
|
|
100
100
|
|
|
101
101
|
Hai mươi tám tool, **484 operation API** (158 trong 212 lệnh ghi có hình dạng body đọc thẳng
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const SWAGGER_SOURCE = {
|
|
2
|
-
"operations":
|
|
3
|
-
"definitions":
|
|
2
|
+
"operations": 485,
|
|
3
|
+
"definitions": 102,
|
|
4
4
|
"bodyCarrying": 171,
|
|
5
5
|
"bodyUndescribed": 62,
|
|
6
6
|
"generatedFrom": "server/docs/swagger.json"
|
|
@@ -10646,6 +10646,34 @@ export const API_OPERATIONS = [
|
|
|
10646
10646
|
"bodyRef": null,
|
|
10647
10647
|
"credential": "siteScoped"
|
|
10648
10648
|
},
|
|
10649
|
+
{
|
|
10650
|
+
"id": "get:/api/sites/{siteId}/relation-slots/usage",
|
|
10651
|
+
"method": "GET",
|
|
10652
|
+
"path": "/api/sites/{siteId}/relation-slots/usage",
|
|
10653
|
+
"tags": [
|
|
10654
|
+
"relations"
|
|
10655
|
+
],
|
|
10656
|
+
"summary": "How many curated shelves reference an item",
|
|
10657
|
+
"params": [
|
|
10658
|
+
{
|
|
10659
|
+
"name": "siteId",
|
|
10660
|
+
"in": "path",
|
|
10661
|
+
"required": true,
|
|
10662
|
+
"type": "string",
|
|
10663
|
+
"description": "Site ID"
|
|
10664
|
+
},
|
|
10665
|
+
{
|
|
10666
|
+
"name": "itemId",
|
|
10667
|
+
"in": "query",
|
|
10668
|
+
"required": true,
|
|
10669
|
+
"type": "string",
|
|
10670
|
+
"description": "Product or article id"
|
|
10671
|
+
}
|
|
10672
|
+
],
|
|
10673
|
+
"bodyDescribed": false,
|
|
10674
|
+
"bodyRef": null,
|
|
10675
|
+
"credential": "siteScoped"
|
|
10676
|
+
},
|
|
10649
10677
|
{
|
|
10650
10678
|
"id": "post:/api/sites/{siteId}/restore",
|
|
10651
10679
|
"method": "POST",
|
|
@@ -15482,6 +15510,36 @@ export const API_DEFINITIONS = {
|
|
|
15482
15510
|
}
|
|
15483
15511
|
}
|
|
15484
15512
|
},
|
|
15513
|
+
"github_com_webbuilder_server_internal_products.BundleItem": {
|
|
15514
|
+
"type": "object",
|
|
15515
|
+
"properties": {
|
|
15516
|
+
"position": {
|
|
15517
|
+
"description": "Position is the merchant's arrangement — the order the components are\nlisted on the product page.",
|
|
15518
|
+
"type": "integer"
|
|
15519
|
+
},
|
|
15520
|
+
"productId": {
|
|
15521
|
+
"type": "string"
|
|
15522
|
+
},
|
|
15523
|
+
"quantity": {
|
|
15524
|
+
"description": "Quantity is how many units of the component one combo contains (≥ 1).",
|
|
15525
|
+
"type": "integer"
|
|
15526
|
+
},
|
|
15527
|
+
"variantId": {
|
|
15528
|
+
"type": "string"
|
|
15529
|
+
}
|
|
15530
|
+
}
|
|
15531
|
+
},
|
|
15532
|
+
"github_com_webbuilder_server_internal_products.BundlePricing": {
|
|
15533
|
+
"type": "string",
|
|
15534
|
+
"enum": [
|
|
15535
|
+
"fixed",
|
|
15536
|
+
"percent"
|
|
15537
|
+
],
|
|
15538
|
+
"x-enum-varnames": [
|
|
15539
|
+
"BundlePricingFixed",
|
|
15540
|
+
"BundlePricingPercent"
|
|
15541
|
+
]
|
|
15542
|
+
},
|
|
15485
15543
|
"github_com_webbuilder_server_internal_products.MetaTag": {
|
|
15486
15544
|
"type": "object",
|
|
15487
15545
|
"properties": {
|
|
@@ -15533,6 +15591,24 @@ export const API_DEFINITIONS = {
|
|
|
15533
15591
|
"brand": {
|
|
15534
15592
|
"type": "string"
|
|
15535
15593
|
},
|
|
15594
|
+
"bundleItems": {
|
|
15595
|
+
"description": "BundleItems is what one combo contains. Empty on every simple product, and\non a combo a merchant has not finished building — which is authorable but\nnot sellable (ApplyBundleTotals).",
|
|
15596
|
+
"type": "array",
|
|
15597
|
+
"items": {
|
|
15598
|
+
"$ref": "#/definitions/github_com_webbuilder_server_internal_products.BundleItem"
|
|
15599
|
+
}
|
|
15600
|
+
},
|
|
15601
|
+
"bundlePricing": {
|
|
15602
|
+
"description": "BundlePricing and BundleValue are how a combo is priced: a flat price in\ncents (\"fixed\") or a percentage off the components' total (\"percent\",\n0–100). The two share one Value field for the reason discounts.Discount\ndoes — the unit is a function of the mode, and two fields would let a\nmerchant leave the unused one holding a number that means nothing.\n\nBoth are ignored (and cleared) on a simple product.",
|
|
15603
|
+
"allOf": [
|
|
15604
|
+
{
|
|
15605
|
+
"$ref": "#/definitions/github_com_webbuilder_server_internal_products.BundlePricing"
|
|
15606
|
+
}
|
|
15607
|
+
]
|
|
15608
|
+
},
|
|
15609
|
+
"bundleValue": {
|
|
15610
|
+
"type": "integer"
|
|
15611
|
+
},
|
|
15536
15612
|
"compareAtCents": {
|
|
15537
15613
|
"description": "CompareAt of the min-price visible variant; 0 = none",
|
|
15538
15614
|
"type": "integer"
|
|
@@ -15558,6 +15634,14 @@ export const API_DEFINITIONS = {
|
|
|
15558
15634
|
"type": "string"
|
|
15559
15635
|
}
|
|
15560
15636
|
},
|
|
15637
|
+
"kind": {
|
|
15638
|
+
"description": "Kind says whether this is an ordinary product or a COMBO whose price and\navailability are derived from the components in BundleItems. Absent on the\nwire means simple — see bundle.go, which owns every rule below.",
|
|
15639
|
+
"allOf": [
|
|
15640
|
+
{
|
|
15641
|
+
"$ref": "#/definitions/github_com_webbuilder_server_internal_products.ProductKind"
|
|
15642
|
+
}
|
|
15643
|
+
]
|
|
15644
|
+
},
|
|
15561
15645
|
"moneyOverride": {
|
|
15562
15646
|
"description": "MoneyOverride is an opaque per-product money-display override (compact-convert\nrules + exchange-rate overrides), stored as a JSONB blob. The domain keeps it\nopaque — it is decoded at the render boundary (bindings.ProductSource →\nrender.ProductData) — so products stays decoupled from render/money, the same\nway the site settings document is an opaque blob. Empty ({}/null) → no override.",
|
|
15563
15647
|
"type": "array",
|
|
@@ -15694,6 +15778,17 @@ export const API_DEFINITIONS = {
|
|
|
15694
15778
|
}
|
|
15695
15779
|
}
|
|
15696
15780
|
},
|
|
15781
|
+
"github_com_webbuilder_server_internal_products.ProductKind": {
|
|
15782
|
+
"type": "string",
|
|
15783
|
+
"enum": [
|
|
15784
|
+
"simple",
|
|
15785
|
+
"bundle"
|
|
15786
|
+
],
|
|
15787
|
+
"x-enum-varnames": [
|
|
15788
|
+
"ProductKindSimple",
|
|
15789
|
+
"ProductKindBundle"
|
|
15790
|
+
]
|
|
15791
|
+
},
|
|
15697
15792
|
"github_com_webbuilder_server_internal_products.ProductStatus": {
|
|
15698
15793
|
"type": "string",
|
|
15699
15794
|
"enum": [
|