sbuilder-mcp 0.64.0 → 0.65.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 +18 -0
- package/CHANGELOG.vi.md +18 -0
- package/README.md +3 -2
- package/README.vi.md +3 -2
- package/dist/catalog/api.generated.js +232 -8
- package/dist/catalog/appscaffolds.generated.js +35 -21
- package/dist/catalog/checkout.generated.js +4 -7
- package/dist/catalog/deadkeys.generated.js +3 -3
- package/dist/catalog/elements.generated.js +8746 -5132
- package/dist/catalog/fieldskin.generated.js +134 -8
- package/dist/catalog/shapes.generated.js +50 -8
- package/dist/catalog/source.generated.js +2 -2
- package/dist/catalog/storepages.generated.js +316 -40
- package/dist/catalog/translations.generated.js +52 -4
- package/dist/domains/site/ids.js +49 -0
- package/dist/domains/site/importmap.js +10 -3
- package/dist/domains/site/inert.js +10 -0
- package/dist/domains/site/inventory.js +30 -30
- package/dist/domains/site/readiness.js +1 -1
- package/dist/tools/page.js +160 -6
- package/dist/tools/store.js +20 -17
- package/dist/transport/http.js +25 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,24 @@ 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.65.0] - 2026-09-25
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_page_create` now infers the page's type from its name (about, contact, policy, faq) when no `type` argument is passed, and opens it with that purpose's own layout.
|
|
13
|
+
- `sb_page_repair` is a new tool that renames a page's root node to `ROOT` on one page, or every page on a site, when an older seed minted a different id (`sppro_1`, `rt_<hex>`); it defaults `dry_run` to true and lists the pages it would touch before writing anything.
|
|
14
|
+
- `sb_page_open` now reports `minted_root` when the opened page's root node is not called `ROOT`, warning that an editor built before web_builder `7322af49a` renders such a page as a blank white canvas and may autosave an empty document over it.
|
|
15
|
+
- `sb_store` action `form` now creates a login, register, or contact page as its own purpose type (`login`, `register`, `contact`) instead of a generic `page`, matching the platform's own routed page types.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Every page document this server writes — `sb_page_create`'s seed, `sb_store`'s checkout and app-scaffold creates, and any raw `sb_api_call` carrying a page document — now leaves the process rooted at `ROOT`, healed in transport regardless of which tool produced it.
|
|
19
|
+
- A session whose save is rejected because the page changed underneath it now re-pulls the fresh document and reapplies the pending patches once automatically, instead of always requiring the caller to re-read and redo the edit; it still fails loudly when the other side touched one of the same nodes or local edits were unsaved.
|
|
20
|
+
- `sb_page_list`'s `page_types_note` now explains that about, contact, policy, faq, login, and register name a content page's purpose with its own type and icon, and that `sb_page_create` picks that type from the name automatically.
|
|
21
|
+
- The generated catalog was regenerated against the platform: 119 elements and 568 operations, including 18 page types and coverage for `FormKnobs`, `TextFieldKnobs`, and `SearchPanelKnobs` field-skin keys.
|
|
22
|
+
- `sb_import_site`'s page-token reader now reads only the page's own bands when picking up heading, text, and button styles, skipping a composed global header or footer so an inserted band no longer inherits a dark header's white-on-dark styling.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- A newly added `countdown` element is now flagged as inert on add, since it seeds with no end time and paints four boxes counting down to nothing until `specials.endsAt` or `specials.sourceCode` is set.
|
|
26
|
+
|
|
9
27
|
## [0.64.0] - 2026-09-24
|
|
10
28
|
|
|
11
29
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,24 @@ 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.65.0] - 2026-09-25
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_page_create` giờ tự suy ra type của trang từ tên (about, contact, policy, faq) khi không truyền tham số `type`, và mở trang đó với layout đúng với mục đích của nó.
|
|
13
|
+
- `sb_page_repair` là một tool mới, đổi tên node root của trang thành `ROOT` trên một trang, hoặc trên mọi trang của một site, khi một seed cũ hơn đã sinh ra một id khác (`sppro_1`, `rt_<hex>`); tool mặc định `dry_run` là true và liệt kê các trang sẽ bị ảnh hưởng trước khi ghi bất cứ thứ gì.
|
|
14
|
+
- `sb_page_open` giờ báo cáo `minted_root` khi node root của trang đang mở không mang tên `ROOT`, cảnh báo rằng một editor được build trước web_builder `7322af49a` sẽ render trang đó thành một canvas trắng và có thể autosave một tài liệu rỗng đè lên nó.
|
|
15
|
+
- Action `form` của `sb_store` giờ tạo trang login, register, hoặc contact đúng theo type mục đích của nó (`login`, `register`, `contact`) thay vì một `page` chung chung, khớp với các page type đã được nền tảng định tuyến sẵn.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Mọi tài liệu trang mà server này ghi ra — seed của `sb_page_create`, các lệnh tạo checkout và app-scaffold của `sb_store`, và bất kỳ `sb_api_call` thô nào mang theo tài liệu trang — giờ đều rời khỏi tiến trình với root là `ROOT`, được chữa ở tầng transport bất kể tool nào tạo ra nó.
|
|
19
|
+
- Một session mà lệnh lưu bị từ chối vì trang đã thay đổi bên dưới nó giờ sẽ tự động đọc lại tài liệu mới nhất và áp lại các patch đang chờ một lần, thay vì luôn bắt caller phải đọc lại và làm lại thay đổi; session vẫn báo lỗi rõ ràng khi bên kia đã sửa đúng những node này hoặc khi còn thay đổi cục bộ chưa lưu.
|
|
20
|
+
- `page_types_note` của `sb_page_list` giờ giải thích rằng about, contact, policy, faq, login và register đặt tên cho mục đích của một trang nội dung với type và icon riêng của nó, và `sb_page_create` tự chọn type đó từ tên trang.
|
|
21
|
+
- Catalog được sinh ra đã được làm mới dựa trên nền tảng: 119 element và 568 operation, bao gồm 18 page type và độ phủ cho các key field-skin `FormKnobs`, `TextFieldKnobs`, và `SearchPanelKnobs`.
|
|
22
|
+
- Bộ đọc token trang của `sb_import_site` giờ chỉ đọc các band thuộc về chính trang khi lấy style heading, text và button, bỏ qua một header hoặc footer dùng chung đã compose, để một band mới chèn vào không còn bị kế thừa kiểu chữ trắng-trên-nền-tối của header.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Một element `countdown` mới được thêm giờ được đánh dấu là inert khi thêm, vì nó được gieo sẵn không có thời gian kết thúc và vẽ ra bốn ô đếm ngược về không cho đến khi `specials.endsAt` hoặc `specials.sourceCode` được thiết lập.
|
|
26
|
+
|
|
9
27
|
## [0.64.0] - 2026-09-24
|
|
10
28
|
|
|
11
29
|
### Added
|
package/README.md
CHANGED
|
@@ -100,6 +100,7 @@ in this client: one would put the very key the platform exists to hold back into
|
|
|
100
100
|
| `sb_page_create` | Create a page — a store type arrives with the editor's own starting document; `type` is the route for checkout, product, category, post, course |
|
|
101
101
|
| `sb_publish` | Compile the draft into the live page (cascades to shared globals), report which revision went live, and with `verify` check the origin is serving it |
|
|
102
102
|
| `sb_page_state` | Which of a page's three copies is which — the DRAFT the editor canvas shows, the PUBLISHED row the storefront serves, and this session's — plus whether the editor will render the canvas BLANK, and where the recovery points are |
|
|
103
|
+
| `sb_page_repair` | Rename a page root that is not `ROOT` (left by older seeds) so every editor build draws it — one page or the whole site |
|
|
103
104
|
| `sb_review` | Every defect a visitor would see, each with its fix, plus the five gaps between this store and a paid order |
|
|
104
105
|
| `sb_media_list` | The site's media library |
|
|
105
106
|
| `sb_media_upload` | Add an image and get its URL — a local path, a URL the platform fetches, or a SEARCH for real photographs you read and pick from, one or several at a time |
|
|
@@ -113,8 +114,8 @@ in this client: one would put the very key the platform exists to hold back into
|
|
|
113
114
|
| `sb_store` | Run a store flow that must happen in a fixed order — `checkout` (the four writes that make a working one), `form` (any of the platform's 17 templates with its own field document), `chrome` (one shared header or footer), `menu` (a menu node bound to the site's menu, its links resolved), `overlay_attach` (a pop-up or quick view on the open page) and `app` (a built-in app plus the pages it needs), `global_attach` / `global_detach` (put an EXISTING shared section on the open page, or take it off) |
|
|
114
115
|
| `sb_undo` | Put back what a PUT replaced. The SECOND answer for a page, not the only one: the platform has versions, history and restore (`sb_api_find` "page versions"), which outlive this process — reach for those first and use this for every other shaped PUT |
|
|
115
116
|
|
|
116
|
-
Twenty-eight tools, **
|
|
117
|
-
off the handler),
|
|
117
|
+
Twenty-eight tools, **568 API operations** (195 of the 253 writes carrying a body shape read
|
|
118
|
+
off the handler), 119 elements, 79 binding sources. `sb_api_find`
|
|
118
119
|
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
119
120
|
the platform can do stays reachable — and operations added to the platform arrive with the
|
|
120
121
|
next `npm run codegen`.
|
package/README.vi.md
CHANGED
|
@@ -97,6 +97,7 @@ nhét ngược lại vào mọi bản cài.
|
|
|
97
97
|
| `sb_page_create` | Tạo một trang — trang cửa hàng sinh ra đã có sẵn tài liệu như trong editor; `type` là đường đi cho checkout, product, category, post, course |
|
|
98
98
|
| `sb_publish` | Biên dịch bản nháp thành trang live (lan sang global dùng chung), báo bản nào đã lên live, và với `verify` kiểm origin đã phục vụ đúng bản đó chưa |
|
|
99
99
|
| `sb_page_state` | Ba bản sao của một trang, bản nào là bản nào — bản NHÁP canvas editor hiển thị, dòng PUBLISHED storefront phục vụ, và bản phiên này giữ — kèm dự báo editor có render canvas TRẮNG không, và các điểm phục hồi nằm ở đâu |
|
|
100
|
+
| `sb_page_repair` | Đổi gốc trang khác `ROOT` (do seed cũ để lại) về `ROOT` để mọi bản editor vẽ được — một trang hoặc cả site |
|
|
100
101
|
| `sb_review` | Mọi khiếm khuyết người xem sẽ thấy, kèm lệnh sửa từng cái, và năm khoảng trống chắn giữa cửa hàng với một đơn đã thanh toán |
|
|
101
102
|
| `sb_media_list` | Thư viện ảnh của site |
|
|
102
103
|
| `sb_media_upload` | Thêm ảnh và lấy URL — file trên máy, một URL để nền tảng tự tải, hoặc TÌM ảnh chụp thật để đọc mô tả rồi chọn, một hoặc nhiều tấm một lượt |
|
|
@@ -110,8 +111,8 @@ nhét ngược lại vào mọi bản cài.
|
|
|
110
111
|
| `sb_store` | Chạy một luồng cửa hàng bắt buộc đúng thứ tự — `checkout` (bốn lệnh ghi tạo nên trang thanh toán), `form` (một trong 17 template của nền tảng kèm field document của nó), `chrome` (một header hoặc footer dùng chung), `menu` (một node menu bind vào menu của site, link đã phân giải), `overlay_attach` (một pop-up hay quick view trên trang đang mở) `app` (một app dựng sẵn kèm những trang nó cần), và `global_attach` / `global_detach` (đặt một section dùng chung ĐÃ CÓ lên trang đang mở, hoặc gỡ ra) |
|
|
111
112
|
| `sb_undo` | Trả lại thứ mà một lệnh PUT đã ghi đè. Với TRANG thì đây là đường về thứ hai chứ không phải duy nhất: nền tảng có version, history và restore (`sb_api_find` "page versions"), và chúng sống lâu hơn tiến trình này — hãy dùng chúng trước, còn tool này cho mọi PUT có hình dạng khác |
|
|
112
113
|
|
|
113
|
-
Hai mươi tám tool, **
|
|
114
|
-
từ handler),
|
|
114
|
+
Hai mươi tám tool, **568 operation API** (195 trong 253 lệnh ghi có hình dạng body đọc thẳng
|
|
115
|
+
từ handler), 119 element, 79 nguồn binding. `sb_api_find` là
|
|
115
116
|
một chỉ mục chứ không phải mỗi endpoint một tool, nên danh sách tool vẫn ngắn trong khi mọi
|
|
116
117
|
thứ nền tảng làm được vẫn với tới — và operation mới thêm bên nền tảng sẽ tự có sau lần
|
|
117
118
|
`npm run codegen` kế tiếp.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const SWAGGER_SOURCE = {
|
|
2
|
-
"operations":
|
|
3
|
-
"definitions":
|
|
4
|
-
"bodyCarrying":
|
|
5
|
-
"bodyUndescribed":
|
|
2
|
+
"operations": 568,
|
|
3
|
+
"definitions": 108,
|
|
4
|
+
"bodyCarrying": 214,
|
|
5
|
+
"bodyUndescribed": 92,
|
|
6
6
|
"generatedFrom": "server/docs/swagger.json"
|
|
7
7
|
};
|
|
8
8
|
export const API_OPERATIONS = [
|
|
@@ -505,6 +505,19 @@ export const API_OPERATIONS = [
|
|
|
505
505
|
"bodyRef": null,
|
|
506
506
|
"credential": "siteScoped"
|
|
507
507
|
},
|
|
508
|
+
{
|
|
509
|
+
"id": "get:/_wb/account/vouchers",
|
|
510
|
+
"method": "GET",
|
|
511
|
+
"path": "/_wb/account/vouchers",
|
|
512
|
+
"tags": [
|
|
513
|
+
"storeaccount"
|
|
514
|
+
],
|
|
515
|
+
"summary": "The signed-in shopper's voucher wallet",
|
|
516
|
+
"params": [],
|
|
517
|
+
"bodyDescribed": false,
|
|
518
|
+
"bodyRef": null,
|
|
519
|
+
"credential": "siteScoped"
|
|
520
|
+
},
|
|
508
521
|
{
|
|
509
522
|
"id": "get:/_wb/account/wishlist",
|
|
510
523
|
"method": "GET",
|
|
@@ -1146,6 +1159,19 @@ export const API_OPERATIONS = [
|
|
|
1146
1159
|
"bodyRef": null,
|
|
1147
1160
|
"credential": "siteScoped"
|
|
1148
1161
|
},
|
|
1162
|
+
{
|
|
1163
|
+
"id": "get:/_wb/vouchers/list",
|
|
1164
|
+
"method": "GET",
|
|
1165
|
+
"path": "/_wb/vouchers/list",
|
|
1166
|
+
"tags": [
|
|
1167
|
+
"storevouchers"
|
|
1168
|
+
],
|
|
1169
|
+
"summary": "List the site's publicly-listed vouchers",
|
|
1170
|
+
"params": [],
|
|
1171
|
+
"bodyDescribed": false,
|
|
1172
|
+
"bodyRef": null,
|
|
1173
|
+
"credential": "siteScoped"
|
|
1174
|
+
},
|
|
1149
1175
|
{
|
|
1150
1176
|
"id": "get:/api/admin/accounts/{id}/ai-credits",
|
|
1151
1177
|
"method": "GET",
|
|
@@ -1438,7 +1464,7 @@ export const API_OPERATIONS = [
|
|
|
1438
1464
|
"in": "body",
|
|
1439
1465
|
"required": false,
|
|
1440
1466
|
"type": "object",
|
|
1441
|
-
"description": "{bankName,bankCode,accountNumber,accountHolder,
|
|
1467
|
+
"description": "{bankName,bankCode,accountNumber,accountHolder,webhookSecret} — PUT only"
|
|
1442
1468
|
}
|
|
1443
1469
|
],
|
|
1444
1470
|
"bodyDescribed": false,
|
|
@@ -1459,7 +1485,7 @@ export const API_OPERATIONS = [
|
|
|
1459
1485
|
"in": "body",
|
|
1460
1486
|
"required": false,
|
|
1461
1487
|
"type": "object",
|
|
1462
|
-
"description": "{bankName,bankCode,accountNumber,accountHolder,
|
|
1488
|
+
"description": "{bankName,bankCode,accountNumber,accountHolder,webhookSecret} — PUT only"
|
|
1463
1489
|
}
|
|
1464
1490
|
],
|
|
1465
1491
|
"bodyDescribed": false,
|
|
@@ -2552,6 +2578,55 @@ export const API_OPERATIONS = [
|
|
|
2552
2578
|
"bodyRef": null,
|
|
2553
2579
|
"credential": "siteScoped"
|
|
2554
2580
|
},
|
|
2581
|
+
{
|
|
2582
|
+
"id": "get:/api/orgs/{id}/ai-credits",
|
|
2583
|
+
"method": "GET",
|
|
2584
|
+
"path": "/api/orgs/{id}/ai-credits",
|
|
2585
|
+
"tags": [
|
|
2586
|
+
"ai"
|
|
2587
|
+
],
|
|
2588
|
+
"summary": "An organisation's AI credit balance",
|
|
2589
|
+
"params": [
|
|
2590
|
+
{
|
|
2591
|
+
"name": "id",
|
|
2592
|
+
"in": "path",
|
|
2593
|
+
"required": true,
|
|
2594
|
+
"type": "string",
|
|
2595
|
+
"description": "org id"
|
|
2596
|
+
}
|
|
2597
|
+
],
|
|
2598
|
+
"bodyDescribed": false,
|
|
2599
|
+
"bodyRef": null,
|
|
2600
|
+
"credential": "siteScoped"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
"id": "post:/api/orgs/{id}/ai-credits/purchase",
|
|
2604
|
+
"method": "POST",
|
|
2605
|
+
"path": "/api/orgs/{id}/ai-credits/purchase",
|
|
2606
|
+
"tags": [
|
|
2607
|
+
"ai"
|
|
2608
|
+
],
|
|
2609
|
+
"summary": "Buy AI credits for an organisation",
|
|
2610
|
+
"params": [
|
|
2611
|
+
{
|
|
2612
|
+
"name": "id",
|
|
2613
|
+
"in": "path",
|
|
2614
|
+
"required": true,
|
|
2615
|
+
"type": "string",
|
|
2616
|
+
"description": "org id"
|
|
2617
|
+
},
|
|
2618
|
+
{
|
|
2619
|
+
"name": "body",
|
|
2620
|
+
"in": "body",
|
|
2621
|
+
"required": true,
|
|
2622
|
+
"type": "object",
|
|
2623
|
+
"description": "{credits:N}"
|
|
2624
|
+
}
|
|
2625
|
+
],
|
|
2626
|
+
"bodyDescribed": false,
|
|
2627
|
+
"bodyRef": null,
|
|
2628
|
+
"credential": "siteScoped"
|
|
2629
|
+
},
|
|
2555
2630
|
{
|
|
2556
2631
|
"id": "get:/api/orgs/{id}/invitations",
|
|
2557
2632
|
"method": "GET",
|
|
@@ -7203,6 +7278,111 @@ export const API_OPERATIONS = [
|
|
|
7203
7278
|
"bodyRef": "github_com_webbuilder_server_internal_discounts.Discount",
|
|
7204
7279
|
"credential": "siteScoped"
|
|
7205
7280
|
},
|
|
7281
|
+
{
|
|
7282
|
+
"id": "get:/api/sites/{siteId}/discounts/{id}/grants",
|
|
7283
|
+
"method": "GET",
|
|
7284
|
+
"path": "/api/sites/{siteId}/discounts/{id}/grants",
|
|
7285
|
+
"tags": [
|
|
7286
|
+
"discounts"
|
|
7287
|
+
],
|
|
7288
|
+
"summary": "List, assign or revoke a discount's member grants",
|
|
7289
|
+
"params": [
|
|
7290
|
+
{
|
|
7291
|
+
"name": "siteId",
|
|
7292
|
+
"in": "path",
|
|
7293
|
+
"required": true,
|
|
7294
|
+
"type": "string",
|
|
7295
|
+
"description": "Site ID"
|
|
7296
|
+
},
|
|
7297
|
+
{
|
|
7298
|
+
"name": "id",
|
|
7299
|
+
"in": "path",
|
|
7300
|
+
"required": true,
|
|
7301
|
+
"type": "string",
|
|
7302
|
+
"description": "Discount ID"
|
|
7303
|
+
},
|
|
7304
|
+
{
|
|
7305
|
+
"name": "grant",
|
|
7306
|
+
"in": "body",
|
|
7307
|
+
"required": false,
|
|
7308
|
+
"type": "object",
|
|
7309
|
+
"description": "{customerId} (POST only)"
|
|
7310
|
+
}
|
|
7311
|
+
],
|
|
7312
|
+
"bodyDescribed": true,
|
|
7313
|
+
"bodyRef": "internal_discounts_rest.grantRequest",
|
|
7314
|
+
"credential": "siteScoped"
|
|
7315
|
+
},
|
|
7316
|
+
{
|
|
7317
|
+
"id": "post:/api/sites/{siteId}/discounts/{id}/grants",
|
|
7318
|
+
"method": "POST",
|
|
7319
|
+
"path": "/api/sites/{siteId}/discounts/{id}/grants",
|
|
7320
|
+
"tags": [
|
|
7321
|
+
"discounts"
|
|
7322
|
+
],
|
|
7323
|
+
"summary": "List, assign or revoke a discount's member grants",
|
|
7324
|
+
"params": [
|
|
7325
|
+
{
|
|
7326
|
+
"name": "siteId",
|
|
7327
|
+
"in": "path",
|
|
7328
|
+
"required": true,
|
|
7329
|
+
"type": "string",
|
|
7330
|
+
"description": "Site ID"
|
|
7331
|
+
},
|
|
7332
|
+
{
|
|
7333
|
+
"name": "id",
|
|
7334
|
+
"in": "path",
|
|
7335
|
+
"required": true,
|
|
7336
|
+
"type": "string",
|
|
7337
|
+
"description": "Discount ID"
|
|
7338
|
+
},
|
|
7339
|
+
{
|
|
7340
|
+
"name": "grant",
|
|
7341
|
+
"in": "body",
|
|
7342
|
+
"required": false,
|
|
7343
|
+
"type": "object",
|
|
7344
|
+
"description": "{customerId} (POST only)"
|
|
7345
|
+
}
|
|
7346
|
+
],
|
|
7347
|
+
"bodyDescribed": true,
|
|
7348
|
+
"bodyRef": "internal_discounts_rest.grantRequest",
|
|
7349
|
+
"credential": "siteScoped"
|
|
7350
|
+
},
|
|
7351
|
+
{
|
|
7352
|
+
"id": "delete:/api/sites/{siteId}/discounts/{id}/grants/{grantId}",
|
|
7353
|
+
"method": "DELETE",
|
|
7354
|
+
"path": "/api/sites/{siteId}/discounts/{id}/grants/{grantId}",
|
|
7355
|
+
"tags": [
|
|
7356
|
+
"discounts"
|
|
7357
|
+
],
|
|
7358
|
+
"summary": "List, assign or revoke a discount's member grants",
|
|
7359
|
+
"params": [
|
|
7360
|
+
{
|
|
7361
|
+
"name": "siteId",
|
|
7362
|
+
"in": "path",
|
|
7363
|
+
"required": true,
|
|
7364
|
+
"type": "string",
|
|
7365
|
+
"description": "Site ID"
|
|
7366
|
+
},
|
|
7367
|
+
{
|
|
7368
|
+
"name": "id",
|
|
7369
|
+
"in": "path",
|
|
7370
|
+
"required": true,
|
|
7371
|
+
"type": "string",
|
|
7372
|
+
"description": "Discount ID"
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
"name": "grant",
|
|
7376
|
+
"in": "body",
|
|
7377
|
+
"required": false,
|
|
7378
|
+
"type": "object",
|
|
7379
|
+
"description": "{customerId} (POST only)"
|
|
7380
|
+
}
|
|
7381
|
+
],
|
|
7382
|
+
"bodyDescribed": true,
|
|
7383
|
+
"bodyRef": "internal_discounts_rest.grantRequest",
|
|
7384
|
+
"credential": "siteScoped"
|
|
7385
|
+
},
|
|
7206
7386
|
{
|
|
7207
7387
|
"id": "get:/api/sites/{siteId}/domains",
|
|
7208
7388
|
"method": "GET",
|
|
@@ -12441,6 +12621,34 @@ export const API_OPERATIONS = [
|
|
|
12441
12621
|
"bodyRef": "github_com_webbuilder_server_internal_products.Product",
|
|
12442
12622
|
"credential": "siteScoped"
|
|
12443
12623
|
},
|
|
12624
|
+
{
|
|
12625
|
+
"id": "get:/api/sites/{siteId}/products/attributes",
|
|
12626
|
+
"method": "GET",
|
|
12627
|
+
"path": "/api/sites/{siteId}/products/attributes",
|
|
12628
|
+
"tags": [
|
|
12629
|
+
"products"
|
|
12630
|
+
],
|
|
12631
|
+
"summary": "Attribute axes already used on this site",
|
|
12632
|
+
"params": [
|
|
12633
|
+
{
|
|
12634
|
+
"name": "siteId",
|
|
12635
|
+
"in": "path",
|
|
12636
|
+
"required": true,
|
|
12637
|
+
"type": "string",
|
|
12638
|
+
"description": "Site ID"
|
|
12639
|
+
},
|
|
12640
|
+
{
|
|
12641
|
+
"name": "limit",
|
|
12642
|
+
"in": "query",
|
|
12643
|
+
"required": false,
|
|
12644
|
+
"type": "integer",
|
|
12645
|
+
"description": "Max axes to return (clamped to products.MaxAttributeSuggestions)"
|
|
12646
|
+
}
|
|
12647
|
+
],
|
|
12648
|
+
"bodyDescribed": false,
|
|
12649
|
+
"bodyRef": null,
|
|
12650
|
+
"credential": "siteScoped"
|
|
12651
|
+
},
|
|
12444
12652
|
{
|
|
12445
12653
|
"id": "get:/api/sites/{siteId}/products/export",
|
|
12446
12654
|
"method": "GET",
|
|
@@ -16281,7 +16489,7 @@ export const API_OPERATIONS = [
|
|
|
16281
16489
|
"in": "query",
|
|
16282
16490
|
"required": false,
|
|
16283
16491
|
"type": "string",
|
|
16284
|
-
"description": "Filter by page type (page|product|category|blog|post|error|maintain|search|checkout|complete)"
|
|
16492
|
+
"description": "Filter by page type (page|product|category|blog|post|error|maintain|search|checkout|complete|account|course|about|contact|policy|faq|login|register)"
|
|
16285
16493
|
},
|
|
16286
16494
|
{
|
|
16287
16495
|
"name": "status",
|
|
@@ -16351,7 +16559,7 @@ export const API_OPERATIONS = [
|
|
|
16351
16559
|
"in": "query",
|
|
16352
16560
|
"required": false,
|
|
16353
16561
|
"type": "string",
|
|
16354
|
-
"description": "Filter by page type (page|product|category|blog|post|error|maintain|search|checkout|complete)"
|
|
16562
|
+
"description": "Filter by page type (page|product|category|blog|post|error|maintain|search|checkout|complete|account|course|about|contact|policy|faq|login|register)"
|
|
16355
16563
|
},
|
|
16356
16564
|
{
|
|
16357
16565
|
"name": "status",
|
|
@@ -17308,6 +17516,10 @@ export const API_DEFINITIONS = {
|
|
|
17308
17516
|
"id": {
|
|
17309
17517
|
"type": "string"
|
|
17310
17518
|
},
|
|
17519
|
+
"memberBound": {
|
|
17520
|
+
"description": "MemberBound marks this discount as OWNED: it is redeemable only by a\ncustomer who holds a DiscountGrant for it (see grant.go), and the\nownership check lives in orders.Checkout.resolveDiscount — the one\nfunction both the quote and the order-create path call.\n\nOFF by construction exactly as PublicListed is: Go's zero value is\nfalse and the Postgres column defaults false, so a discount is a\nbearer code until somebody says otherwise. The opposite default would\nretroactively lock every shopper out of every code that works today.\n\nIT IS AN EXPLICIT FLAG RATHER THAN \"this discount has at least one\ngrant\", and that is the whole design (contract D3): deriving boundness\nwould mean that adding the FIRST grant to an ordinary shared code\nsilently made that code refuse for every other shopper on the site —\n\"save this one for Anna\" breaking SUMMER20 for everyone, with nothing\non screen and nothing in a log. With the flag, a grant on an UNBOUND\ncode is a bookmark that changes spendability for nobody, and a grant\non a BOUND code is an entitlement. Two facts, two words.\n\nNormalize keeps two invariants true for every write path: an automatic\ndiscount is never member-bound, and a member-bound discount is never\nPublicListed. See Normalize's clauses for why each one is there.",
|
|
17521
|
+
"type": "boolean"
|
|
17522
|
+
},
|
|
17311
17523
|
"method": {
|
|
17312
17524
|
"description": "Method decides how the discount is applied: \"code\" (customer enters a code)\nor \"automatic\" (applied at checkout with no code). Automatic discounts may\nhave a blank Code.",
|
|
17313
17525
|
"type": "string"
|
|
@@ -17315,6 +17527,10 @@ export const API_DEFINITIONS = {
|
|
|
17315
17527
|
"minOrderCents": {
|
|
17316
17528
|
"type": "integer"
|
|
17317
17529
|
},
|
|
17530
|
+
"publicListed": {
|
|
17531
|
+
"description": "PublicListed is the merchant's explicit opt-in to publish this code on the\nanonymous storefront list (GET /_wb/vouchers/list, package\ninternal/discounts/public). OFF by construction, not by care: the zero\nvalue is false and the Postgres column defaults false, so a discount is\nprivate until a merchant ticks the box — never the other way round on a\nfeature that publishes a working code to anyone who opens the shop.\n\nNormalize forces this back to false whenever UsageLimit == 1: a\nsingle-use code on a public list is a race by construction (the first\nanonymous reader spends it and every later reader gets a refusal), and\nit is also the exact shape of a loyalty-minted bearer voucher\n(loyaltyminter.MintFixedCode sets UsageLimit: 1 because \"the code ...\nmust die on first use\"). See Normalize's comment for why the rule keys\non UsageLimit rather than the minted code's \"DIEM-\" prefix.",
|
|
17532
|
+
"type": "boolean"
|
|
17533
|
+
},
|
|
17318
17534
|
"siteId": {
|
|
17319
17535
|
"type": "string"
|
|
17320
17536
|
},
|
|
@@ -18952,6 +19168,14 @@ export const API_DEFINITIONS = {
|
|
|
18952
19168
|
}
|
|
18953
19169
|
}
|
|
18954
19170
|
},
|
|
19171
|
+
"internal_discounts_rest.grantRequest": {
|
|
19172
|
+
"type": "object",
|
|
19173
|
+
"properties": {
|
|
19174
|
+
"customerId": {
|
|
19175
|
+
"type": "string"
|
|
19176
|
+
}
|
|
19177
|
+
}
|
|
19178
|
+
},
|
|
18955
19179
|
"internal_giftcards_rest.adjustRequest": {
|
|
18956
19180
|
"type": "object",
|
|
18957
19181
|
"properties": {
|
|
@@ -34,8 +34,8 @@ export const APP_SCAFFOLDS = {
|
|
|
34
34
|
"en": "Course page"
|
|
35
35
|
},
|
|
36
36
|
"document": {
|
|
37
|
-
"schema_version":
|
|
38
|
-
"root_node_id": "
|
|
37
|
+
"schema_version": 2,
|
|
38
|
+
"root_node_id": "ROOT",
|
|
39
39
|
"nodes": {
|
|
40
40
|
"crs1_1": {
|
|
41
41
|
"id": "crs1_1",
|
|
@@ -263,7 +263,7 @@ export const APP_SCAFFOLDS = {
|
|
|
263
263
|
"id": "crs1_6",
|
|
264
264
|
"data": {
|
|
265
265
|
"type": "flex-section",
|
|
266
|
-
"parent": "
|
|
266
|
+
"parent": "ROOT",
|
|
267
267
|
"nodes": [
|
|
268
268
|
"crs1_1",
|
|
269
269
|
"crs1_2",
|
|
@@ -303,8 +303,8 @@ export const APP_SCAFFOLDS = {
|
|
|
303
303
|
"events": [],
|
|
304
304
|
"bindings": []
|
|
305
305
|
},
|
|
306
|
-
"
|
|
307
|
-
"id": "
|
|
306
|
+
"ROOT": {
|
|
307
|
+
"id": "ROOT",
|
|
308
308
|
"data": {
|
|
309
309
|
"type": "root",
|
|
310
310
|
"parent": null,
|
|
@@ -333,8 +333,8 @@ export const APP_SCAFFOLDS = {
|
|
|
333
333
|
"en": "Courses"
|
|
334
334
|
},
|
|
335
335
|
"document": {
|
|
336
|
-
"schema_version":
|
|
337
|
-
"root_node_id": "
|
|
336
|
+
"schema_version": 2,
|
|
337
|
+
"root_node_id": "ROOT",
|
|
338
338
|
"nodes": {
|
|
339
339
|
"crs2_1": {
|
|
340
340
|
"id": "crs2_1",
|
|
@@ -374,7 +374,21 @@ export const APP_SCAFFOLDS = {
|
|
|
374
374
|
"paginationItemHeight": 8,
|
|
375
375
|
"paginationItemGap": 4,
|
|
376
376
|
"paginationItemBg": "rgba(0,0,0,0.25)",
|
|
377
|
-
"paginationItemActiveBg": "rgba(0,0,0,0.8)"
|
|
377
|
+
"paginationItemActiveBg": "rgba(0,0,0,0.8)",
|
|
378
|
+
"paginationBg": "transparent",
|
|
379
|
+
"pagerAlign": "center",
|
|
380
|
+
"pagerSpacing": 24,
|
|
381
|
+
"pagerItemGap": 8,
|
|
382
|
+
"pagerItemWidth": 36,
|
|
383
|
+
"pagerItemHeight": 36,
|
|
384
|
+
"pagerItemBorderRadius": 8,
|
|
385
|
+
"pagerItemBg": "transparent",
|
|
386
|
+
"moreAlign": "center",
|
|
387
|
+
"moreSpacing": 24,
|
|
388
|
+
"moreHeight": 40,
|
|
389
|
+
"morePaddingX": 20,
|
|
390
|
+
"moreBorderRadius": 8,
|
|
391
|
+
"moreBg": "transparent"
|
|
378
392
|
},
|
|
379
393
|
"specials": {
|
|
380
394
|
"loadMoreLabel": "Load more",
|
|
@@ -616,7 +630,7 @@ export const APP_SCAFFOLDS = {
|
|
|
616
630
|
"id": "crs2_6",
|
|
617
631
|
"data": {
|
|
618
632
|
"type": "flex-section",
|
|
619
|
-
"parent": "
|
|
633
|
+
"parent": "ROOT",
|
|
620
634
|
"nodes": [
|
|
621
635
|
"crs2_1"
|
|
622
636
|
],
|
|
@@ -652,8 +666,8 @@ export const APP_SCAFFOLDS = {
|
|
|
652
666
|
"events": [],
|
|
653
667
|
"bindings": []
|
|
654
668
|
},
|
|
655
|
-
"
|
|
656
|
-
"id": "
|
|
669
|
+
"ROOT": {
|
|
670
|
+
"id": "ROOT",
|
|
657
671
|
"data": {
|
|
658
672
|
"type": "root",
|
|
659
673
|
"parent": null,
|
|
@@ -682,8 +696,8 @@ export const APP_SCAFFOLDS = {
|
|
|
682
696
|
"en": "Learning"
|
|
683
697
|
},
|
|
684
698
|
"document": {
|
|
685
|
-
"schema_version":
|
|
686
|
-
"root_node_id": "
|
|
699
|
+
"schema_version": 2,
|
|
700
|
+
"root_node_id": "ROOT",
|
|
687
701
|
"nodes": {
|
|
688
702
|
"crs3_1": {
|
|
689
703
|
"id": "crs3_1",
|
|
@@ -719,7 +733,7 @@ export const APP_SCAFFOLDS = {
|
|
|
719
733
|
"id": "crs3_2",
|
|
720
734
|
"data": {
|
|
721
735
|
"type": "flex-section",
|
|
722
|
-
"parent": "
|
|
736
|
+
"parent": "ROOT",
|
|
723
737
|
"nodes": [
|
|
724
738
|
"crs3_1"
|
|
725
739
|
],
|
|
@@ -755,8 +769,8 @@ export const APP_SCAFFOLDS = {
|
|
|
755
769
|
"events": [],
|
|
756
770
|
"bindings": []
|
|
757
771
|
},
|
|
758
|
-
"
|
|
759
|
-
"id": "
|
|
772
|
+
"ROOT": {
|
|
773
|
+
"id": "ROOT",
|
|
760
774
|
"data": {
|
|
761
775
|
"type": "root",
|
|
762
776
|
"parent": null,
|
|
@@ -785,8 +799,8 @@ export const APP_SCAFFOLDS = {
|
|
|
785
799
|
"en": "My courses"
|
|
786
800
|
},
|
|
787
801
|
"document": {
|
|
788
|
-
"schema_version":
|
|
789
|
-
"root_node_id": "
|
|
802
|
+
"schema_version": 2,
|
|
803
|
+
"root_node_id": "ROOT",
|
|
790
804
|
"nodes": {
|
|
791
805
|
"crs4_1": {
|
|
792
806
|
"id": "crs4_1",
|
|
@@ -816,7 +830,7 @@ export const APP_SCAFFOLDS = {
|
|
|
816
830
|
"id": "crs4_2",
|
|
817
831
|
"data": {
|
|
818
832
|
"type": "flex-section",
|
|
819
|
-
"parent": "
|
|
833
|
+
"parent": "ROOT",
|
|
820
834
|
"nodes": [
|
|
821
835
|
"crs4_1"
|
|
822
836
|
],
|
|
@@ -852,8 +866,8 @@ export const APP_SCAFFOLDS = {
|
|
|
852
866
|
"events": [],
|
|
853
867
|
"bindings": []
|
|
854
868
|
},
|
|
855
|
-
"
|
|
856
|
-
"id": "
|
|
869
|
+
"ROOT": {
|
|
870
|
+
"id": "ROOT",
|
|
857
871
|
"data": {
|
|
858
872
|
"type": "root",
|
|
859
873
|
"parent": null,
|
|
@@ -512,10 +512,10 @@ export const CHECKOUT_FORM_DOCUMENT = {
|
|
|
512
512
|
};
|
|
513
513
|
export const CHECKOUT_PAGE_DOCUMENT = {
|
|
514
514
|
"schema_version": 2,
|
|
515
|
-
"root_node_id": "
|
|
515
|
+
"root_node_id": "ROOT",
|
|
516
516
|
"nodes": {
|
|
517
|
-
"
|
|
518
|
-
"id": "
|
|
517
|
+
"ROOT": {
|
|
518
|
+
"id": "ROOT",
|
|
519
519
|
"data": {
|
|
520
520
|
"type": "root",
|
|
521
521
|
"parent": null,
|
|
@@ -537,7 +537,7 @@ export const CHECKOUT_PAGE_DOCUMENT = {
|
|
|
537
537
|
"id": "ckp_2",
|
|
538
538
|
"data": {
|
|
539
539
|
"type": "flex-section",
|
|
540
|
-
"parent": "
|
|
540
|
+
"parent": "ROOT",
|
|
541
541
|
"nodes": [
|
|
542
542
|
"ckp_3",
|
|
543
543
|
"ckp_4",
|
|
@@ -3367,7 +3367,6 @@ export const FORM_TEMPLATES = {
|
|
|
3367
3367
|
"name": "ngay_hen",
|
|
3368
3368
|
"label": "Ngày hẹn",
|
|
3369
3369
|
"description": "",
|
|
3370
|
-
"placeholder": "",
|
|
3371
3370
|
"required": true,
|
|
3372
3371
|
"showLabel": true,
|
|
3373
3372
|
"mapTo": "",
|
|
@@ -3667,7 +3666,6 @@ export const FORM_TEMPLATES = {
|
|
|
3667
3666
|
"name": "nhan_phong",
|
|
3668
3667
|
"label": "Ngày nhận phòng",
|
|
3669
3668
|
"description": "",
|
|
3670
|
-
"placeholder": "",
|
|
3671
3669
|
"required": true,
|
|
3672
3670
|
"showLabel": true,
|
|
3673
3671
|
"mapTo": "",
|
|
@@ -3703,7 +3701,6 @@ export const FORM_TEMPLATES = {
|
|
|
3703
3701
|
"name": "tra_phong",
|
|
3704
3702
|
"label": "Ngày trả phòng",
|
|
3705
3703
|
"description": "",
|
|
3706
|
-
"placeholder": "",
|
|
3707
3704
|
"required": true,
|
|
3708
3705
|
"showLabel": true,
|
|
3709
3706
|
"mapTo": "",
|