sbuilder-mcp 0.4.2 → 0.4.3
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/dist/catalog/api.generated.js +805 -75
- package/dist/catalog/elements.generated.js +7 -7
- package/dist/tools/page.js +18 -0
- package/dist/vision/shoot.js +8 -0
- 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.4.3] - 2026-09-08
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- sb_look and every other save no longer write an unchanged document back to the platform, since a vision loop looks far more often than it edits and a no-op save still costs a round trip and bumps the revision of every shared master the page carries; a save now returns early when the document's revision matches the one last stored.
|
|
13
|
+
- sb_look skips its lazy-image scroll walk on a page with nothing marked loading="lazy", instead of always paying the ~60ms scroll regardless of whether the page has anything below the fold to settle.
|
|
14
|
+
- The API catalog is regenerated: 481 operations (up from 456), recovering 25 merchant routes that were previously documented only in route-map comments and unreachable through sb_api_call, including article and blog-category detail routes, a course's sections/lessons/product-links/enrolments, an integration, and site templates.
|
|
15
|
+
- A handful of order-receipt trait labels (receipt_number_label, receipt_placed_label, receipt_status_label, receipt_items_label, receipt_total_label, receipt_due_label, receipt_unavailable_text) are shortened, e.g. "Order number label" to "Order number".
|
|
16
|
+
|
|
9
17
|
## [0.4.2] - 2026-09-08
|
|
10
18
|
|
|
11
19
|
### Changed
|
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.4.3] - 2026-09-08
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- sb_look và mọi lần lưu khác giờ không còn ghi lại một document không đổi lên nền tảng, vì một vòng lặp thị giác thường "xem" nhiều hơn hẳn số lần "sửa", và một lần lưu không thay đổi gì vẫn tốn một round trip và làm tăng revision của mọi bản gốc dùng chung mà trang đó mang theo; lần lưu giờ sẽ dừng sớm khi revision của document khớp với revision đã lưu gần nhất.
|
|
13
|
+
- sb_look bỏ qua bước duyệt cuộn để chờ ảnh lazy khi trang không có phần tử nào mang loading="lazy", thay vì luôn tốn ~60ms cuộn dù trang không có gì bên dưới màn hình cần ổn định.
|
|
14
|
+
- Catalog API được tạo lại: 481 operation (tăng từ 456), khôi phục 25 route merchant trước đây chỉ được ghi trong comment route-map và không thể gọi qua sb_api_call, bao gồm các route chi tiết của article và blog-category, các phần section/lesson/product-link/lượt đăng ký của một khóa học, một integration, và các site template.
|
|
15
|
+
- Một số nhãn trait của order-receipt được rút gọn (receipt_number_label, receipt_placed_label, receipt_status_label, receipt_items_label, receipt_total_label, receipt_due_label, receipt_unavailable_text), ví dụ "Order number label" thành "Order number".
|
|
16
|
+
|
|
9
17
|
## [0.4.2] - 2026-09-08
|
|
10
18
|
|
|
11
19
|
### Changed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const SWAGGER_SOURCE = {
|
|
2
|
-
"operations":
|
|
2
|
+
"operations": 481,
|
|
3
3
|
"definitions": 99,
|
|
4
4
|
"bodyCarrying": 171,
|
|
5
5
|
"bodyUndescribed": 62,
|
|
@@ -630,6 +630,27 @@ export const API_OPERATIONS = [
|
|
|
630
630
|
"bodyRef": null,
|
|
631
631
|
"credential": "siteScoped"
|
|
632
632
|
},
|
|
633
|
+
{
|
|
634
|
+
"id": "get:/_wb/checkout/receipt",
|
|
635
|
+
"method": "GET",
|
|
636
|
+
"path": "/_wb/checkout/receipt",
|
|
637
|
+
"tags": [
|
|
638
|
+
"storecheckout"
|
|
639
|
+
],
|
|
640
|
+
"summary": "Read the order behind a completed payment",
|
|
641
|
+
"params": [
|
|
642
|
+
{
|
|
643
|
+
"name": "rt",
|
|
644
|
+
"in": "query",
|
|
645
|
+
"required": true,
|
|
646
|
+
"type": "string",
|
|
647
|
+
"description": "the signed receipt grant from the completion redirect"
|
|
648
|
+
}
|
|
649
|
+
],
|
|
650
|
+
"bodyDescribed": false,
|
|
651
|
+
"bodyRef": null,
|
|
652
|
+
"credential": "siteScoped"
|
|
653
|
+
},
|
|
633
654
|
{
|
|
634
655
|
"id": "get:/_wb/course-outline",
|
|
635
656
|
"method": "GET",
|
|
@@ -3618,6 +3639,90 @@ export const API_OPERATIONS = [
|
|
|
3618
3639
|
"bodyRef": null,
|
|
3619
3640
|
"credential": "siteScoped"
|
|
3620
3641
|
},
|
|
3642
|
+
{
|
|
3643
|
+
"id": "get:/api/sites/{siteId}/articles/{id}",
|
|
3644
|
+
"method": "GET",
|
|
3645
|
+
"path": "/api/sites/{siteId}/articles/{id}",
|
|
3646
|
+
"tags": [
|
|
3647
|
+
"blog"
|
|
3648
|
+
],
|
|
3649
|
+
"summary": "Read, update or delete one blog article",
|
|
3650
|
+
"params": [
|
|
3651
|
+
{
|
|
3652
|
+
"name": "siteId",
|
|
3653
|
+
"in": "path",
|
|
3654
|
+
"required": true,
|
|
3655
|
+
"type": "string",
|
|
3656
|
+
"description": "Site ID"
|
|
3657
|
+
},
|
|
3658
|
+
{
|
|
3659
|
+
"name": "id",
|
|
3660
|
+
"in": "path",
|
|
3661
|
+
"required": true,
|
|
3662
|
+
"type": "string",
|
|
3663
|
+
"description": "Article ID"
|
|
3664
|
+
}
|
|
3665
|
+
],
|
|
3666
|
+
"bodyDescribed": false,
|
|
3667
|
+
"bodyRef": null,
|
|
3668
|
+
"credential": "siteScoped"
|
|
3669
|
+
},
|
|
3670
|
+
{
|
|
3671
|
+
"id": "put:/api/sites/{siteId}/articles/{id}",
|
|
3672
|
+
"method": "PUT",
|
|
3673
|
+
"path": "/api/sites/{siteId}/articles/{id}",
|
|
3674
|
+
"tags": [
|
|
3675
|
+
"blog"
|
|
3676
|
+
],
|
|
3677
|
+
"summary": "Read, update or delete one blog article",
|
|
3678
|
+
"params": [
|
|
3679
|
+
{
|
|
3680
|
+
"name": "siteId",
|
|
3681
|
+
"in": "path",
|
|
3682
|
+
"required": true,
|
|
3683
|
+
"type": "string",
|
|
3684
|
+
"description": "Site ID"
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"name": "id",
|
|
3688
|
+
"in": "path",
|
|
3689
|
+
"required": true,
|
|
3690
|
+
"type": "string",
|
|
3691
|
+
"description": "Article ID"
|
|
3692
|
+
}
|
|
3693
|
+
],
|
|
3694
|
+
"bodyDescribed": false,
|
|
3695
|
+
"bodyRef": null,
|
|
3696
|
+
"credential": "siteScoped"
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
"id": "delete:/api/sites/{siteId}/articles/{id}",
|
|
3700
|
+
"method": "DELETE",
|
|
3701
|
+
"path": "/api/sites/{siteId}/articles/{id}",
|
|
3702
|
+
"tags": [
|
|
3703
|
+
"blog"
|
|
3704
|
+
],
|
|
3705
|
+
"summary": "Read, update or delete one blog article",
|
|
3706
|
+
"params": [
|
|
3707
|
+
{
|
|
3708
|
+
"name": "siteId",
|
|
3709
|
+
"in": "path",
|
|
3710
|
+
"required": true,
|
|
3711
|
+
"type": "string",
|
|
3712
|
+
"description": "Site ID"
|
|
3713
|
+
},
|
|
3714
|
+
{
|
|
3715
|
+
"name": "id",
|
|
3716
|
+
"in": "path",
|
|
3717
|
+
"required": true,
|
|
3718
|
+
"type": "string",
|
|
3719
|
+
"description": "Article ID"
|
|
3720
|
+
}
|
|
3721
|
+
],
|
|
3722
|
+
"bodyDescribed": false,
|
|
3723
|
+
"bodyRef": null,
|
|
3724
|
+
"credential": "siteScoped"
|
|
3725
|
+
},
|
|
3621
3726
|
{
|
|
3622
3727
|
"id": "get:/api/sites/{siteId}/billing",
|
|
3623
3728
|
"method": "GET",
|
|
@@ -3631,6 +3736,132 @@ export const API_OPERATIONS = [
|
|
|
3631
3736
|
"bodyRef": null,
|
|
3632
3737
|
"credential": "siteScoped"
|
|
3633
3738
|
},
|
|
3739
|
+
{
|
|
3740
|
+
"id": "get:/api/sites/{siteId}/blog-categories",
|
|
3741
|
+
"method": "GET",
|
|
3742
|
+
"path": "/api/sites/{siteId}/blog-categories",
|
|
3743
|
+
"tags": [
|
|
3744
|
+
"blog"
|
|
3745
|
+
],
|
|
3746
|
+
"summary": "List or create blog categories",
|
|
3747
|
+
"params": [
|
|
3748
|
+
{
|
|
3749
|
+
"name": "siteId",
|
|
3750
|
+
"in": "path",
|
|
3751
|
+
"required": true,
|
|
3752
|
+
"type": "string",
|
|
3753
|
+
"description": "Site ID"
|
|
3754
|
+
}
|
|
3755
|
+
],
|
|
3756
|
+
"bodyDescribed": false,
|
|
3757
|
+
"bodyRef": null,
|
|
3758
|
+
"credential": "siteScoped"
|
|
3759
|
+
},
|
|
3760
|
+
{
|
|
3761
|
+
"id": "post:/api/sites/{siteId}/blog-categories",
|
|
3762
|
+
"method": "POST",
|
|
3763
|
+
"path": "/api/sites/{siteId}/blog-categories",
|
|
3764
|
+
"tags": [
|
|
3765
|
+
"blog"
|
|
3766
|
+
],
|
|
3767
|
+
"summary": "List or create blog categories",
|
|
3768
|
+
"params": [
|
|
3769
|
+
{
|
|
3770
|
+
"name": "siteId",
|
|
3771
|
+
"in": "path",
|
|
3772
|
+
"required": true,
|
|
3773
|
+
"type": "string",
|
|
3774
|
+
"description": "Site ID"
|
|
3775
|
+
}
|
|
3776
|
+
],
|
|
3777
|
+
"bodyDescribed": false,
|
|
3778
|
+
"bodyRef": null,
|
|
3779
|
+
"credential": "siteScoped"
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"id": "get:/api/sites/{siteId}/blog-categories/{id}",
|
|
3783
|
+
"method": "GET",
|
|
3784
|
+
"path": "/api/sites/{siteId}/blog-categories/{id}",
|
|
3785
|
+
"tags": [
|
|
3786
|
+
"blog"
|
|
3787
|
+
],
|
|
3788
|
+
"summary": "Read, update or delete one blog category",
|
|
3789
|
+
"params": [
|
|
3790
|
+
{
|
|
3791
|
+
"name": "siteId",
|
|
3792
|
+
"in": "path",
|
|
3793
|
+
"required": true,
|
|
3794
|
+
"type": "string",
|
|
3795
|
+
"description": "Site ID"
|
|
3796
|
+
},
|
|
3797
|
+
{
|
|
3798
|
+
"name": "id",
|
|
3799
|
+
"in": "path",
|
|
3800
|
+
"required": true,
|
|
3801
|
+
"type": "string",
|
|
3802
|
+
"description": "Blog category ID"
|
|
3803
|
+
}
|
|
3804
|
+
],
|
|
3805
|
+
"bodyDescribed": false,
|
|
3806
|
+
"bodyRef": null,
|
|
3807
|
+
"credential": "siteScoped"
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
"id": "put:/api/sites/{siteId}/blog-categories/{id}",
|
|
3811
|
+
"method": "PUT",
|
|
3812
|
+
"path": "/api/sites/{siteId}/blog-categories/{id}",
|
|
3813
|
+
"tags": [
|
|
3814
|
+
"blog"
|
|
3815
|
+
],
|
|
3816
|
+
"summary": "Read, update or delete one blog category",
|
|
3817
|
+
"params": [
|
|
3818
|
+
{
|
|
3819
|
+
"name": "siteId",
|
|
3820
|
+
"in": "path",
|
|
3821
|
+
"required": true,
|
|
3822
|
+
"type": "string",
|
|
3823
|
+
"description": "Site ID"
|
|
3824
|
+
},
|
|
3825
|
+
{
|
|
3826
|
+
"name": "id",
|
|
3827
|
+
"in": "path",
|
|
3828
|
+
"required": true,
|
|
3829
|
+
"type": "string",
|
|
3830
|
+
"description": "Blog category ID"
|
|
3831
|
+
}
|
|
3832
|
+
],
|
|
3833
|
+
"bodyDescribed": false,
|
|
3834
|
+
"bodyRef": null,
|
|
3835
|
+
"credential": "siteScoped"
|
|
3836
|
+
},
|
|
3837
|
+
{
|
|
3838
|
+
"id": "delete:/api/sites/{siteId}/blog-categories/{id}",
|
|
3839
|
+
"method": "DELETE",
|
|
3840
|
+
"path": "/api/sites/{siteId}/blog-categories/{id}",
|
|
3841
|
+
"tags": [
|
|
3842
|
+
"blog"
|
|
3843
|
+
],
|
|
3844
|
+
"summary": "Read, update or delete one blog category",
|
|
3845
|
+
"params": [
|
|
3846
|
+
{
|
|
3847
|
+
"name": "siteId",
|
|
3848
|
+
"in": "path",
|
|
3849
|
+
"required": true,
|
|
3850
|
+
"type": "string",
|
|
3851
|
+
"description": "Site ID"
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
"name": "id",
|
|
3855
|
+
"in": "path",
|
|
3856
|
+
"required": true,
|
|
3857
|
+
"type": "string",
|
|
3858
|
+
"description": "Blog category ID"
|
|
3859
|
+
}
|
|
3860
|
+
],
|
|
3861
|
+
"bodyDescribed": false,
|
|
3862
|
+
"bodyRef": null,
|
|
3863
|
+
"credential": "siteScoped"
|
|
3864
|
+
},
|
|
3634
3865
|
{
|
|
3635
3866
|
"id": "get:/api/sites/{siteId}/builtin-apps",
|
|
3636
3867
|
"method": "GET",
|
|
@@ -4037,6 +4268,27 @@ export const API_OPERATIONS = [
|
|
|
4037
4268
|
"bodyRef": null,
|
|
4038
4269
|
"credential": "siteScoped"
|
|
4039
4270
|
},
|
|
4271
|
+
{
|
|
4272
|
+
"id": "get:/api/sites/{siteId}/course-enrollments",
|
|
4273
|
+
"method": "GET",
|
|
4274
|
+
"path": "/api/sites/{siteId}/course-enrollments",
|
|
4275
|
+
"tags": [
|
|
4276
|
+
"courses"
|
|
4277
|
+
],
|
|
4278
|
+
"summary": "List course enrolments, or remove one",
|
|
4279
|
+
"params": [
|
|
4280
|
+
{
|
|
4281
|
+
"name": "siteId",
|
|
4282
|
+
"in": "path",
|
|
4283
|
+
"required": true,
|
|
4284
|
+
"type": "string",
|
|
4285
|
+
"description": "Site ID"
|
|
4286
|
+
}
|
|
4287
|
+
],
|
|
4288
|
+
"bodyDescribed": false,
|
|
4289
|
+
"bodyRef": null,
|
|
4290
|
+
"credential": "siteScoped"
|
|
4291
|
+
},
|
|
4040
4292
|
{
|
|
4041
4293
|
"id": "get:/api/sites/{siteId}/course-enrollments/export",
|
|
4042
4294
|
"method": "GET",
|
|
@@ -4086,6 +4338,34 @@ export const API_OPERATIONS = [
|
|
|
4086
4338
|
"bodyRef": null,
|
|
4087
4339
|
"credential": "siteScoped"
|
|
4088
4340
|
},
|
|
4341
|
+
{
|
|
4342
|
+
"id": "delete:/api/sites/{siteId}/course-enrollments/{id}",
|
|
4343
|
+
"method": "DELETE",
|
|
4344
|
+
"path": "/api/sites/{siteId}/course-enrollments/{id}",
|
|
4345
|
+
"tags": [
|
|
4346
|
+
"courses"
|
|
4347
|
+
],
|
|
4348
|
+
"summary": "List course enrolments, or remove one",
|
|
4349
|
+
"params": [
|
|
4350
|
+
{
|
|
4351
|
+
"name": "siteId",
|
|
4352
|
+
"in": "path",
|
|
4353
|
+
"required": true,
|
|
4354
|
+
"type": "string",
|
|
4355
|
+
"description": "Site ID"
|
|
4356
|
+
},
|
|
4357
|
+
{
|
|
4358
|
+
"name": "id",
|
|
4359
|
+
"in": "path",
|
|
4360
|
+
"required": true,
|
|
4361
|
+
"type": "string",
|
|
4362
|
+
"description": "Enrolment ID (item route)"
|
|
4363
|
+
}
|
|
4364
|
+
],
|
|
4365
|
+
"bodyDescribed": false,
|
|
4366
|
+
"bodyRef": null,
|
|
4367
|
+
"credential": "siteScoped"
|
|
4368
|
+
},
|
|
4089
4369
|
{
|
|
4090
4370
|
"id": "post:/api/sites/{siteId}/course-enrollments/{id}/extend",
|
|
4091
4371
|
"method": "POST",
|
|
@@ -4306,11 +4586,294 @@ export const API_OPERATIONS = [
|
|
|
4306
4586
|
"description": "Site ID"
|
|
4307
4587
|
},
|
|
4308
4588
|
{
|
|
4309
|
-
"name": "instructorId",
|
|
4589
|
+
"name": "instructorId",
|
|
4590
|
+
"in": "path",
|
|
4591
|
+
"required": true,
|
|
4592
|
+
"type": "string",
|
|
4593
|
+
"description": "Instructor ID"
|
|
4594
|
+
}
|
|
4595
|
+
],
|
|
4596
|
+
"bodyDescribed": false,
|
|
4597
|
+
"bodyRef": null,
|
|
4598
|
+
"credential": "siteScoped"
|
|
4599
|
+
},
|
|
4600
|
+
{
|
|
4601
|
+
"id": "post:/api/sites/{siteId}/course-instructors/{instructorId}/review",
|
|
4602
|
+
"method": "POST",
|
|
4603
|
+
"path": "/api/sites/{siteId}/course-instructors/{instructorId}/review",
|
|
4604
|
+
"tags": [
|
|
4605
|
+
"courses"
|
|
4606
|
+
],
|
|
4607
|
+
"summary": "Answer an instructor's application",
|
|
4608
|
+
"params": [
|
|
4609
|
+
{
|
|
4610
|
+
"name": "siteId",
|
|
4611
|
+
"in": "path",
|
|
4612
|
+
"required": true,
|
|
4613
|
+
"type": "string",
|
|
4614
|
+
"description": "Site ID"
|
|
4615
|
+
},
|
|
4616
|
+
{
|
|
4617
|
+
"name": "instructorId",
|
|
4618
|
+
"in": "path",
|
|
4619
|
+
"required": true,
|
|
4620
|
+
"type": "string",
|
|
4621
|
+
"description": "Instructor ID"
|
|
4622
|
+
}
|
|
4623
|
+
],
|
|
4624
|
+
"bodyDescribed": false,
|
|
4625
|
+
"bodyRef": null,
|
|
4626
|
+
"credential": "siteScoped"
|
|
4627
|
+
},
|
|
4628
|
+
{
|
|
4629
|
+
"id": "get:/api/sites/{siteId}/courses",
|
|
4630
|
+
"method": "GET",
|
|
4631
|
+
"path": "/api/sites/{siteId}/courses",
|
|
4632
|
+
"tags": [
|
|
4633
|
+
"courses",
|
|
4634
|
+
"courses"
|
|
4635
|
+
],
|
|
4636
|
+
"summary": "The app dashboard's counts",
|
|
4637
|
+
"params": [
|
|
4638
|
+
{
|
|
4639
|
+
"name": "siteId",
|
|
4640
|
+
"in": "path",
|
|
4641
|
+
"required": true,
|
|
4642
|
+
"type": "string",
|
|
4643
|
+
"description": "Site ID"
|
|
4644
|
+
},
|
|
4645
|
+
{
|
|
4646
|
+
"name": "siteId",
|
|
4647
|
+
"in": "path",
|
|
4648
|
+
"required": true,
|
|
4649
|
+
"type": "string",
|
|
4650
|
+
"description": "Site ID"
|
|
4651
|
+
}
|
|
4652
|
+
],
|
|
4653
|
+
"bodyDescribed": false,
|
|
4654
|
+
"bodyRef": null,
|
|
4655
|
+
"credential": "siteScoped"
|
|
4656
|
+
},
|
|
4657
|
+
{
|
|
4658
|
+
"id": "post:/api/sites/{siteId}/courses",
|
|
4659
|
+
"method": "POST",
|
|
4660
|
+
"path": "/api/sites/{siteId}/courses",
|
|
4661
|
+
"tags": [
|
|
4662
|
+
"courses",
|
|
4663
|
+
"courses"
|
|
4664
|
+
],
|
|
4665
|
+
"summary": "The app dashboard's counts",
|
|
4666
|
+
"params": [
|
|
4667
|
+
{
|
|
4668
|
+
"name": "siteId",
|
|
4669
|
+
"in": "path",
|
|
4670
|
+
"required": true,
|
|
4671
|
+
"type": "string",
|
|
4672
|
+
"description": "Site ID"
|
|
4673
|
+
},
|
|
4674
|
+
{
|
|
4675
|
+
"name": "siteId",
|
|
4676
|
+
"in": "path",
|
|
4677
|
+
"required": true,
|
|
4678
|
+
"type": "string",
|
|
4679
|
+
"description": "Site ID"
|
|
4680
|
+
}
|
|
4681
|
+
],
|
|
4682
|
+
"bodyDescribed": false,
|
|
4683
|
+
"bodyRef": null,
|
|
4684
|
+
"credential": "siteScoped"
|
|
4685
|
+
},
|
|
4686
|
+
{
|
|
4687
|
+
"id": "get:/api/sites/{siteId}/courses/overview",
|
|
4688
|
+
"method": "GET",
|
|
4689
|
+
"path": "/api/sites/{siteId}/courses/overview",
|
|
4690
|
+
"tags": [
|
|
4691
|
+
"courses",
|
|
4692
|
+
"courses"
|
|
4693
|
+
],
|
|
4694
|
+
"summary": "The app dashboard's counts",
|
|
4695
|
+
"params": [
|
|
4696
|
+
{
|
|
4697
|
+
"name": "siteId",
|
|
4698
|
+
"in": "path",
|
|
4699
|
+
"required": true,
|
|
4700
|
+
"type": "string",
|
|
4701
|
+
"description": "Site ID"
|
|
4702
|
+
},
|
|
4703
|
+
{
|
|
4704
|
+
"name": "siteId",
|
|
4705
|
+
"in": "path",
|
|
4706
|
+
"required": true,
|
|
4707
|
+
"type": "string",
|
|
4708
|
+
"description": "Site ID"
|
|
4709
|
+
}
|
|
4710
|
+
],
|
|
4711
|
+
"bodyDescribed": false,
|
|
4712
|
+
"bodyRef": null,
|
|
4713
|
+
"credential": "siteScoped"
|
|
4714
|
+
},
|
|
4715
|
+
{
|
|
4716
|
+
"id": "get:/api/sites/{siteId}/courses/question-counts",
|
|
4717
|
+
"method": "GET",
|
|
4718
|
+
"path": "/api/sites/{siteId}/courses/question-counts",
|
|
4719
|
+
"tags": [
|
|
4720
|
+
"courses"
|
|
4721
|
+
],
|
|
4722
|
+
"summary": "How many questions each course is waiting on",
|
|
4723
|
+
"params": [
|
|
4724
|
+
{
|
|
4725
|
+
"name": "siteId",
|
|
4726
|
+
"in": "path",
|
|
4727
|
+
"required": true,
|
|
4728
|
+
"type": "string",
|
|
4729
|
+
"description": "Site ID"
|
|
4730
|
+
},
|
|
4731
|
+
{
|
|
4732
|
+
"name": "ids",
|
|
4733
|
+
"in": "query",
|
|
4734
|
+
"required": true,
|
|
4735
|
+
"type": "string",
|
|
4736
|
+
"description": "Comma-separated course IDs"
|
|
4737
|
+
}
|
|
4738
|
+
],
|
|
4739
|
+
"bodyDescribed": false,
|
|
4740
|
+
"bodyRef": null,
|
|
4741
|
+
"credential": "siteScoped"
|
|
4742
|
+
},
|
|
4743
|
+
{
|
|
4744
|
+
"id": "get:/api/sites/{siteId}/courses/{courseId}",
|
|
4745
|
+
"method": "GET",
|
|
4746
|
+
"path": "/api/sites/{siteId}/courses/{courseId}",
|
|
4747
|
+
"tags": [
|
|
4748
|
+
"courses"
|
|
4749
|
+
],
|
|
4750
|
+
"summary": "Read, update or delete one course",
|
|
4751
|
+
"params": [
|
|
4752
|
+
{
|
|
4753
|
+
"name": "siteId",
|
|
4754
|
+
"in": "path",
|
|
4755
|
+
"required": true,
|
|
4756
|
+
"type": "string",
|
|
4757
|
+
"description": "Site ID"
|
|
4758
|
+
},
|
|
4759
|
+
{
|
|
4760
|
+
"name": "courseId",
|
|
4761
|
+
"in": "path",
|
|
4762
|
+
"required": true,
|
|
4763
|
+
"type": "string",
|
|
4764
|
+
"description": "Course ID"
|
|
4765
|
+
}
|
|
4766
|
+
],
|
|
4767
|
+
"bodyDescribed": false,
|
|
4768
|
+
"bodyRef": null,
|
|
4769
|
+
"credential": "siteScoped"
|
|
4770
|
+
},
|
|
4771
|
+
{
|
|
4772
|
+
"id": "put:/api/sites/{siteId}/courses/{courseId}",
|
|
4773
|
+
"method": "PUT",
|
|
4774
|
+
"path": "/api/sites/{siteId}/courses/{courseId}",
|
|
4775
|
+
"tags": [
|
|
4776
|
+
"courses"
|
|
4777
|
+
],
|
|
4778
|
+
"summary": "Read, update or delete one course",
|
|
4779
|
+
"params": [
|
|
4780
|
+
{
|
|
4781
|
+
"name": "siteId",
|
|
4782
|
+
"in": "path",
|
|
4783
|
+
"required": true,
|
|
4784
|
+
"type": "string",
|
|
4785
|
+
"description": "Site ID"
|
|
4786
|
+
},
|
|
4787
|
+
{
|
|
4788
|
+
"name": "courseId",
|
|
4789
|
+
"in": "path",
|
|
4790
|
+
"required": true,
|
|
4791
|
+
"type": "string",
|
|
4792
|
+
"description": "Course ID"
|
|
4793
|
+
}
|
|
4794
|
+
],
|
|
4795
|
+
"bodyDescribed": false,
|
|
4796
|
+
"bodyRef": null,
|
|
4797
|
+
"credential": "siteScoped"
|
|
4798
|
+
},
|
|
4799
|
+
{
|
|
4800
|
+
"id": "delete:/api/sites/{siteId}/courses/{courseId}",
|
|
4801
|
+
"method": "DELETE",
|
|
4802
|
+
"path": "/api/sites/{siteId}/courses/{courseId}",
|
|
4803
|
+
"tags": [
|
|
4804
|
+
"courses"
|
|
4805
|
+
],
|
|
4806
|
+
"summary": "Read, update or delete one course",
|
|
4807
|
+
"params": [
|
|
4808
|
+
{
|
|
4809
|
+
"name": "siteId",
|
|
4810
|
+
"in": "path",
|
|
4811
|
+
"required": true,
|
|
4812
|
+
"type": "string",
|
|
4813
|
+
"description": "Site ID"
|
|
4814
|
+
},
|
|
4815
|
+
{
|
|
4816
|
+
"name": "courseId",
|
|
4817
|
+
"in": "path",
|
|
4818
|
+
"required": true,
|
|
4819
|
+
"type": "string",
|
|
4820
|
+
"description": "Course ID"
|
|
4821
|
+
}
|
|
4822
|
+
],
|
|
4823
|
+
"bodyDescribed": false,
|
|
4824
|
+
"bodyRef": null,
|
|
4825
|
+
"credential": "siteScoped"
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
"id": "put:/api/sites/{siteId}/courses/{courseId}/curriculum",
|
|
4829
|
+
"method": "PUT",
|
|
4830
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/curriculum",
|
|
4831
|
+
"tags": [
|
|
4832
|
+
"courses"
|
|
4833
|
+
],
|
|
4834
|
+
"summary": "Reorder a course's chapters and lessons in one write",
|
|
4835
|
+
"params": [
|
|
4836
|
+
{
|
|
4837
|
+
"name": "siteId",
|
|
4838
|
+
"in": "path",
|
|
4839
|
+
"required": true,
|
|
4840
|
+
"type": "string",
|
|
4841
|
+
"description": "Site ID"
|
|
4842
|
+
},
|
|
4843
|
+
{
|
|
4844
|
+
"name": "courseId",
|
|
4845
|
+
"in": "path",
|
|
4846
|
+
"required": true,
|
|
4847
|
+
"type": "string",
|
|
4848
|
+
"description": "Course ID"
|
|
4849
|
+
}
|
|
4850
|
+
],
|
|
4851
|
+
"bodyDescribed": false,
|
|
4852
|
+
"bodyRef": null,
|
|
4853
|
+
"credential": "siteScoped"
|
|
4854
|
+
},
|
|
4855
|
+
{
|
|
4856
|
+
"id": "get:/api/sites/{siteId}/courses/{courseId}/instructors",
|
|
4857
|
+
"method": "GET",
|
|
4858
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/instructors",
|
|
4859
|
+
"tags": [
|
|
4860
|
+
"courses"
|
|
4861
|
+
],
|
|
4862
|
+
"summary": "Read or replace a course's instructors",
|
|
4863
|
+
"params": [
|
|
4864
|
+
{
|
|
4865
|
+
"name": "siteId",
|
|
4866
|
+
"in": "path",
|
|
4867
|
+
"required": true,
|
|
4868
|
+
"type": "string",
|
|
4869
|
+
"description": "Site ID"
|
|
4870
|
+
},
|
|
4871
|
+
{
|
|
4872
|
+
"name": "courseId",
|
|
4310
4873
|
"in": "path",
|
|
4311
4874
|
"required": true,
|
|
4312
4875
|
"type": "string",
|
|
4313
|
-
"description": "
|
|
4876
|
+
"description": "Course ID"
|
|
4314
4877
|
}
|
|
4315
4878
|
],
|
|
4316
4879
|
"bodyDescribed": false,
|
|
@@ -4318,13 +4881,13 @@ export const API_OPERATIONS = [
|
|
|
4318
4881
|
"credential": "siteScoped"
|
|
4319
4882
|
},
|
|
4320
4883
|
{
|
|
4321
|
-
"id": "
|
|
4322
|
-
"method": "
|
|
4323
|
-
"path": "/api/sites/{siteId}/
|
|
4884
|
+
"id": "put:/api/sites/{siteId}/courses/{courseId}/instructors",
|
|
4885
|
+
"method": "PUT",
|
|
4886
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/instructors",
|
|
4324
4887
|
"tags": [
|
|
4325
4888
|
"courses"
|
|
4326
4889
|
],
|
|
4327
|
-
"summary": "
|
|
4890
|
+
"summary": "Read or replace a course's instructors",
|
|
4328
4891
|
"params": [
|
|
4329
4892
|
{
|
|
4330
4893
|
"name": "siteId",
|
|
@@ -4334,11 +4897,11 @@ export const API_OPERATIONS = [
|
|
|
4334
4897
|
"description": "Site ID"
|
|
4335
4898
|
},
|
|
4336
4899
|
{
|
|
4337
|
-
"name": "
|
|
4900
|
+
"name": "courseId",
|
|
4338
4901
|
"in": "path",
|
|
4339
4902
|
"required": true,
|
|
4340
4903
|
"type": "string",
|
|
4341
|
-
"description": "
|
|
4904
|
+
"description": "Course ID"
|
|
4342
4905
|
}
|
|
4343
4906
|
],
|
|
4344
4907
|
"bodyDescribed": false,
|
|
@@ -4346,14 +4909,13 @@ export const API_OPERATIONS = [
|
|
|
4346
4909
|
"credential": "siteScoped"
|
|
4347
4910
|
},
|
|
4348
4911
|
{
|
|
4349
|
-
"id": "get:/api/sites/{siteId}/courses",
|
|
4912
|
+
"id": "get:/api/sites/{siteId}/courses/{courseId}/lessons",
|
|
4350
4913
|
"method": "GET",
|
|
4351
|
-
"path": "/api/sites/{siteId}/courses",
|
|
4914
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/lessons",
|
|
4352
4915
|
"tags": [
|
|
4353
|
-
"courses",
|
|
4354
4916
|
"courses"
|
|
4355
4917
|
],
|
|
4356
|
-
"summary": "
|
|
4918
|
+
"summary": "List, create, update or delete a course's lessons",
|
|
4357
4919
|
"params": [
|
|
4358
4920
|
{
|
|
4359
4921
|
"name": "siteId",
|
|
@@ -4363,11 +4925,11 @@ export const API_OPERATIONS = [
|
|
|
4363
4925
|
"description": "Site ID"
|
|
4364
4926
|
},
|
|
4365
4927
|
{
|
|
4366
|
-
"name": "
|
|
4928
|
+
"name": "courseId",
|
|
4367
4929
|
"in": "path",
|
|
4368
4930
|
"required": true,
|
|
4369
4931
|
"type": "string",
|
|
4370
|
-
"description": "
|
|
4932
|
+
"description": "Course ID"
|
|
4371
4933
|
}
|
|
4372
4934
|
],
|
|
4373
4935
|
"bodyDescribed": false,
|
|
@@ -4375,14 +4937,13 @@ export const API_OPERATIONS = [
|
|
|
4375
4937
|
"credential": "siteScoped"
|
|
4376
4938
|
},
|
|
4377
4939
|
{
|
|
4378
|
-
"id": "post:/api/sites/{siteId}/courses",
|
|
4940
|
+
"id": "post:/api/sites/{siteId}/courses/{courseId}/lessons",
|
|
4379
4941
|
"method": "POST",
|
|
4380
|
-
"path": "/api/sites/{siteId}/courses",
|
|
4942
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/lessons",
|
|
4381
4943
|
"tags": [
|
|
4382
|
-
"courses",
|
|
4383
4944
|
"courses"
|
|
4384
4945
|
],
|
|
4385
|
-
"summary": "
|
|
4946
|
+
"summary": "List, create, update or delete a course's lessons",
|
|
4386
4947
|
"params": [
|
|
4387
4948
|
{
|
|
4388
4949
|
"name": "siteId",
|
|
@@ -4392,11 +4953,11 @@ export const API_OPERATIONS = [
|
|
|
4392
4953
|
"description": "Site ID"
|
|
4393
4954
|
},
|
|
4394
4955
|
{
|
|
4395
|
-
"name": "
|
|
4956
|
+
"name": "courseId",
|
|
4396
4957
|
"in": "path",
|
|
4397
4958
|
"required": true,
|
|
4398
4959
|
"type": "string",
|
|
4399
|
-
"description": "
|
|
4960
|
+
"description": "Course ID"
|
|
4400
4961
|
}
|
|
4401
4962
|
],
|
|
4402
4963
|
"bodyDescribed": false,
|
|
@@ -4404,14 +4965,13 @@ export const API_OPERATIONS = [
|
|
|
4404
4965
|
"credential": "siteScoped"
|
|
4405
4966
|
},
|
|
4406
4967
|
{
|
|
4407
|
-
"id": "
|
|
4408
|
-
"method": "
|
|
4409
|
-
"path": "/api/sites/{siteId}/courses/
|
|
4968
|
+
"id": "put:/api/sites/{siteId}/courses/{courseId}/lessons/{lessonId}",
|
|
4969
|
+
"method": "PUT",
|
|
4970
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/lessons/{lessonId}",
|
|
4410
4971
|
"tags": [
|
|
4411
|
-
"courses",
|
|
4412
4972
|
"courses"
|
|
4413
4973
|
],
|
|
4414
|
-
"summary": "
|
|
4974
|
+
"summary": "List, create, update or delete a course's lessons",
|
|
4415
4975
|
"params": [
|
|
4416
4976
|
{
|
|
4417
4977
|
"name": "siteId",
|
|
@@ -4421,11 +4981,18 @@ export const API_OPERATIONS = [
|
|
|
4421
4981
|
"description": "Site ID"
|
|
4422
4982
|
},
|
|
4423
4983
|
{
|
|
4424
|
-
"name": "
|
|
4984
|
+
"name": "courseId",
|
|
4425
4985
|
"in": "path",
|
|
4426
4986
|
"required": true,
|
|
4427
4987
|
"type": "string",
|
|
4428
|
-
"description": "
|
|
4988
|
+
"description": "Course ID"
|
|
4989
|
+
},
|
|
4990
|
+
{
|
|
4991
|
+
"name": "lessonId",
|
|
4992
|
+
"in": "path",
|
|
4993
|
+
"required": true,
|
|
4994
|
+
"type": "string",
|
|
4995
|
+
"description": "Lesson ID (item routes)"
|
|
4429
4996
|
}
|
|
4430
4997
|
],
|
|
4431
4998
|
"bodyDescribed": false,
|
|
@@ -4433,13 +5000,13 @@ export const API_OPERATIONS = [
|
|
|
4433
5000
|
"credential": "siteScoped"
|
|
4434
5001
|
},
|
|
4435
5002
|
{
|
|
4436
|
-
"id": "
|
|
4437
|
-
"method": "
|
|
4438
|
-
"path": "/api/sites/{siteId}/courses/
|
|
5003
|
+
"id": "delete:/api/sites/{siteId}/courses/{courseId}/lessons/{lessonId}",
|
|
5004
|
+
"method": "DELETE",
|
|
5005
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/lessons/{lessonId}",
|
|
4439
5006
|
"tags": [
|
|
4440
5007
|
"courses"
|
|
4441
5008
|
],
|
|
4442
|
-
"summary": "
|
|
5009
|
+
"summary": "List, create, update or delete a course's lessons",
|
|
4443
5010
|
"params": [
|
|
4444
5011
|
{
|
|
4445
5012
|
"name": "siteId",
|
|
@@ -4449,11 +5016,18 @@ export const API_OPERATIONS = [
|
|
|
4449
5016
|
"description": "Site ID"
|
|
4450
5017
|
},
|
|
4451
5018
|
{
|
|
4452
|
-
"name": "
|
|
4453
|
-
"in": "
|
|
5019
|
+
"name": "courseId",
|
|
5020
|
+
"in": "path",
|
|
4454
5021
|
"required": true,
|
|
4455
5022
|
"type": "string",
|
|
4456
|
-
"description": "
|
|
5023
|
+
"description": "Course ID"
|
|
5024
|
+
},
|
|
5025
|
+
{
|
|
5026
|
+
"name": "lessonId",
|
|
5027
|
+
"in": "path",
|
|
5028
|
+
"required": true,
|
|
5029
|
+
"type": "string",
|
|
5030
|
+
"description": "Lesson ID (item routes)"
|
|
4457
5031
|
}
|
|
4458
5032
|
],
|
|
4459
5033
|
"bodyDescribed": false,
|
|
@@ -4461,14 +5035,29 @@ export const API_OPERATIONS = [
|
|
|
4461
5035
|
"credential": "siteScoped"
|
|
4462
5036
|
},
|
|
4463
5037
|
{
|
|
4464
|
-
"id": "get:/api/sites/{siteId}/courses/{courseId}",
|
|
5038
|
+
"id": "get:/api/sites/{siteId}/courses/{courseId}/products",
|
|
4465
5039
|
"method": "GET",
|
|
4466
|
-
"path": "/api/sites/{siteId}/courses/{courseId}",
|
|
5040
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/products",
|
|
4467
5041
|
"tags": [
|
|
5042
|
+
"courses",
|
|
4468
5043
|
"courses"
|
|
4469
5044
|
],
|
|
4470
|
-
"summary": "
|
|
5045
|
+
"summary": "Link products to a course, or unlink one",
|
|
4471
5046
|
"params": [
|
|
5047
|
+
{
|
|
5048
|
+
"name": "siteId",
|
|
5049
|
+
"in": "path",
|
|
5050
|
+
"required": true,
|
|
5051
|
+
"type": "string",
|
|
5052
|
+
"description": "Site ID"
|
|
5053
|
+
},
|
|
5054
|
+
{
|
|
5055
|
+
"name": "courseId",
|
|
5056
|
+
"in": "path",
|
|
5057
|
+
"required": true,
|
|
5058
|
+
"type": "string",
|
|
5059
|
+
"description": "Course ID"
|
|
5060
|
+
},
|
|
4472
5061
|
{
|
|
4473
5062
|
"name": "siteId",
|
|
4474
5063
|
"in": "path",
|
|
@@ -4489,14 +5078,29 @@ export const API_OPERATIONS = [
|
|
|
4489
5078
|
"credential": "siteScoped"
|
|
4490
5079
|
},
|
|
4491
5080
|
{
|
|
4492
|
-
"id": "
|
|
4493
|
-
"method": "
|
|
4494
|
-
"path": "/api/sites/{siteId}/courses/{courseId}",
|
|
5081
|
+
"id": "post:/api/sites/{siteId}/courses/{courseId}/products",
|
|
5082
|
+
"method": "POST",
|
|
5083
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/products",
|
|
4495
5084
|
"tags": [
|
|
5085
|
+
"courses",
|
|
4496
5086
|
"courses"
|
|
4497
5087
|
],
|
|
4498
|
-
"summary": "
|
|
5088
|
+
"summary": "Link products to a course, or unlink one",
|
|
4499
5089
|
"params": [
|
|
5090
|
+
{
|
|
5091
|
+
"name": "siteId",
|
|
5092
|
+
"in": "path",
|
|
5093
|
+
"required": true,
|
|
5094
|
+
"type": "string",
|
|
5095
|
+
"description": "Site ID"
|
|
5096
|
+
},
|
|
5097
|
+
{
|
|
5098
|
+
"name": "courseId",
|
|
5099
|
+
"in": "path",
|
|
5100
|
+
"required": true,
|
|
5101
|
+
"type": "string",
|
|
5102
|
+
"description": "Course ID"
|
|
5103
|
+
},
|
|
4500
5104
|
{
|
|
4501
5105
|
"name": "siteId",
|
|
4502
5106
|
"in": "path",
|
|
@@ -4517,13 +5121,14 @@ export const API_OPERATIONS = [
|
|
|
4517
5121
|
"credential": "siteScoped"
|
|
4518
5122
|
},
|
|
4519
5123
|
{
|
|
4520
|
-
"id": "delete:/api/sites/{siteId}/courses/{courseId}",
|
|
5124
|
+
"id": "delete:/api/sites/{siteId}/courses/{courseId}/products/{productId}",
|
|
4521
5125
|
"method": "DELETE",
|
|
4522
|
-
"path": "/api/sites/{siteId}/courses/{courseId}",
|
|
5126
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/products/{productId}",
|
|
4523
5127
|
"tags": [
|
|
5128
|
+
"courses",
|
|
4524
5129
|
"courses"
|
|
4525
5130
|
],
|
|
4526
|
-
"summary": "
|
|
5131
|
+
"summary": "Link products to a course, or unlink one",
|
|
4527
5132
|
"params": [
|
|
4528
5133
|
{
|
|
4529
5134
|
"name": "siteId",
|
|
@@ -4538,21 +5143,7 @@ export const API_OPERATIONS = [
|
|
|
4538
5143
|
"required": true,
|
|
4539
5144
|
"type": "string",
|
|
4540
5145
|
"description": "Course ID"
|
|
4541
|
-
}
|
|
4542
|
-
],
|
|
4543
|
-
"bodyDescribed": false,
|
|
4544
|
-
"bodyRef": null,
|
|
4545
|
-
"credential": "siteScoped"
|
|
4546
|
-
},
|
|
4547
|
-
{
|
|
4548
|
-
"id": "put:/api/sites/{siteId}/courses/{courseId}/curriculum",
|
|
4549
|
-
"method": "PUT",
|
|
4550
|
-
"path": "/api/sites/{siteId}/courses/{courseId}/curriculum",
|
|
4551
|
-
"tags": [
|
|
4552
|
-
"courses"
|
|
4553
|
-
],
|
|
4554
|
-
"summary": "Reorder a course's chapters and lessons in one write",
|
|
4555
|
-
"params": [
|
|
5146
|
+
},
|
|
4556
5147
|
{
|
|
4557
5148
|
"name": "siteId",
|
|
4558
5149
|
"in": "path",
|
|
@@ -4566,6 +5157,13 @@ export const API_OPERATIONS = [
|
|
|
4566
5157
|
"required": true,
|
|
4567
5158
|
"type": "string",
|
|
4568
5159
|
"description": "Course ID"
|
|
5160
|
+
},
|
|
5161
|
+
{
|
|
5162
|
+
"name": "productId",
|
|
5163
|
+
"in": "path",
|
|
5164
|
+
"required": true,
|
|
5165
|
+
"type": "string",
|
|
5166
|
+
"description": "Product ID (unlink route)"
|
|
4569
5167
|
}
|
|
4570
5168
|
],
|
|
4571
5169
|
"bodyDescribed": false,
|
|
@@ -4573,13 +5171,13 @@ export const API_OPERATIONS = [
|
|
|
4573
5171
|
"credential": "siteScoped"
|
|
4574
5172
|
},
|
|
4575
5173
|
{
|
|
4576
|
-
"id": "get:/api/sites/{siteId}/courses/{courseId}/
|
|
5174
|
+
"id": "get:/api/sites/{siteId}/courses/{courseId}/sections",
|
|
4577
5175
|
"method": "GET",
|
|
4578
|
-
"path": "/api/sites/{siteId}/courses/{courseId}/
|
|
5176
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/sections",
|
|
4579
5177
|
"tags": [
|
|
4580
5178
|
"courses"
|
|
4581
5179
|
],
|
|
4582
|
-
"summary": "
|
|
5180
|
+
"summary": "List, create, update or delete a course's sections",
|
|
4583
5181
|
"params": [
|
|
4584
5182
|
{
|
|
4585
5183
|
"name": "siteId",
|
|
@@ -4601,13 +5199,13 @@ export const API_OPERATIONS = [
|
|
|
4601
5199
|
"credential": "siteScoped"
|
|
4602
5200
|
},
|
|
4603
5201
|
{
|
|
4604
|
-
"id": "
|
|
4605
|
-
"method": "
|
|
4606
|
-
"path": "/api/sites/{siteId}/courses/{courseId}/
|
|
5202
|
+
"id": "post:/api/sites/{siteId}/courses/{courseId}/sections",
|
|
5203
|
+
"method": "POST",
|
|
5204
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/sections",
|
|
4607
5205
|
"tags": [
|
|
4608
5206
|
"courses"
|
|
4609
5207
|
],
|
|
4610
|
-
"summary": "
|
|
5208
|
+
"summary": "List, create, update or delete a course's sections",
|
|
4611
5209
|
"params": [
|
|
4612
5210
|
{
|
|
4613
5211
|
"name": "siteId",
|
|
@@ -4629,13 +5227,13 @@ export const API_OPERATIONS = [
|
|
|
4629
5227
|
"credential": "siteScoped"
|
|
4630
5228
|
},
|
|
4631
5229
|
{
|
|
4632
|
-
"id": "
|
|
4633
|
-
"method": "
|
|
4634
|
-
"path": "/api/sites/{siteId}/courses/{courseId}/
|
|
5230
|
+
"id": "put:/api/sites/{siteId}/courses/{courseId}/sections/{sectionId}",
|
|
5231
|
+
"method": "PUT",
|
|
5232
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/sections/{sectionId}",
|
|
4635
5233
|
"tags": [
|
|
4636
5234
|
"courses"
|
|
4637
5235
|
],
|
|
4638
|
-
"summary": "List,
|
|
5236
|
+
"summary": "List, create, update or delete a course's sections",
|
|
4639
5237
|
"params": [
|
|
4640
5238
|
{
|
|
4641
5239
|
"name": "siteId",
|
|
@@ -4650,6 +5248,13 @@ export const API_OPERATIONS = [
|
|
|
4650
5248
|
"required": true,
|
|
4651
5249
|
"type": "string",
|
|
4652
5250
|
"description": "Course ID"
|
|
5251
|
+
},
|
|
5252
|
+
{
|
|
5253
|
+
"name": "sectionId",
|
|
5254
|
+
"in": "path",
|
|
5255
|
+
"required": true,
|
|
5256
|
+
"type": "string",
|
|
5257
|
+
"description": "Section ID (item routes)"
|
|
4653
5258
|
}
|
|
4654
5259
|
],
|
|
4655
5260
|
"bodyDescribed": false,
|
|
@@ -4657,13 +5262,13 @@ export const API_OPERATIONS = [
|
|
|
4657
5262
|
"credential": "siteScoped"
|
|
4658
5263
|
},
|
|
4659
5264
|
{
|
|
4660
|
-
"id": "
|
|
4661
|
-
"method": "
|
|
4662
|
-
"path": "/api/sites/{siteId}/courses/{courseId}/
|
|
5265
|
+
"id": "delete:/api/sites/{siteId}/courses/{courseId}/sections/{sectionId}",
|
|
5266
|
+
"method": "DELETE",
|
|
5267
|
+
"path": "/api/sites/{siteId}/courses/{courseId}/sections/{sectionId}",
|
|
4663
5268
|
"tags": [
|
|
4664
5269
|
"courses"
|
|
4665
5270
|
],
|
|
4666
|
-
"summary": "List,
|
|
5271
|
+
"summary": "List, create, update or delete a course's sections",
|
|
4667
5272
|
"params": [
|
|
4668
5273
|
{
|
|
4669
5274
|
"name": "siteId",
|
|
@@ -4678,6 +5283,13 @@ export const API_OPERATIONS = [
|
|
|
4678
5283
|
"required": true,
|
|
4679
5284
|
"type": "string",
|
|
4680
5285
|
"description": "Course ID"
|
|
5286
|
+
},
|
|
5287
|
+
{
|
|
5288
|
+
"name": "sectionId",
|
|
5289
|
+
"in": "path",
|
|
5290
|
+
"required": true,
|
|
5291
|
+
"type": "string",
|
|
5292
|
+
"description": "Section ID (item routes)"
|
|
4681
5293
|
}
|
|
4682
5294
|
],
|
|
4683
5295
|
"bodyDescribed": false,
|
|
@@ -6833,6 +7445,90 @@ export const API_OPERATIONS = [
|
|
|
6833
7445
|
"bodyRef": null,
|
|
6834
7446
|
"credential": "siteScoped"
|
|
6835
7447
|
},
|
|
7448
|
+
{
|
|
7449
|
+
"id": "get:/api/sites/{siteId}/integrations/{id}",
|
|
7450
|
+
"method": "GET",
|
|
7451
|
+
"path": "/api/sites/{siteId}/integrations/{id}",
|
|
7452
|
+
"tags": [
|
|
7453
|
+
"integrations"
|
|
7454
|
+
],
|
|
7455
|
+
"summary": "Read, update or delete one integration",
|
|
7456
|
+
"params": [
|
|
7457
|
+
{
|
|
7458
|
+
"name": "siteId",
|
|
7459
|
+
"in": "path",
|
|
7460
|
+
"required": true,
|
|
7461
|
+
"type": "string",
|
|
7462
|
+
"description": "Site ID"
|
|
7463
|
+
},
|
|
7464
|
+
{
|
|
7465
|
+
"name": "id",
|
|
7466
|
+
"in": "path",
|
|
7467
|
+
"required": true,
|
|
7468
|
+
"type": "string",
|
|
7469
|
+
"description": "Integration ID"
|
|
7470
|
+
}
|
|
7471
|
+
],
|
|
7472
|
+
"bodyDescribed": false,
|
|
7473
|
+
"bodyRef": null,
|
|
7474
|
+
"credential": "siteScoped"
|
|
7475
|
+
},
|
|
7476
|
+
{
|
|
7477
|
+
"id": "put:/api/sites/{siteId}/integrations/{id}",
|
|
7478
|
+
"method": "PUT",
|
|
7479
|
+
"path": "/api/sites/{siteId}/integrations/{id}",
|
|
7480
|
+
"tags": [
|
|
7481
|
+
"integrations"
|
|
7482
|
+
],
|
|
7483
|
+
"summary": "Read, update or delete one integration",
|
|
7484
|
+
"params": [
|
|
7485
|
+
{
|
|
7486
|
+
"name": "siteId",
|
|
7487
|
+
"in": "path",
|
|
7488
|
+
"required": true,
|
|
7489
|
+
"type": "string",
|
|
7490
|
+
"description": "Site ID"
|
|
7491
|
+
},
|
|
7492
|
+
{
|
|
7493
|
+
"name": "id",
|
|
7494
|
+
"in": "path",
|
|
7495
|
+
"required": true,
|
|
7496
|
+
"type": "string",
|
|
7497
|
+
"description": "Integration ID"
|
|
7498
|
+
}
|
|
7499
|
+
],
|
|
7500
|
+
"bodyDescribed": false,
|
|
7501
|
+
"bodyRef": null,
|
|
7502
|
+
"credential": "siteScoped"
|
|
7503
|
+
},
|
|
7504
|
+
{
|
|
7505
|
+
"id": "delete:/api/sites/{siteId}/integrations/{id}",
|
|
7506
|
+
"method": "DELETE",
|
|
7507
|
+
"path": "/api/sites/{siteId}/integrations/{id}",
|
|
7508
|
+
"tags": [
|
|
7509
|
+
"integrations"
|
|
7510
|
+
],
|
|
7511
|
+
"summary": "Read, update or delete one integration",
|
|
7512
|
+
"params": [
|
|
7513
|
+
{
|
|
7514
|
+
"name": "siteId",
|
|
7515
|
+
"in": "path",
|
|
7516
|
+
"required": true,
|
|
7517
|
+
"type": "string",
|
|
7518
|
+
"description": "Site ID"
|
|
7519
|
+
},
|
|
7520
|
+
{
|
|
7521
|
+
"name": "id",
|
|
7522
|
+
"in": "path",
|
|
7523
|
+
"required": true,
|
|
7524
|
+
"type": "string",
|
|
7525
|
+
"description": "Integration ID"
|
|
7526
|
+
}
|
|
7527
|
+
],
|
|
7528
|
+
"bodyDescribed": false,
|
|
7529
|
+
"bodyRef": null,
|
|
7530
|
+
"credential": "siteScoped"
|
|
7531
|
+
},
|
|
6836
7532
|
{
|
|
6837
7533
|
"id": "get:/api/sites/{siteId}/inventory",
|
|
6838
7534
|
"method": "GET",
|
|
@@ -11683,6 +12379,40 @@ export const API_OPERATIONS = [
|
|
|
11683
12379
|
"bodyRef": null,
|
|
11684
12380
|
"credential": "siteScoped"
|
|
11685
12381
|
},
|
|
12382
|
+
{
|
|
12383
|
+
"id": "get:/api/templates",
|
|
12384
|
+
"method": "GET",
|
|
12385
|
+
"path": "/api/templates",
|
|
12386
|
+
"tags": [
|
|
12387
|
+
"templates"
|
|
12388
|
+
],
|
|
12389
|
+
"summary": "The site templates a new store can be created from",
|
|
12390
|
+
"params": [],
|
|
12391
|
+
"bodyDescribed": false,
|
|
12392
|
+
"bodyRef": null,
|
|
12393
|
+
"credential": "siteScoped"
|
|
12394
|
+
},
|
|
12395
|
+
{
|
|
12396
|
+
"id": "post:/api/templates/{siteId}",
|
|
12397
|
+
"method": "POST",
|
|
12398
|
+
"path": "/api/templates/{siteId}",
|
|
12399
|
+
"tags": [
|
|
12400
|
+
"templates"
|
|
12401
|
+
],
|
|
12402
|
+
"summary": "The site templates a new store can be created from",
|
|
12403
|
+
"params": [
|
|
12404
|
+
{
|
|
12405
|
+
"name": "siteId",
|
|
12406
|
+
"in": "path",
|
|
12407
|
+
"required": true,
|
|
12408
|
+
"type": "string",
|
|
12409
|
+
"description": "Site to apply the template to (POST)"
|
|
12410
|
+
}
|
|
12411
|
+
],
|
|
12412
|
+
"bodyDescribed": false,
|
|
12413
|
+
"bodyRef": null,
|
|
12414
|
+
"credential": "siteScoped"
|
|
12415
|
+
},
|
|
11686
12416
|
{
|
|
11687
12417
|
"id": "get:/api/v1/app-data",
|
|
11688
12418
|
"method": "GET",
|
|
@@ -32356,7 +32356,7 @@ export const TRAIT_WRITES = {
|
|
|
32356
32356
|
},
|
|
32357
32357
|
"receipt_number_label": {
|
|
32358
32358
|
"key": "receipt_number_label",
|
|
32359
|
-
"label": "Order number
|
|
32359
|
+
"label": "Order number",
|
|
32360
32360
|
"writes": [
|
|
32361
32361
|
{
|
|
32362
32362
|
"target": "specials",
|
|
@@ -32367,7 +32367,7 @@ export const TRAIT_WRITES = {
|
|
|
32367
32367
|
},
|
|
32368
32368
|
"receipt_placed_label": {
|
|
32369
32369
|
"key": "receipt_placed_label",
|
|
32370
|
-
"label": "Date
|
|
32370
|
+
"label": "Date",
|
|
32371
32371
|
"writes": [
|
|
32372
32372
|
{
|
|
32373
32373
|
"target": "specials",
|
|
@@ -32378,7 +32378,7 @@ export const TRAIT_WRITES = {
|
|
|
32378
32378
|
},
|
|
32379
32379
|
"receipt_status_label": {
|
|
32380
32380
|
"key": "receipt_status_label",
|
|
32381
|
-
"label": "Status
|
|
32381
|
+
"label": "Status",
|
|
32382
32382
|
"writes": [
|
|
32383
32383
|
{
|
|
32384
32384
|
"target": "specials",
|
|
@@ -32389,7 +32389,7 @@ export const TRAIT_WRITES = {
|
|
|
32389
32389
|
},
|
|
32390
32390
|
"receipt_items_label": {
|
|
32391
32391
|
"key": "receipt_items_label",
|
|
32392
|
-
"label": "Items
|
|
32392
|
+
"label": "Items",
|
|
32393
32393
|
"writes": [
|
|
32394
32394
|
{
|
|
32395
32395
|
"target": "specials",
|
|
@@ -32400,7 +32400,7 @@ export const TRAIT_WRITES = {
|
|
|
32400
32400
|
},
|
|
32401
32401
|
"receipt_total_label": {
|
|
32402
32402
|
"key": "receipt_total_label",
|
|
32403
|
-
"label": "Total
|
|
32403
|
+
"label": "Total",
|
|
32404
32404
|
"writes": [
|
|
32405
32405
|
{
|
|
32406
32406
|
"target": "specials",
|
|
@@ -32411,7 +32411,7 @@ export const TRAIT_WRITES = {
|
|
|
32411
32411
|
},
|
|
32412
32412
|
"receipt_due_label": {
|
|
32413
32413
|
"key": "receipt_due_label",
|
|
32414
|
-
"label": "Outstanding
|
|
32414
|
+
"label": "Outstanding",
|
|
32415
32415
|
"writes": [
|
|
32416
32416
|
{
|
|
32417
32417
|
"target": "specials",
|
|
@@ -32422,7 +32422,7 @@ export const TRAIT_WRITES = {
|
|
|
32422
32422
|
},
|
|
32423
32423
|
"receipt_unavailable_text": {
|
|
32424
32424
|
"key": "receipt_unavailable_text",
|
|
32425
|
-
"label": "
|
|
32425
|
+
"label": "Message",
|
|
32426
32426
|
"writes": [
|
|
32427
32427
|
{
|
|
32428
32428
|
"target": "specials",
|
package/dist/tools/page.js
CHANGED
|
@@ -44,6 +44,16 @@ export class PageSession {
|
|
|
44
44
|
pageId = '';
|
|
45
45
|
live = null;
|
|
46
46
|
stale = null;
|
|
47
|
+
/**
|
|
48
|
+
* The document revision this session last stored, so an unchanged document is
|
|
49
|
+
* not written again. `sb_look` saves before it renders — correctly, a shot of
|
|
50
|
+
* an unsaved edit is a shot of the past — and a vision loop looks far more
|
|
51
|
+
* often than it edits, so the same bytes went back over the wire on every
|
|
52
|
+
* look. A PUT that changes nothing is not free: it costs the round trip, and
|
|
53
|
+
* it BUMPS THE REVISION of every shared master the page carries, which is the
|
|
54
|
+
* fence `restampPatches` exists to keep honest.
|
|
55
|
+
*/
|
|
56
|
+
savedRev = -1;
|
|
47
57
|
warnings = [];
|
|
48
58
|
boxes = [];
|
|
49
59
|
constructor(ctx) {
|
|
@@ -96,6 +106,8 @@ export class PageSession {
|
|
|
96
106
|
// The platform's own account of what it could not compose. Typed on the
|
|
97
107
|
// response since the transport was written and read by nothing until now.
|
|
98
108
|
this.warnings = composeWarnings(src.warnings);
|
|
109
|
+
// Freshly pulled IS the stored state.
|
|
110
|
+
this.savedRev = this.doc.rev;
|
|
99
111
|
return this.doc.outline();
|
|
100
112
|
}
|
|
101
113
|
/** What the server said it could not compose when this page was opened. */
|
|
@@ -128,6 +140,8 @@ export class PageSession {
|
|
|
128
140
|
'the server; re-read it with sb_outline and reapply your change.');
|
|
129
141
|
}
|
|
130
142
|
const d = this.current();
|
|
143
|
+
if (d.rev === this.savedRev)
|
|
144
|
+
return;
|
|
131
145
|
const problems = validateForSave(d);
|
|
132
146
|
if (problems.length > 0) {
|
|
133
147
|
throw new Error(`sbuilder: refusing to save — ${problems.join(' ')}`);
|
|
@@ -141,6 +155,10 @@ export class PageSession {
|
|
|
141
155
|
// the server's own numbers coming back, not an edit anybody made, and a peer
|
|
142
156
|
// in the room gets them from its own save.
|
|
143
157
|
d.apply(restampPatches(d.doc, { globals: saved.globals, overlays: saved.overlays }));
|
|
158
|
+
// AFTER the re-stamp, which is itself a revision: the point of comparison is
|
|
159
|
+
// "is the document now different from what the server holds", and the
|
|
160
|
+
// re-stamp wrote the server's own answer back into it.
|
|
161
|
+
this.savedRev = d.rev;
|
|
144
162
|
}
|
|
145
163
|
}
|
|
146
164
|
const specSchema = z.lazy(() => z.object({
|
package/dist/vision/shoot.js
CHANGED
|
@@ -203,6 +203,14 @@ async function settleDom(page) {
|
|
|
203
203
|
* rather than hanging on an image the server will never send.
|
|
204
204
|
*/
|
|
205
205
|
async function settleLazyImages(page) {
|
|
206
|
+
// A page with nothing lazy has nothing to walk for, and the walk is 60 ms a
|
|
207
|
+
// screen. Checked rather than assumed: the renderer marks images below the
|
|
208
|
+
// first screen lazy, so a short page legitimately has none.
|
|
209
|
+
const lazy = await page
|
|
210
|
+
.evaluate(() => document.querySelectorAll('img[loading="lazy"]').length)
|
|
211
|
+
.catch(() => 1);
|
|
212
|
+
if (!lazy)
|
|
213
|
+
return;
|
|
206
214
|
await page
|
|
207
215
|
.evaluate(async () => {
|
|
208
216
|
const step = window.innerHeight || 900;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "MCP server that designs and operates a Store Builder site — pages, data, theme and publish — through the platform's own API and live-edit protocol.",
|
|
5
5
|
"mcpName": "io.github.vuluu2k/sbuilder-mcp",
|
|
6
6
|
"type": "module",
|