zentao-api 0.6.1 → 0.6.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/dist/browser/zentao-api.global.js +25 -2
- package/dist/modules/generated.d.ts +105 -5
- package/dist/modules/generated.js +86 -28
- package/dist/modules/override.js +45 -0
- package/dist/modules/registry.d.ts +102 -5
- package/dist/modules/resolve.d.ts +3 -3
- package/dist/modules/resolve.js +4 -4
- package/dist/request/index.js +2 -2
- package/dist/types/module.d.ts +3 -1
- package/dist/types/options.d.ts +1 -0
- package/dist/utils/doc-helper/html.d.ts +3 -0
- package/dist/utils/doc-helper/html.js +442 -0
- package/dist/utils/doc-helper/index.d.ts +3 -0
- package/dist/utils/doc-helper/index.js +2 -0
- package/dist/utils/doc-helper/inline.d.ts +3 -0
- package/dist/utils/doc-helper/inline.js +168 -0
- package/dist/utils/doc-helper/markdown.d.ts +3 -0
- package/dist/utils/doc-helper/markdown.js +402 -0
- package/dist/utils/doc-helper/shared.d.ts +37 -0
- package/dist/utils/doc-helper/shared.js +305 -0
- package/dist/utils/doc-helper/types.d.ts +86 -0
- package/dist/utils/doc-helper/types.js +1 -0
- package/dist/version.js +2 -2
- package/package.json +1 -1
|
@@ -3406,6 +3406,9 @@ export declare const BUILTIN_MODULES: ({
|
|
|
3406
3406
|
name?: undefined;
|
|
3407
3407
|
parent?: undefined;
|
|
3408
3408
|
comment?: undefined;
|
|
3409
|
+
deadline?: undefined;
|
|
3410
|
+
status?: undefined;
|
|
3411
|
+
mailto?: undefined;
|
|
3409
3412
|
resolution?: undefined;
|
|
3410
3413
|
resolvedDate?: undefined;
|
|
3411
3414
|
resolvedBuild?: undefined;
|
|
@@ -3507,6 +3510,9 @@ export declare const BUILTIN_MODULES: ({
|
|
|
3507
3510
|
name?: undefined;
|
|
3508
3511
|
parent?: undefined;
|
|
3509
3512
|
comment?: undefined;
|
|
3513
|
+
deadline?: undefined;
|
|
3514
|
+
status?: undefined;
|
|
3515
|
+
mailto?: undefined;
|
|
3510
3516
|
resolution?: undefined;
|
|
3511
3517
|
resolvedDate?: undefined;
|
|
3512
3518
|
resolvedBuild?: undefined;
|
|
@@ -3558,6 +3564,9 @@ export declare const BUILTIN_MODULES: ({
|
|
|
3558
3564
|
story?: undefined;
|
|
3559
3565
|
assignedTo?: undefined;
|
|
3560
3566
|
comment?: undefined;
|
|
3567
|
+
deadline?: undefined;
|
|
3568
|
+
status?: undefined;
|
|
3569
|
+
mailto?: undefined;
|
|
3561
3570
|
resolution?: undefined;
|
|
3562
3571
|
resolvedDate?: undefined;
|
|
3563
3572
|
resolvedBuild?: undefined;
|
|
@@ -3650,6 +3659,9 @@ export declare const BUILTIN_MODULES: ({
|
|
|
3650
3659
|
story?: undefined;
|
|
3651
3660
|
name?: undefined;
|
|
3652
3661
|
parent?: undefined;
|
|
3662
|
+
deadline?: undefined;
|
|
3663
|
+
status?: undefined;
|
|
3664
|
+
mailto?: undefined;
|
|
3653
3665
|
resolution?: undefined;
|
|
3654
3666
|
resolvedDate?: undefined;
|
|
3655
3667
|
resolvedBuild?: undefined;
|
|
@@ -3697,6 +3709,81 @@ export declare const BUILTIN_MODULES: ({
|
|
|
3697
3709
|
assignedTo?: undefined;
|
|
3698
3710
|
name?: undefined;
|
|
3699
3711
|
parent?: undefined;
|
|
3712
|
+
deadline?: undefined;
|
|
3713
|
+
status?: undefined;
|
|
3714
|
+
mailto?: undefined;
|
|
3715
|
+
resolution?: undefined;
|
|
3716
|
+
resolvedDate?: undefined;
|
|
3717
|
+
resolvedBuild?: undefined;
|
|
3718
|
+
};
|
|
3719
|
+
required?: undefined;
|
|
3720
|
+
};
|
|
3721
|
+
};
|
|
3722
|
+
pagerGetter?: undefined;
|
|
3723
|
+
resultGetter?: undefined;
|
|
3724
|
+
params?: undefined;
|
|
3725
|
+
} | {
|
|
3726
|
+
name: "confirm";
|
|
3727
|
+
display: string;
|
|
3728
|
+
type: "action";
|
|
3729
|
+
method: "put";
|
|
3730
|
+
path: string;
|
|
3731
|
+
resultType: "text";
|
|
3732
|
+
pathParams: {
|
|
3733
|
+
bugID: string;
|
|
3734
|
+
scope?: undefined;
|
|
3735
|
+
scopeID?: undefined;
|
|
3736
|
+
productID?: undefined;
|
|
3737
|
+
moduleID?: undefined;
|
|
3738
|
+
};
|
|
3739
|
+
requestBody: {
|
|
3740
|
+
required: true;
|
|
3741
|
+
type: "object";
|
|
3742
|
+
schema: {
|
|
3743
|
+
type: string;
|
|
3744
|
+
properties: {
|
|
3745
|
+
assignedTo: {
|
|
3746
|
+
type: string;
|
|
3747
|
+
description: string;
|
|
3748
|
+
};
|
|
3749
|
+
type: {
|
|
3750
|
+
type: string;
|
|
3751
|
+
description: string;
|
|
3752
|
+
};
|
|
3753
|
+
pri: {
|
|
3754
|
+
type: string;
|
|
3755
|
+
description: string;
|
|
3756
|
+
format: string;
|
|
3757
|
+
};
|
|
3758
|
+
deadline: {
|
|
3759
|
+
type: string;
|
|
3760
|
+
description: string;
|
|
3761
|
+
};
|
|
3762
|
+
status: {
|
|
3763
|
+
type: string;
|
|
3764
|
+
description: string;
|
|
3765
|
+
};
|
|
3766
|
+
mailto: {
|
|
3767
|
+
type: string;
|
|
3768
|
+
items: {
|
|
3769
|
+
type: string;
|
|
3770
|
+
};
|
|
3771
|
+
description: string;
|
|
3772
|
+
};
|
|
3773
|
+
comment: {
|
|
3774
|
+
type: string;
|
|
3775
|
+
description: string;
|
|
3776
|
+
};
|
|
3777
|
+
productID?: undefined;
|
|
3778
|
+
title?: undefined;
|
|
3779
|
+
openedBuild?: undefined;
|
|
3780
|
+
project?: undefined;
|
|
3781
|
+
execution?: undefined;
|
|
3782
|
+
severity?: undefined;
|
|
3783
|
+
steps?: undefined;
|
|
3784
|
+
story?: undefined;
|
|
3785
|
+
name?: undefined;
|
|
3786
|
+
parent?: undefined;
|
|
3700
3787
|
resolution?: undefined;
|
|
3701
3788
|
resolvedDate?: undefined;
|
|
3702
3789
|
resolvedBuild?: undefined;
|
|
@@ -3759,6 +3846,9 @@ export declare const BUILTIN_MODULES: ({
|
|
|
3759
3846
|
story?: undefined;
|
|
3760
3847
|
name?: undefined;
|
|
3761
3848
|
parent?: undefined;
|
|
3849
|
+
deadline?: undefined;
|
|
3850
|
+
status?: undefined;
|
|
3851
|
+
mailto?: undefined;
|
|
3762
3852
|
};
|
|
3763
3853
|
required: string[];
|
|
3764
3854
|
};
|
|
@@ -7103,13 +7193,11 @@ export declare const BUILTIN_MODULES: ({
|
|
|
7103
7193
|
requestBody: {
|
|
7104
7194
|
required: true;
|
|
7105
7195
|
type: "object";
|
|
7106
|
-
mediaType: "multipart/form-data";
|
|
7107
7196
|
schema: {
|
|
7108
7197
|
type: string;
|
|
7109
7198
|
properties: {
|
|
7110
7199
|
file: {
|
|
7111
7200
|
type: string;
|
|
7112
|
-
format: string;
|
|
7113
7201
|
description: string;
|
|
7114
7202
|
};
|
|
7115
7203
|
objectType: {
|
|
@@ -7153,7 +7241,6 @@ export declare const BUILTIN_MODULES: ({
|
|
|
7153
7241
|
};
|
|
7154
7242
|
required: string[];
|
|
7155
7243
|
};
|
|
7156
|
-
mediaType?: undefined;
|
|
7157
7244
|
};
|
|
7158
7245
|
} | {
|
|
7159
7246
|
name: "delete";
|
|
@@ -7403,6 +7490,7 @@ export declare const BUILTIN_MODULES: ({
|
|
|
7403
7490
|
path: string;
|
|
7404
7491
|
resultType: "list";
|
|
7405
7492
|
pagerGetter: string;
|
|
7493
|
+
resultGetter: string;
|
|
7406
7494
|
pathParams: {
|
|
7407
7495
|
spaceID: string;
|
|
7408
7496
|
libID: string;
|
|
@@ -7411,7 +7499,6 @@ export declare const BUILTIN_MODULES: ({
|
|
|
7411
7499
|
docID?: undefined;
|
|
7412
7500
|
moduleID?: undefined;
|
|
7413
7501
|
};
|
|
7414
|
-
resultGetter: string;
|
|
7415
7502
|
requestBody?: undefined;
|
|
7416
7503
|
} | {
|
|
7417
7504
|
name: "productDocs";
|
|
@@ -8458,6 +8545,11 @@ export declare const BUILTIN_MODULES: ({
|
|
|
8458
8545
|
type: string;
|
|
8459
8546
|
description: string;
|
|
8460
8547
|
};
|
|
8548
|
+
objectID: {
|
|
8549
|
+
type: string;
|
|
8550
|
+
description: string;
|
|
8551
|
+
format: string;
|
|
8552
|
+
};
|
|
8461
8553
|
begin: {
|
|
8462
8554
|
type: string;
|
|
8463
8555
|
description: string;
|
|
@@ -8507,6 +8599,11 @@ export declare const BUILTIN_MODULES: ({
|
|
|
8507
8599
|
type: string;
|
|
8508
8600
|
description: string;
|
|
8509
8601
|
};
|
|
8602
|
+
objectID: {
|
|
8603
|
+
type: string;
|
|
8604
|
+
description: string;
|
|
8605
|
+
format: string;
|
|
8606
|
+
};
|
|
8510
8607
|
begin: {
|
|
8511
8608
|
type: string;
|
|
8512
8609
|
description: string;
|
|
@@ -9011,6 +9108,7 @@ export declare const BUILTIN_MODULES: ({
|
|
|
9011
9108
|
path: string;
|
|
9012
9109
|
resultType: "list";
|
|
9013
9110
|
pagerGetter: string;
|
|
9111
|
+
resultGetter: string;
|
|
9014
9112
|
params: ({
|
|
9015
9113
|
name: string;
|
|
9016
9114
|
required: false;
|
|
@@ -9039,7 +9137,6 @@ export declare const BUILTIN_MODULES: ({
|
|
|
9039
9137
|
defaultValue?: undefined;
|
|
9040
9138
|
options?: undefined;
|
|
9041
9139
|
})[];
|
|
9042
|
-
resultGetter: string;
|
|
9043
9140
|
} | {
|
|
9044
9141
|
name: "issues";
|
|
9045
9142
|
display: string;
|
|
@@ -9384,6 +9481,9 @@ export type BuiltinActionMeta = {
|
|
|
9384
9481
|
close: {
|
|
9385
9482
|
resultType: 'text';
|
|
9386
9483
|
};
|
|
9484
|
+
confirm: {
|
|
9485
|
+
resultType: 'text';
|
|
9486
|
+
};
|
|
9387
9487
|
resolve: {
|
|
9388
9488
|
resultType: 'text';
|
|
9389
9489
|
};
|
|
@@ -2857,7 +2857,7 @@ export const BUILTIN_MODULES = [
|
|
|
2857
2857
|
{
|
|
2858
2858
|
name: 'bug',
|
|
2859
2859
|
display: 'Bug',
|
|
2860
|
-
description: 'Bug管理,支持获取Bug列表,支持获取项目/产品/执行下的Bug、产品的Bug模块树、创建Bug、获取Bug详情、修改Bug、修改Bug模块、删除Bug、删除Bug模块、激活Bug、关闭Bug、解决Bug',
|
|
2860
|
+
description: 'Bug管理,支持获取Bug列表,支持获取项目/产品/执行下的Bug、产品的Bug模块树、创建Bug、获取Bug详情、修改Bug、修改Bug模块、删除Bug、删除Bug模块、激活Bug、关闭Bug、确认Bug、解决Bug',
|
|
2861
2861
|
actions: [
|
|
2862
2862
|
{
|
|
2863
2863
|
name: 'list',
|
|
@@ -3196,6 +3196,57 @@ export const BUILTIN_MODULES = [
|
|
|
3196
3196
|
}
|
|
3197
3197
|
},
|
|
3198
3198
|
},
|
|
3199
|
+
}, {
|
|
3200
|
+
name: 'confirm',
|
|
3201
|
+
display: '确认Bug',
|
|
3202
|
+
type: 'action',
|
|
3203
|
+
method: 'put',
|
|
3204
|
+
path: '/bugs/{bugID}/confirm',
|
|
3205
|
+
resultType: 'text',
|
|
3206
|
+
pathParams: {
|
|
3207
|
+
bugID: 'Bug ID',
|
|
3208
|
+
},
|
|
3209
|
+
requestBody: {
|
|
3210
|
+
required: true,
|
|
3211
|
+
type: 'object',
|
|
3212
|
+
schema: {
|
|
3213
|
+
"type": "object",
|
|
3214
|
+
"properties": {
|
|
3215
|
+
"assignedTo": {
|
|
3216
|
+
"type": "string",
|
|
3217
|
+
"description": "指派给"
|
|
3218
|
+
},
|
|
3219
|
+
"type": {
|
|
3220
|
+
"type": "string",
|
|
3221
|
+
"description": "Bug类型(codeerror 代码错误 | config 配置相关 | install 安装部署 | security 安全相关 | performance 性能问题 | standard 标准规范 | automation 测试脚本 | designdefect 设计缺陷 | others 其他)"
|
|
3222
|
+
},
|
|
3223
|
+
"pri": {
|
|
3224
|
+
"type": "integer",
|
|
3225
|
+
"description": "优先级,默认是3",
|
|
3226
|
+
"format": "int32"
|
|
3227
|
+
},
|
|
3228
|
+
"deadline": {
|
|
3229
|
+
"type": "string",
|
|
3230
|
+
"description": "截止日期"
|
|
3231
|
+
},
|
|
3232
|
+
"status": {
|
|
3233
|
+
"type": "string",
|
|
3234
|
+
"description": "状态"
|
|
3235
|
+
},
|
|
3236
|
+
"mailto": {
|
|
3237
|
+
"type": "array",
|
|
3238
|
+
"items": {
|
|
3239
|
+
"type": "string"
|
|
3240
|
+
},
|
|
3241
|
+
"description": "抄送给"
|
|
3242
|
+
},
|
|
3243
|
+
"comment": {
|
|
3244
|
+
"type": "string",
|
|
3245
|
+
"description": "备注"
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
},
|
|
3249
|
+
},
|
|
3199
3250
|
}, {
|
|
3200
3251
|
name: 'resolve',
|
|
3201
3252
|
display: '解决Bug',
|
|
@@ -3885,7 +3936,7 @@ export const BUILTIN_MODULES = [
|
|
|
3885
3936
|
},
|
|
3886
3937
|
"assignedTo": {
|
|
3887
3938
|
"type": "string",
|
|
3888
|
-
"description": "
|
|
3939
|
+
"description": "指派给"
|
|
3889
3940
|
},
|
|
3890
3941
|
"consumed": {
|
|
3891
3942
|
"type": "number",
|
|
@@ -3894,11 +3945,11 @@ export const BUILTIN_MODULES = [
|
|
|
3894
3945
|
},
|
|
3895
3946
|
"realStarted": {
|
|
3896
3947
|
"type": "string",
|
|
3897
|
-
"description": "
|
|
3948
|
+
"description": "实际开始,精确到秒"
|
|
3898
3949
|
},
|
|
3899
3950
|
"finishedDate": {
|
|
3900
3951
|
"type": "string",
|
|
3901
|
-
"description": "
|
|
3952
|
+
"description": "实际完成,精确到秒"
|
|
3902
3953
|
},
|
|
3903
3954
|
"comment": {
|
|
3904
3955
|
"type": "string",
|
|
@@ -3934,7 +3985,7 @@ export const BUILTIN_MODULES = [
|
|
|
3934
3985
|
},
|
|
3935
3986
|
"realStarted": {
|
|
3936
3987
|
"type": "string",
|
|
3937
|
-
"description": "
|
|
3988
|
+
"description": "实际开始,精确到秒"
|
|
3938
3989
|
},
|
|
3939
3990
|
"consumed": {
|
|
3940
3991
|
"type": "number",
|
|
@@ -6306,14 +6357,12 @@ export const BUILTIN_MODULES = [
|
|
|
6306
6357
|
requestBody: {
|
|
6307
6358
|
required: true,
|
|
6308
6359
|
type: 'object',
|
|
6309
|
-
mediaType: 'multipart/form-data',
|
|
6310
6360
|
schema: {
|
|
6311
6361
|
"type": "object",
|
|
6312
6362
|
"properties": {
|
|
6313
6363
|
"file": {
|
|
6314
6364
|
"type": "string",
|
|
6315
|
-
"
|
|
6316
|
-
"description": "待上传文件;Node.js/Bun 可传本地文件路径,浏览器传 File 或 Blob"
|
|
6365
|
+
"description": "本地文件路径,将按 multipart/form-data 上传"
|
|
6317
6366
|
},
|
|
6318
6367
|
"objectType": {
|
|
6319
6368
|
"type": "string",
|
|
@@ -6567,11 +6616,11 @@ export const BUILTIN_MODULES = [
|
|
|
6567
6616
|
path: '/doc/team/spaces/{spaceID}/libs/{libID}/docs',
|
|
6568
6617
|
resultType: 'list',
|
|
6569
6618
|
pagerGetter: 'pager',
|
|
6619
|
+
resultGetter: 'docs',
|
|
6570
6620
|
pathParams: {
|
|
6571
6621
|
spaceID: '空间ID',
|
|
6572
6622
|
libID: '文档库ID',
|
|
6573
6623
|
},
|
|
6574
|
-
resultGetter: 'docs',
|
|
6575
6624
|
}, {
|
|
6576
6625
|
name: 'productDocs',
|
|
6577
6626
|
display: '获取产品文档列表',
|
|
@@ -6882,7 +6931,7 @@ export const BUILTIN_MODULES = [
|
|
|
6882
6931
|
},
|
|
6883
6932
|
"content": {
|
|
6884
6933
|
"type": "string",
|
|
6885
|
-
"description": "
|
|
6934
|
+
"description": "文档正文,使用HTML格式;纯文本可直接传递"
|
|
6886
6935
|
}
|
|
6887
6936
|
},
|
|
6888
6937
|
"required": [
|
|
@@ -6919,7 +6968,7 @@ export const BUILTIN_MODULES = [
|
|
|
6919
6968
|
},
|
|
6920
6969
|
"content": {
|
|
6921
6970
|
"type": "string",
|
|
6922
|
-
"description": "
|
|
6971
|
+
"description": "文档正文,使用HTML格式;纯文本可直接传递"
|
|
6923
6972
|
}
|
|
6924
6973
|
},
|
|
6925
6974
|
"required": [
|
|
@@ -6956,7 +7005,7 @@ export const BUILTIN_MODULES = [
|
|
|
6956
7005
|
},
|
|
6957
7006
|
"content": {
|
|
6958
7007
|
"type": "string",
|
|
6959
|
-
"description": "
|
|
7008
|
+
"description": "文档正文,使用HTML格式;纯文本可直接传递"
|
|
6960
7009
|
}
|
|
6961
7010
|
},
|
|
6962
7011
|
"required": [
|
|
@@ -6993,7 +7042,7 @@ export const BUILTIN_MODULES = [
|
|
|
6993
7042
|
},
|
|
6994
7043
|
"content": {
|
|
6995
7044
|
"type": "string",
|
|
6996
|
-
"description": "
|
|
7045
|
+
"description": "文档正文,使用HTML格式;纯文本可直接传递"
|
|
6997
7046
|
}
|
|
6998
7047
|
},
|
|
6999
7048
|
"required": [
|
|
@@ -7025,7 +7074,7 @@ export const BUILTIN_MODULES = [
|
|
|
7025
7074
|
},
|
|
7026
7075
|
"parentID": {
|
|
7027
7076
|
"type": "integer",
|
|
7028
|
-
"description": "父目录",
|
|
7077
|
+
"description": "父目录ID,必须属于当前文档库",
|
|
7029
7078
|
"format": "int32"
|
|
7030
7079
|
}
|
|
7031
7080
|
},
|
|
@@ -7057,7 +7106,7 @@ export const BUILTIN_MODULES = [
|
|
|
7057
7106
|
},
|
|
7058
7107
|
"parentID": {
|
|
7059
7108
|
"type": "integer",
|
|
7060
|
-
"description": "父目录",
|
|
7109
|
+
"description": "父目录ID,必须属于当前文档库",
|
|
7061
7110
|
"format": "int32"
|
|
7062
7111
|
}
|
|
7063
7112
|
},
|
|
@@ -7089,7 +7138,7 @@ export const BUILTIN_MODULES = [
|
|
|
7089
7138
|
},
|
|
7090
7139
|
"parentID": {
|
|
7091
7140
|
"type": "integer",
|
|
7092
|
-
"description": "父目录",
|
|
7141
|
+
"description": "父目录ID,必须属于当前文档库",
|
|
7093
7142
|
"format": "int32"
|
|
7094
7143
|
}
|
|
7095
7144
|
},
|
|
@@ -7121,7 +7170,7 @@ export const BUILTIN_MODULES = [
|
|
|
7121
7170
|
},
|
|
7122
7171
|
"parentID": {
|
|
7123
7172
|
"type": "integer",
|
|
7124
|
-
"description": "父目录",
|
|
7173
|
+
"description": "父目录ID,必须属于当前文档库",
|
|
7125
7174
|
"format": "int32"
|
|
7126
7175
|
}
|
|
7127
7176
|
},
|
|
@@ -7260,7 +7309,7 @@ export const BUILTIN_MODULES = [
|
|
|
7260
7309
|
},
|
|
7261
7310
|
"content": {
|
|
7262
7311
|
"type": "string",
|
|
7263
|
-
"description": "
|
|
7312
|
+
"description": "文档正文,使用HTML格式;纯文本可直接传递。接口不接受块编辑器的JSON快照,修改块编辑器文档后会保存为HTML格式"
|
|
7264
7313
|
}
|
|
7265
7314
|
},
|
|
7266
7315
|
"required": [
|
|
@@ -7367,7 +7416,12 @@ export const BUILTIN_MODULES = [
|
|
|
7367
7416
|
},
|
|
7368
7417
|
"name": {
|
|
7369
7418
|
"type": "string",
|
|
7370
|
-
"description": "
|
|
7419
|
+
"description": "待办名称,type为custom时必填;type为非custom时由关联对象的名称或标题自动生成"
|
|
7420
|
+
},
|
|
7421
|
+
"objectID": {
|
|
7422
|
+
"type": "integer",
|
|
7423
|
+
"description": "关联对象ID,type为非custom时必填,必须是type对应对象的ID",
|
|
7424
|
+
"format": "int32"
|
|
7371
7425
|
},
|
|
7372
7426
|
"begin": {
|
|
7373
7427
|
"type": "string",
|
|
@@ -7388,8 +7442,7 @@ export const BUILTIN_MODULES = [
|
|
|
7388
7442
|
},
|
|
7389
7443
|
"required": [
|
|
7390
7444
|
"date",
|
|
7391
|
-
"type"
|
|
7392
|
-
"name"
|
|
7445
|
+
"type"
|
|
7393
7446
|
]
|
|
7394
7447
|
},
|
|
7395
7448
|
},
|
|
@@ -7419,7 +7472,12 @@ export const BUILTIN_MODULES = [
|
|
|
7419
7472
|
},
|
|
7420
7473
|
"name": {
|
|
7421
7474
|
"type": "string",
|
|
7422
|
-
"description": "
|
|
7475
|
+
"description": "待办名称,type为custom时必填;type为非custom时由关联对象的名称或标题自动生成"
|
|
7476
|
+
},
|
|
7477
|
+
"objectID": {
|
|
7478
|
+
"type": "integer",
|
|
7479
|
+
"description": "关联对象ID,type为非custom时必填,必须是type对应对象的ID",
|
|
7480
|
+
"format": "int32"
|
|
7423
7481
|
},
|
|
7424
7482
|
"begin": {
|
|
7425
7483
|
"type": "string",
|
|
@@ -7440,8 +7498,7 @@ export const BUILTIN_MODULES = [
|
|
|
7440
7498
|
},
|
|
7441
7499
|
"required": [
|
|
7442
7500
|
"date",
|
|
7443
|
-
"type"
|
|
7444
|
-
"name"
|
|
7501
|
+
"type"
|
|
7445
7502
|
]
|
|
7446
7503
|
},
|
|
7447
7504
|
},
|
|
@@ -8155,17 +8212,19 @@ export const BUILTIN_MODULES = [
|
|
|
8155
8212
|
path: '/my/meetings',
|
|
8156
8213
|
resultType: 'list',
|
|
8157
8214
|
pagerGetter: 'pager',
|
|
8215
|
+
resultGetter: 'meetings',
|
|
8158
8216
|
params: [
|
|
8159
8217
|
{
|
|
8160
8218
|
name: 'browseType',
|
|
8161
8219
|
required: false,
|
|
8162
8220
|
type: 'string',
|
|
8163
|
-
description: '状态,默认是
|
|
8164
|
-
defaultValue: '
|
|
8221
|
+
description: '状态,默认是futureMeeting',
|
|
8222
|
+
defaultValue: 'futureMeeting',
|
|
8165
8223
|
options: [
|
|
8224
|
+
{ value: 'futureMeeting', label: '我参加的(未开始)' },
|
|
8166
8225
|
{ value: 'all', label: '全部' },
|
|
8167
8226
|
{ value: 'booked', label: '我预约的' },
|
|
8168
|
-
{ value: 'participate', label: '
|
|
8227
|
+
{ value: 'participate', label: '我参加的(全部)' },
|
|
8169
8228
|
],
|
|
8170
8229
|
},
|
|
8171
8230
|
{
|
|
@@ -8195,7 +8254,6 @@ export const BUILTIN_MODULES = [
|
|
|
8195
8254
|
description: '页码,从第1页开始',
|
|
8196
8255
|
},
|
|
8197
8256
|
],
|
|
8198
|
-
resultGetter: 'meetings',
|
|
8199
8257
|
}, {
|
|
8200
8258
|
name: 'issues',
|
|
8201
8259
|
display: '指派给我的问题',
|
package/dist/modules/override.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { extendModuleAction } from './define.js';
|
|
2
|
+
import { extractResult } from './resolve.js';
|
|
3
|
+
import { snapshotToMarkdown } from '../utils/doc-helper/markdown.js';
|
|
4
|
+
import { isRecord } from '../utils/index.js';
|
|
2
5
|
/**
|
|
3
6
|
* 内置覆盖 / 扩展定义。
|
|
4
7
|
*
|
|
@@ -166,6 +169,16 @@ export function applyBuiltinOverrides() {
|
|
|
166
169
|
return action;
|
|
167
170
|
});
|
|
168
171
|
});
|
|
172
|
+
// OpenAPI 使用 JSON 描述 SDK 的本地文件路径入参,但实际请求仍需转换为 multipart/form-data
|
|
173
|
+
extendModuleAction('file', 'create', (action) => {
|
|
174
|
+
if (action.requestBody) {
|
|
175
|
+
action.requestBody.mediaType = 'multipart/form-data';
|
|
176
|
+
const properties = action.requestBody.schema?.properties;
|
|
177
|
+
if (properties?.file)
|
|
178
|
+
properties.file.format = 'binary';
|
|
179
|
+
}
|
|
180
|
+
return action;
|
|
181
|
+
});
|
|
169
182
|
// 修改 BUG 列表选项
|
|
170
183
|
extendModuleAction('bug', 'list', (action) => {
|
|
171
184
|
const params = action.params;
|
|
@@ -194,4 +207,36 @@ export function applyBuiltinOverrides() {
|
|
|
194
207
|
}
|
|
195
208
|
return action;
|
|
196
209
|
});
|
|
210
|
+
// 获取文档详情时支持将文档原始 JSON 内容转换为 Markdown
|
|
211
|
+
extendModuleAction('doc', 'get', (action) => {
|
|
212
|
+
const oldGetter = action.resultGetter;
|
|
213
|
+
action.resultGetter = (data, params, options = {}) => {
|
|
214
|
+
const result = oldGetter
|
|
215
|
+
? extractResult({ ...action, resultGetter: oldGetter }, data, params, options)
|
|
216
|
+
: (data.doc ?? data);
|
|
217
|
+
if (!isRecord(result))
|
|
218
|
+
return result;
|
|
219
|
+
const pick = options.pick;
|
|
220
|
+
const pickAll = !pick?.length;
|
|
221
|
+
const wantsContent = pickAll || pick.includes('content');
|
|
222
|
+
const wantsRawContent = pickAll || pick.includes('rawContent');
|
|
223
|
+
if (!wantsContent && !wantsRawContent)
|
|
224
|
+
return result;
|
|
225
|
+
const originalContent = result.content;
|
|
226
|
+
try {
|
|
227
|
+
if (wantsRawContent && (result.rawContent === undefined || result.rawContent === '')) {
|
|
228
|
+
result.rawContent = originalContent;
|
|
229
|
+
}
|
|
230
|
+
if (wantsContent && result.contentType === 'doc') {
|
|
231
|
+
const markdown = snapshotToMarkdown(originalContent);
|
|
232
|
+
result.content = markdown;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// HTML、纯文本和无法识别的快照保持服务端原始字段不变。
|
|
237
|
+
}
|
|
238
|
+
return result;
|
|
239
|
+
};
|
|
240
|
+
return action;
|
|
241
|
+
});
|
|
197
242
|
}
|