@zentodo/cli 0.1.12 → 0.1.13

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/bin.cjs CHANGED
@@ -3252,8 +3252,8 @@ var fasttimeCapabilities = [
3252
3252
  domain: "fasttime",
3253
3253
  action: "sync-push",
3254
3254
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u5FEB\u901F\u65F6\u95F4\u8BB0\u5F55\u3002",
3255
- description: "\u8C03\u7528 /fastTimeRecordController/putSyncFastTimeRecord\u3002",
3256
- http: { method: "POST", path: "/fastTimeRecordController/putSyncFastTimeRecord", pragmas: ["stripAutoKeys"] },
3255
+ description: "\u8C03\u7528 /fastTimeRecordController/putSyncFastTimeRecord(\u540E\u7AEF @RequestBody FastTimeRecord)\u3002JSON \u4F53\u3002",
3256
+ http: { method: "POST", path: "/fastTimeRecordController/putSyncFastTimeRecord", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
3257
3257
  params: [
3258
3258
  { name: "record_key", backendName: "recordKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684\u8BB0\u5F55 key\u3002" },
3259
3259
  { name: "title", backendName: "title", type: "string", description: "\u6807\u9898\u3002" },
@@ -3594,8 +3594,8 @@ var attachCapabilities = [
3594
3594
  domain: "attach",
3595
3595
  action: "sync-push",
3596
3596
  summary: "\u63A8\u9001\u9644\u4EF6\u5143\u6570\u636E\u8BB0\u5F55\u3002",
3597
- description: "\u8C03\u7528 /attachmentController/putSyncAttchment\u3002",
3598
- http: { method: "POST", path: "/attachmentController/putSyncAttchment", pragmas: ["stripAutoKeys"] },
3597
+ description: "\u8C03\u7528 /attachmentController/putSyncAttchment(\u540E\u7AEF @RequestBody Attachment)\u3002JSON \u4F53,\u4EC5\u5143\u6570\u636E,\u4E0D\u5305\u542B\u6587\u4EF6\u4E8C\u8FDB\u5236\u3002",
3598
+ http: { method: "POST", path: "/attachmentController/putSyncAttchment", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
3599
3599
  params: [
3600
3600
  { name: "attachment_key", backendName: "attachmentKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 attachmentKey\u3002" },
3601
3601
  { name: "sync_flag", backendName: "syncFlag", type: "string", default: "M", description: "\u540C\u6B65\u6807\u8BB0\u3002" }
@@ -3866,8 +3866,8 @@ var labelCapabilities = [
3866
3866
  domain: "label",
3867
3867
  action: "sync-push",
3868
3868
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u6807\u7B7E\u3002",
3869
- description: "\u8C03\u7528 /labelController/putSyncLabel\u3002",
3870
- http: { method: "POST", path: "/labelController/putSyncLabel", pragmas: ["stripAutoKeys"] },
3869
+ description: "\u8C03\u7528 /labelController/putSyncLabel(\u540E\u7AEF @RequestBody Label)\u3002JSON \u4F53\u3002",
3870
+ http: { method: "POST", path: "/labelController/putSyncLabel", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
3871
3871
  params: [
3872
3872
  { name: "label_key", backendName: "labelKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684\u6807\u7B7E key\u3002" },
3873
3873
  { name: "name", backendName: "labelName", type: "string", description: "\u6807\u7B7E\u540D\u3002" },
@@ -3967,8 +3967,8 @@ var mindmapCapabilities = [
3967
3967
  domain: "mindmap",
3968
3968
  action: "sync-push",
3969
3969
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u601D\u7EF4\u5BFC\u56FE\u8282\u70B9\u5143\u6570\u636E\u3002",
3970
- description: "\u8C03\u7528 /gdMetaController/putSyncGDMeta\u3002",
3971
- http: { method: "POST", path: "/gdMetaController/putSyncGDMeta", pragmas: ["stripAutoKeys"] },
3970
+ description: "\u8C03\u7528 /gdMetaController/putSyncGDMeta(\u540E\u7AEF @RequestBody GDMeta)\u3002JSON \u4F53\u3002",
3971
+ http: { method: "POST", path: "/gdMetaController/putSyncGDMeta", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
3972
3972
  params: [
3973
3973
  { name: "gd_meta_key", backendName: "gdMetaKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 gdMetaKey\u3002" },
3974
3974
  { name: "parent_key", backendName: "parentKey", type: "integer", description: "\u7236\u8282\u70B9 key\u3002" },
@@ -4100,8 +4100,8 @@ var pomoCapabilities = [
4100
4100
  domain: "pomo",
4101
4101
  action: "sync-push-worker",
4102
4102
  summary: "\u63A8\u9001\u4E00\u6761\u756A\u8304\u949F\u8BB0\u5F55\u3002",
4103
- description: "\u8C03\u7528 /tomatoWorkerController/putSyncTomatoWorker\u3002",
4104
- http: { method: "POST", path: "/tomatoWorkerController/putSyncTomatoWorker", pragmas: ["stripAutoKeys"] },
4103
+ description: "\u8C03\u7528 /tomatoWorkerController/putSyncTomatoWorker(\u540E\u7AEF @RequestBody TomatoWorker)\u3002JSON \u4F53\u3002",
4104
+ http: { method: "POST", path: "/tomatoWorkerController/putSyncTomatoWorker", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4105
4105
  params: [
4106
4106
  { name: "tomato_key", backendName: "tomatoKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 tomatoKey\u3002" },
4107
4107
  { name: "task_key", backendName: "taskKey", type: "integer", description: "\u4EFB\u52A1 taskKey\u3002" },
@@ -4131,8 +4131,8 @@ var pomoCapabilities = [
4131
4131
  domain: "pomo",
4132
4132
  action: "config-set",
4133
4133
  summary: "\u65B0\u5EFA/\u66F4\u65B0\u756A\u8304\u949F\u914D\u7F6E\u3002",
4134
- description: "\u8C03\u7528 /tomatoConfigController/putSyncTomatoConfig\u3002",
4135
- http: { method: "POST", path: "/tomatoConfigController/putSyncTomatoConfig", pragmas: ["stripAutoKeys"] },
4134
+ description: "\u8C03\u7528 /tomatoConfigController/putSyncTomatoConfig(\u540E\u7AEF @RequestBody TomatoConfig)\u3002JSON \u4F53\u3002",
4135
+ http: { method: "POST", path: "/tomatoConfigController/putSyncTomatoConfig", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4136
4136
  params: [
4137
4137
  { name: "config_key", backendName: "configKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 configKey\u3002" },
4138
4138
  { name: "focus_duration_sec", backendName: "focusDuration", type: "integer", description: "\u4E13\u6CE8\u79D2\u6570\u3002" },
@@ -4187,8 +4187,8 @@ var projectCapabilities = [
4187
4187
  domain: "project",
4188
4188
  action: "sync-push",
4189
4189
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5F52\u6863/\u5220\u9664\u9879\u76EE(\u7531 syncFlag \u533A\u5206)\u3002",
4190
- description: "\u8C03\u7528 /projectController/putSyncProject\u3002\u6240\u6709\u5B57\u6BB5\u901A\u8FC7 FormData \u63D0\u4EA4,\u81EA\u52A8\u5265\u79BB id/rowid\u3002",
4191
- http: { method: "POST", path: "/projectController/putSyncProject", pragmas: ["stripAutoKeys"] },
4190
+ description: "\u8C03\u7528 /projectController/putSyncProject(\u540E\u7AEF @RequestBody Project)\u3002\u6240\u6709\u5B57\u6BB5\u4EE5 JSON \u4F53\u63D0\u4EA4,\u81EA\u52A8\u5265\u79BB id/rowid\u3002",
4191
+ http: { method: "POST", path: "/projectController/putSyncProject", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4192
4192
  params: [
4193
4193
  { name: "project_key", backendName: "projectKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 projectKey(\u7701\u7565\u5219\u65B0\u5EFA)\u3002" },
4194
4194
  { name: "name", backendName: "projectName", type: "string", description: "\u9879\u76EE\u540D\u79F0\u3002" },
@@ -4309,8 +4309,8 @@ var quadrantCapabilities = [
4309
4309
  domain: "quadrant",
4310
4310
  action: "sync-push",
4311
4311
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u56DB\u8C61\u9650\u914D\u7F6E\u3002",
4312
- description: "\u8C03\u7528 /quadrantController/putSyncQuadrant\u3002",
4313
- http: { method: "POST", path: "/quadrantController/putSyncQuadrant", pragmas: ["stripAutoKeys"] },
4312
+ description: "\u8C03\u7528 /quadrantController/putSyncQuadrant(\u540E\u7AEF @RequestBody Quadrant)\u3002JSON \u4F53\u3002",
4313
+ http: { method: "POST", path: "/quadrantController/putSyncQuadrant", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4314
4314
  params: [
4315
4315
  { name: "quadrant_key", backendName: "quadrantKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 quadrantKey\u3002" },
4316
4316
  { name: "title", backendName: "quadrantTitle", type: "string", description: "\u8C61\u9650\u6807\u9898\u3002" },
@@ -4363,8 +4363,8 @@ var rewardCapabilities = [
4363
4363
  domain: "reward",
4364
4364
  action: "store-sync-push",
4365
4365
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u5956\u52B1\u5546\u54C1\u3002",
4366
- description: "\u8C03\u7528 /rewardStoreController/putSyncRewardStore\u3002",
4367
- http: { method: "POST", path: "/rewardStoreController/putSyncRewardStore", pragmas: ["stripAutoKeys"] },
4366
+ description: "\u8C03\u7528 /rewardStoreController/putSyncRewardStore(\u540E\u7AEF @RequestBody RewardStore)\u3002JSON \u4F53\u3002",
4367
+ http: { method: "POST", path: "/rewardStoreController/putSyncRewardStore", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4368
4368
  params: [
4369
4369
  { name: "reward_key", backendName: "rewardKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 rewardKey\u3002" },
4370
4370
  { name: "name", backendName: "rewardName", type: "string", description: "\u5956\u52B1\u540D\u79F0\u3002" },
@@ -4427,8 +4427,8 @@ var rewardCapabilities = [
4427
4427
  domain: "reward",
4428
4428
  action: "record-sync-push",
4429
4429
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u5956\u52B1\u5151\u6362\u8BB0\u5F55\u3002",
4430
- description: "\u8C03\u7528 /rewardRecordController/putSyncRewardRecord\u3002",
4431
- http: { method: "POST", path: "/rewardRecordController/putSyncRewardRecord", pragmas: ["stripAutoKeys"] },
4430
+ description: "\u8C03\u7528 /rewardRecordController/putSyncRewardRecord(\u540E\u7AEF @RequestBody RewardRecord)\u3002JSON \u4F53\u3002",
4431
+ http: { method: "POST", path: "/rewardRecordController/putSyncRewardRecord", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4432
4432
  params: [
4433
4433
  { name: "record_key", backendName: "recordKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684\u8BB0\u5F55 key\u3002" },
4434
4434
  { name: "reward_key", backendName: "rewardKey", type: "integer", description: "\u5173\u8054\u7684\u5956\u52B1 key\u3002" },
@@ -4480,8 +4480,8 @@ var sceneCapabilities = [
4480
4480
  domain: "scene",
4481
4481
  action: "sync-push",
4482
4482
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u573A\u666F\u3002",
4483
- description: "\u8C03\u7528 /sceneController/putSyncScene\u3002",
4484
- http: { method: "POST", path: "/sceneController/putSyncScene", pragmas: ["stripAutoKeys"] },
4483
+ description: "\u8C03\u7528 /sceneController/putSyncScene(\u540E\u7AEF @RequestBody Scene)\u3002JSON \u4F53\u3002",
4484
+ http: { method: "POST", path: "/sceneController/putSyncScene", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4485
4485
  params: [
4486
4486
  { name: "scene_key", backendName: "sceneKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684\u573A\u666F key\u3002" },
4487
4487
  { name: "name", backendName: "sceneName", type: "string", description: "\u573A\u666F\u540D\u79F0\u3002" },
@@ -4534,8 +4534,8 @@ var subprojectCapabilities = [
4534
4534
  domain: "subproject",
4535
4535
  action: "sync-push",
4536
4536
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u5B50\u9879\u76EE\u3002",
4537
- description: "\u8C03\u7528 /subProjectController/putSyncSubProject\u3002",
4538
- http: { method: "POST", path: "/subProjectController/putSyncSubProject", pragmas: ["stripAutoKeys"] },
4537
+ description: "\u8C03\u7528 /subProjectController/putSyncSubProject(\u540E\u7AEF @RequestBody SubProject)\u3002JSON \u4F53\u3002",
4538
+ http: { method: "POST", path: "/subProjectController/putSyncSubProject", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4539
4539
  params: [
4540
4540
  { name: "sub_project_key", backendName: "subProjectKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684\u5B50\u9879\u76EE key\u3002" },
4541
4541
  { name: "project_key", backendName: "projectKey", type: "integer", required: true, description: "\u7236\u9879\u76EE projectKey\u3002" },
@@ -4587,8 +4587,8 @@ var subtaskCapabilities = [
4587
4587
  domain: "subtask",
4588
4588
  action: "sync-push",
4589
4589
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u5B50\u4EFB\u52A1(\u6839\u636E syncFlag)\u3002",
4590
- description: "\u8C03\u7528 /subTaskController/putSyncSubTask\u3002\u6240\u6709\u5B57\u6BB5\u901A\u8FC7 FormData \u63D0\u4EA4,\u81EA\u52A8\u5265\u79BB id/rowid\u3002",
4591
- http: { method: "POST", path: "/subTaskController/putSyncSubTask", pragmas: ["stripAutoKeys"] },
4590
+ description: "\u8C03\u7528 /subTaskController/putSyncSubTask(\u540E\u7AEF @RequestBody SubTask)\u3002JSON \u4F53,\u81EA\u52A8\u5265\u79BB id/rowid\u3002",
4591
+ http: { method: "POST", path: "/subTaskController/putSyncSubTask", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4592
4592
  params: [
4593
4593
  { name: "sub_task_key", backendName: "subTaskKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684\u5B50\u4EFB\u52A1 key(\u7701\u7565\u5219\u65B0\u5EFA)\u3002" },
4594
4594
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u7236\u4EFB\u52A1 taskKey\u3002" },
@@ -4641,8 +4641,8 @@ var targetCapabilities = [
4641
4641
  domain: "target",
4642
4642
  action: "sync-push",
4643
4643
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u76EE\u6807(Target)\u3002",
4644
- description: "\u8C03\u7528 /targetController/putSyncTarget\u3002",
4645
- http: { method: "POST", path: "/targetController/putSyncTarget", pragmas: ["stripAutoKeys"] },
4644
+ description: "\u8C03\u7528 /targetController/putSyncTarget(\u540E\u7AEF @RequestBody Target)\u3002JSON \u4F53\u3002",
4645
+ http: { method: "POST", path: "/targetController/putSyncTarget", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4646
4646
  params: [
4647
4647
  { name: "target_key", backendName: "targetKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684\u76EE\u6807 key\u3002" },
4648
4648
  { name: "title", backendName: "targetTitle", type: "string", description: "\u76EE\u6807\u6807\u9898\u3002" },
@@ -4695,8 +4695,8 @@ var taskCapabilities = [
4695
4695
  domain: "task",
4696
4696
  action: "add",
4697
4697
  summary: "\u521B\u5EFA\u4E00\u4E2A\u65B0\u4EFB\u52A1\u3002",
4698
- description: "\u8C03\u7528 /taskController/insertTask,\u4F7F\u7528 FormData \u63D0\u4EA4\u3002",
4699
- http: { method: "POST", path: "/taskController/insertTask" },
4698
+ description: "\u8C03\u7528 /taskController/insertTask,\u4F7F\u7528 JSON \u8BF7\u6C42\u4F53(\u540E\u7AEF @RequestBody)\u3002",
4699
+ http: { method: "POST", path: "/taskController/insertTask", bodyFormat: "json" },
4700
4700
  params: [
4701
4701
  { name: "title", backendName: "taskTitle", type: "string", required: true, description: "\u4EFB\u52A1\u6807\u9898\u3002" },
4702
4702
  { name: "desc", backendName: "taskDescription", type: "string", description: "\u4EFB\u52A1\u63CF\u8FF0\u3002" },
@@ -4725,8 +4725,8 @@ var taskCapabilities = [
4725
4725
  domain: "task",
4726
4726
  action: "update",
4727
4727
  summary: "\u66F4\u65B0\u4EFB\u52A1\u3002\u4EC5\u4E0A\u4F20\u663E\u5F0F\u4F20\u5165\u7684\u5B57\u6BB5\u3002",
4728
- description: "\u8C03\u7528 /taskController/updateTask\u3002\u672A\u4F20\u5165\u7684\u5B57\u6BB5\u4E0D\u4F1A\u88AB\u5199\u5165 FormData,\u907F\u514D\u628A\u73B0\u6709\u5217\u7F6E\u7A7A\u3002",
4729
- http: { method: "POST", path: "/taskController/updateTask" },
4728
+ description: "\u8C03\u7528 /taskController/updateTask(\u540E\u7AEF @RequestBody)\u3002\u672A\u4F20\u5165\u7684\u5B57\u6BB5\u4E0D\u4F1A\u88AB\u5199\u5165 JSON payload,\u907F\u514D\u628A\u73B0\u6709\u5217\u7F6E\u7A7A\u3002",
4729
+ http: { method: "POST", path: "/taskController/updateTask", bodyFormat: "json" },
4730
4730
  params: [
4731
4731
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u4EFB\u52A1 taskKey\u3002" },
4732
4732
  { name: "title", backendName: "taskTitle", type: "string", description: "\u65B0\u6807\u9898\u3002" },
@@ -4750,7 +4750,7 @@ var taskCapabilities = [
4750
4750
  action: "delete",
4751
4751
  summary: "\u8F6F\u5220\u9664\u4EFB\u52A1(syncFlag=D)\u3002",
4752
4752
  description: "\u8C03\u7528 /taskController/updateTask,\u81EA\u52A8\u6CE8\u5165 syncFlag=D\u3002",
4753
- http: { method: "POST", path: "/taskController/updateTask", pragmas: ["softDelete"] },
4753
+ http: { method: "POST", path: "/taskController/updateTask", pragmas: ["softDelete"], bodyFormat: "json" },
4754
4754
  params: [
4755
4755
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u4EFB\u52A1 taskKey\u3002" }
4756
4756
  ],
@@ -4766,7 +4766,7 @@ var taskCapabilities = [
4766
4766
  action: "complete",
4767
4767
  summary: "\u5C06\u4EFB\u52A1\u6807\u8BB0\u4E3A\u4ECA\u65E5\u5B8C\u6210\u3002",
4768
4768
  description: "\u8C03\u7528 /taskController/updateTask,\u81EA\u52A8\u6CE8\u5165 taskState=0 \u4E0E\u4ECA\u65E5\u7684 taskCompletedTime\u3002",
4769
- http: { method: "POST", path: "/taskController/updateTask", pragmas: ["completeTask"] },
4769
+ http: { method: "POST", path: "/taskController/updateTask", pragmas: ["completeTask"], bodyFormat: "json" },
4770
4770
  params: [
4771
4771
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u4EFB\u52A1 taskKey\u3002" }
4772
4772
  ],
@@ -4779,8 +4779,8 @@ var taskCapabilities = [
4779
4779
  domain: "task",
4780
4780
  action: "uncomplete",
4781
4781
  summary: "\u53D6\u6D88\u4EFB\u52A1\u5B8C\u6210\u72B6\u6001\u3002",
4782
- description: "\u8C03\u7528 /taskController/updateTask,\u628A taskState \u8FD8\u539F\u4E3A 1 \u5E76\u6E05\u7A7A\u5B8C\u6210\u65F6\u95F4\u3002",
4783
- http: { method: "POST", path: "/taskController/updateTask" },
4782
+ description: "\u8C03\u7528 /taskController/updateTask(@RequestBody),\u628A taskState \u8FD8\u539F\u4E3A 1 \u5E76\u6E05\u7A7A\u5B8C\u6210\u65F6\u95F4\u3002",
4783
+ http: { method: "POST", path: "/taskController/updateTask", bodyFormat: "json" },
4784
4784
  params: [
4785
4785
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u4EFB\u52A1 taskKey\u3002" },
4786
4786
  { name: "task_state", backendName: "taskState", type: "integer", default: 1, description: "\u5F00\u653E\u6001(\u4E00\u822C\u4E3A 1)\u3002" },
@@ -4796,7 +4796,7 @@ var taskCapabilities = [
4796
4796
  action: "mit",
4797
4797
  summary: "\u8BBE\u7F6E\u6216\u53D6\u6D88 MIT(\u4ECA\u65E5\u6700\u91CD\u8981)\u3002",
4798
4798
  description: "\u8C03\u7528 /taskController/updateTask,\u6CE8\u5165 isMIT \u4E0E syncFlag=M\u3002",
4799
- http: { method: "POST", path: "/taskController/updateTask", pragmas: ["setMit"] },
4799
+ http: { method: "POST", path: "/taskController/updateTask", pragmas: ["setMit"], bodyFormat: "json" },
4800
4800
  params: [
4801
4801
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u4EFB\u52A1 taskKey\u3002" },
4802
4802
  { name: "is_mit", type: "boolean", required: true, description: "\u662F\u5426\u4E3A MIT\u3002" }
@@ -4811,7 +4811,7 @@ var taskCapabilities = [
4811
4811
  action: "quadrant",
4812
4812
  summary: "\u8BBE\u7F6E\u4EFB\u52A1\u6240\u5C5E\u7684\u65F6\u95F4\u56DB\u8C61\u9650(0..3)\u3002",
4813
4813
  description: "\u8C03\u7528 /taskController/updateTask,\u6CE8\u5165 task4time \u4E0E syncFlag=M\u3002",
4814
- http: { method: "POST", path: "/taskController/updateTask", pragmas: ["setQuadrant"] },
4814
+ http: { method: "POST", path: "/taskController/updateTask", pragmas: ["setQuadrant"], bodyFormat: "json" },
4815
4815
  params: [
4816
4816
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u4EFB\u52A1 taskKey\u3002" },
4817
4817
  { name: "quadrant", type: "integer", required: true, description: "\u8C61\u9650 0..3\u3002" }
@@ -4972,8 +4972,8 @@ var taskCapabilities = [
4972
4972
  domain: "task",
4973
4973
  action: "sync-push",
4974
4974
  summary: "\u5411\u670D\u52A1\u5668\u63A8\u9001\u5355\u6761\u4EFB\u52A1\u8BB0\u5F55\u3002",
4975
- description: "\u8C03\u7528 /taskController/putSyncTask\u3002\u6240\u6709\u5B57\u6BB5\u901A\u8FC7 FormData \u63D0\u4EA4,\u81EA\u52A8\u5265\u79BB id / rowid\u3002",
4976
- http: { method: "POST", path: "/taskController/putSyncTask", pragmas: ["stripAutoKeys"] },
4975
+ description: "\u8C03\u7528 /taskController/putSyncTask(@RequestBody),\u5B8C\u6574\u5B57\u6BB5\u63D0\u4EA4,\u81EA\u52A8\u5265\u79BB id / rowid\u3002",
4976
+ http: { method: "POST", path: "/taskController/putSyncTask", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
4977
4977
  params: [
4978
4978
  { name: "task_key", backendName: "taskKey", type: "integer", required: true, description: "\u4EFB\u52A1 taskKey\u3002" },
4979
4979
  { name: "record", type: "object", description: "\u5B8C\u6574\u8BB0\u5F55\u5B57\u6BB5(\u6253\u5E73)\u3002" }
@@ -5007,8 +5007,8 @@ var timelineCapabilities = [
5007
5007
  domain: "timeline",
5008
5008
  action: "sync-push",
5009
5009
  summary: "\u65B0\u5EFA/\u66F4\u65B0/\u5220\u9664\u65F6\u95F4\u8F74\u6761\u76EE\u3002",
5010
- description: "\u8C03\u7528 /timeLineController/putSyncTimeLine\u3002",
5011
- http: { method: "POST", path: "/timeLineController/putSyncTimeLine", pragmas: ["stripAutoKeys"] },
5010
+ description: "\u8C03\u7528 /timeLineController/putSyncTimeLine(\u540E\u7AEF @RequestBody TimeLine)\u3002JSON \u4F53\u3002",
5011
+ http: { method: "POST", path: "/timeLineController/putSyncTimeLine", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
5012
5012
  params: [
5013
5013
  { name: "time_line_key", backendName: "timeLineKey", type: "integer", description: "\u5DF2\u5B58\u5728\u7684 timeLineKey\u3002" },
5014
5014
  { name: "title", backendName: "timeLineTitle", type: "string", description: "\u6807\u9898\u3002" },
@@ -5233,8 +5233,8 @@ var workstateCapabilities = [
5233
5233
  domain: "workstate",
5234
5234
  action: "update",
5235
5235
  summary: "\u66F4\u65B0\u4E00\u6761\u5DE5\u4F5C\u72B6\u6001\u8BB0\u5F55\u3002",
5236
- description: "\u8C03\u7528 /workStateController/updateWorkState\u3002",
5237
- http: { method: "POST", path: "/workStateController/updateWorkState" },
5236
+ description: "\u8C03\u7528 /workStateController/updateWorkState(\u540E\u7AEF @RequestBody WorkState)\u3002JSON \u4F53\u3002",
5237
+ http: { method: "POST", path: "/workStateController/updateWorkState", bodyFormat: "json" },
5238
5238
  params: [
5239
5239
  { name: "work_state_key", backendName: "workStateKey", type: "string", required: true, description: "\u5DE5\u4F5C\u72B6\u6001 key\u3002" },
5240
5240
  { name: "title", backendName: "title", type: "string", description: "\u65B0\u6807\u9898\u3002" },
@@ -5280,8 +5280,8 @@ var workstateCapabilities = [
5280
5280
  domain: "workstate",
5281
5281
  action: "sync-push",
5282
5282
  summary: "\u63A8\u9001\u4E00\u6761\u5DE5\u4F5C\u72B6\u6001\u8BB0\u5F55\u3002",
5283
- description: "\u8C03\u7528 /workStateController/putSyncWorkState\u3002",
5284
- http: { method: "POST", path: "/workStateController/putSyncWorkState", pragmas: ["stripAutoKeys"] },
5283
+ description: "\u8C03\u7528 /workStateController/putSyncWorkState(\u540E\u7AEF @RequestBody WorkState)\u3002JSON \u4F53\u3002",
5284
+ http: { method: "POST", path: "/workStateController/putSyncWorkState", pragmas: ["stripAutoKeys"], bodyFormat: "json" },
5285
5285
  params: [
5286
5286
  { name: "work_state_key", backendName: "workStateKey", type: "string", description: "\u5DF2\u5B58\u5728\u7684 key\u3002" },
5287
5287
  { name: "sync_flag", backendName: "syncFlag", type: "string", default: "M", description: "\u540C\u6B65\u6807\u8BB0\u3002" }
@@ -5515,13 +5515,15 @@ var HttpClient = class {
5515
5515
  );
5516
5516
  const signal = init.signal ? anySignal([init.signal, controller.signal]) : controller.signal;
5517
5517
  try {
5518
+ const headers = {
5519
+ "X-Request-Id": requestId,
5520
+ "User-Agent": this.config.userAgent ?? "zentodo-cli/0.1.0"
5521
+ };
5522
+ if (init.contentType) headers["Content-Type"] = init.contentType;
5518
5523
  const response = await fetch(url, {
5519
5524
  method: init.method,
5520
5525
  body: init.method === "GET" ? void 0 : init.body,
5521
- headers: {
5522
- "X-Request-Id": requestId,
5523
- "User-Agent": this.config.userAgent ?? "zentodo-cli/0.1.0"
5524
- },
5526
+ headers,
5525
5527
  signal
5526
5528
  });
5527
5529
  const text = await response.text();
@@ -5780,6 +5782,92 @@ function redact(f) {
5780
5782
  // ../core/src/runtime/runner.ts
5781
5783
  init_build_shims();
5782
5784
 
5785
+ // ../core/src/client/jsonbody.ts
5786
+ init_build_shims();
5787
+ function buildJsonBody(spec, input, context = {}) {
5788
+ const payload = {};
5789
+ const fields = [];
5790
+ const set = (name, value) => {
5791
+ payload[name] = value;
5792
+ const existing = fields.find((f) => f.name === name);
5793
+ if (existing) existing.value = value;
5794
+ else fields.push({ name, value, isFile: false });
5795
+ };
5796
+ const hasUsrKey = spec.params.some((p) => (p.backendName ?? snakeToCamel(p.name)) === "usrKey");
5797
+ if (!hasUsrKey && context.usrKey !== void 0 && context.usrKey !== null) {
5798
+ const numeric = typeof context.usrKey === "number" ? context.usrKey : Number(context.usrKey);
5799
+ set("usrKey", Number.isNaN(numeric) ? context.usrKey : numeric);
5800
+ }
5801
+ for (const p of spec.params) {
5802
+ if (p.source === "file") {
5803
+ continue;
5804
+ }
5805
+ const value = input[p.name] ?? p.default;
5806
+ if (value === void 0 || value === null) {
5807
+ if (p.required) throw new Error(`missing required parameter: ${p.name}`);
5808
+ continue;
5809
+ }
5810
+ const backendName = p.backendName ?? snakeToCamel(p.name);
5811
+ set(backendName, coerceValue(p, value));
5812
+ }
5813
+ for (const pragma of spec.http.pragmas ?? []) {
5814
+ switch (pragma) {
5815
+ case "softDelete":
5816
+ set("syncFlag", "D");
5817
+ break;
5818
+ case "completeTask":
5819
+ set("taskState", 0);
5820
+ set("taskCompletedTime", todayBackendDate());
5821
+ break;
5822
+ case "setMit":
5823
+ set("syncFlag", "M");
5824
+ set("isMIT", Boolean(input["is_mit"]));
5825
+ break;
5826
+ case "setQuadrant":
5827
+ set("syncFlag", "M");
5828
+ if (input["quadrant"] !== void 0) set("task4time", Number(input["quadrant"]));
5829
+ break;
5830
+ case "stripAutoKeys":
5831
+ delete payload["id"];
5832
+ delete payload["rowid"];
5833
+ for (const key of ["id", "rowid"]) {
5834
+ const idx = fields.findIndex((f) => f.name === key);
5835
+ if (idx >= 0) fields.splice(idx, 1);
5836
+ }
5837
+ break;
5838
+ }
5839
+ }
5840
+ return {
5841
+ body: JSON.stringify(payload),
5842
+ contentType: "application/json;charset=UTF-8",
5843
+ fields
5844
+ };
5845
+ }
5846
+ function coerceValue(p, value) {
5847
+ if (typeof value === "string") {
5848
+ if (p.transform === "isoToBackendDate") return isoToBackendDate(value);
5849
+ if (p.transform === "isoToBackendDateTime") return isoToBackendDateTime(value);
5850
+ }
5851
+ switch (p.type) {
5852
+ case "integer":
5853
+ return typeof value === "number" ? value : Number.parseInt(String(value), 10);
5854
+ case "number":
5855
+ return typeof value === "number" ? value : Number.parseFloat(String(value));
5856
+ case "boolean":
5857
+ if (typeof value === "boolean") return value;
5858
+ if (value === "true" || value === 1 || value === "1") return true;
5859
+ return false;
5860
+ case "array":
5861
+ if (Array.isArray(value)) return value;
5862
+ if (typeof value === "string") {
5863
+ return p.transform === "arrayToCsv" ? value : value.split(",").map((s) => s.trim()).filter(Boolean);
5864
+ }
5865
+ return value;
5866
+ default:
5867
+ return value;
5868
+ }
5869
+ }
5870
+
5783
5871
  // ../core/src/runtime/scope.ts
5784
5872
  init_build_shims();
5785
5873
  function assertScope(spec, granted) {
@@ -5806,6 +5894,41 @@ async function runCapability(spec, input, ctx) {
5806
5894
  const startedAt = Date.now();
5807
5895
  try {
5808
5896
  assertScope(spec, ctx.grantedScopes);
5897
+ const isJson = spec.http.bodyFormat === "json";
5898
+ if (isJson) {
5899
+ const built2 = buildJsonBody(spec, input, { usrKey: ctx.usrKey });
5900
+ if (ctx.dryRun) {
5901
+ return {
5902
+ ok: true,
5903
+ data: {
5904
+ dry_run: true,
5905
+ method: spec.http.method,
5906
+ path: spec.http.path,
5907
+ content_type: built2.contentType,
5908
+ body: built2.body
5909
+ },
5910
+ error: null,
5911
+ meta: {
5912
+ requestId: "dryrun",
5913
+ durationMs: Date.now() - startedAt,
5914
+ scopeChecked: spec.scopes
5915
+ }
5916
+ };
5917
+ }
5918
+ const response2 = await ctx.http.request({
5919
+ method: spec.http.method,
5920
+ path: spec.http.path,
5921
+ body: built2.body,
5922
+ contentType: built2.contentType
5923
+ });
5924
+ const data2 = unwrap(response2.data, spec);
5925
+ return {
5926
+ ok: true,
5927
+ data: data2,
5928
+ error: null,
5929
+ meta: { ...response2.meta, scopeChecked: spec.scopes }
5930
+ };
5931
+ }
5809
5932
  const built = buildFormData(spec, input, { usrKey: ctx.usrKey });
5810
5933
  if (ctx.dryRun) {
5811
5934
  return {
@@ -8173,7 +8296,7 @@ function describeGroup(name) {
8173
8296
  }
8174
8297
 
8175
8298
  // src/program.ts
8176
- var CLI_VERSION = true ? "0.1.12" : "0.0.0";
8299
+ var CLI_VERSION = true ? "0.1.13" : "0.0.0";
8177
8300
  function buildProgram() {
8178
8301
  const program3 = new Command();
8179
8302
  program3.name("zentodo").description("ZenTodo \u547D\u4EE4\u884C\u5DE5\u5177 \u2014 \u57FA\u4E8E\u6E05\u5355\u9A71\u52A8,\u8FDE\u63A5 ZenTodo \u540E\u7AEF\u3002\u6240\u6709\u8BF7\u6C42\u4F7F\u7528 FormData\u3002").version(CLI_VERSION, "-V, --version", "\u6253\u5370 CLI \u7248\u672C").helpOption("-h, --help", "\u663E\u793A\u5E2E\u52A9\u4FE1\u606F").addHelpCommand("help [command]", "\u67E5\u770B\u547D\u4EE4\u5E2E\u52A9").option("--profile <name>", "\u4F7F\u7528\u6307\u5B9A Profile(\u9ED8\u8BA4\u4F7F\u7528 current_profile)").option("--server <url>", "\u8986\u76D6\u540E\u7AEF\u5730\u5740").option("--token <token>", "\u8986\u76D6\u672C\u5730 Token").option("--log-level <level>", "\u65E5\u5FD7\u7EA7\u522B:trace|debug|info|warn|error", "info").option("--log-file <path>", "\u8FFD\u52A0\u65E5\u5FD7\u5230\u6307\u5B9A\u6587\u4EF6").option("--no-retry", "\u7981\u7528\u81EA\u52A8\u91CD\u8BD5").option("--no-color", "\u5173\u95ED\u5F69\u8272\u8F93\u51FA").option("--dry-run", "\u53EA\u6253\u5370\u5C06\u53D1\u9001\u7684\u8BF7\u6C42,\u4E0D\u771F\u6B63\u8C03\u7528\u540E\u7AEF").option("--yes", "\u8DF3\u8FC7\u7834\u574F\u6027\u64CD\u4F5C\u7684\u786E\u8BA4\u63D0\u793A").option("--local", "\u4F18\u5148\u4F7F\u7528\u672C\u5730 SQLite(\u82E5\u53EF\u7528)").option("--remote", "\u5F3A\u5236\u4F7F\u7528\u8FDC\u7A0B HTTP \u6A21\u5F0F").option("--json", "JSON \u8F93\u51FA").option("--ndjson", "\u6309\u884C\u8F93\u51FA JSON(\u9002\u5408\u6D41\u5F0F\u5904\u7406)").option("--yaml", "YAML \u8F93\u51FA").option("--quiet", "\u9690\u85CF\u975E\u5FC5\u8981\u8F93\u51FA");