weaver-work-cli 0.1.69 → 0.1.71
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/chunks/{archive-VUTREF3P.js → archive-5P33NAUN.js} +22 -5
- package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-YTY5D7DG.js} +17 -5
- package/dist/chunks/{asset-45U6TY7I.js → asset-3Q5MFQBX.js} +22 -5
- package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-PQPNYIS7.js} +15 -5
- package/dist/chunks/{attachment-content-7BEDNQ3O.js → attachment-content-7CN7JB6B.js} +3 -3
- package/dist/chunks/{blog-5AML4WMG.js → blog-MFHHK6ZR.js} +25 -5
- package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-OZ435AYW.js} +22 -8
- package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-TNJXS5UC.js} +15 -5
- package/dist/chunks/{chunk-H2NRTGZR.js → chunk-2DNCKZRX.js} +3 -3
- package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
- package/dist/chunks/{chunk-HG6INLH6.js → chunk-6MMSLE6K.js} +23 -6
- package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-B4NINGP2.js} +3 -3
- package/dist/chunks/{chunk-LRKKKO5A.js → chunk-DRJYPXKC.js} +3 -4
- package/dist/chunks/{chunk-3TZURS7M.js → chunk-EJLP63UO.js} +1 -1
- package/dist/chunks/{chunk-FMAZ42HS.js → chunk-FRMDHZSN.js} +11 -11
- package/dist/chunks/{chunk-MLJK4KLE.js → chunk-G7ZM2VOX.js} +34 -34
- package/dist/chunks/{chunk-LSVA7QA6.js → chunk-GB2MCJPG.js} +3 -1
- package/dist/chunks/{chunk-3CBURKSY.js → chunk-ICNUOWLL.js} +4 -4
- package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
- package/dist/chunks/{chunk-BEYEXCWU.js → chunk-LU2SPJYY.js} +2 -2
- package/dist/chunks/{chunk-E7VWE2XI.js → chunk-MD5RXRI3.js} +3 -3
- package/dist/chunks/{chunk-VZUH3LKI.js → chunk-MZVQKQP5.js} +167 -157
- package/dist/chunks/{chunk-67AN5YJT.js → chunk-OFCF23FY.js} +9 -9
- package/dist/chunks/{chunk-ERAE4GHX.js → chunk-OPTJ6IF7.js} +1 -1
- package/dist/chunks/{chunk-727VKJQK.js → chunk-OZ7CJC7W.js} +2 -2
- package/dist/chunks/{chunk-T24EBWAZ.js → chunk-P3AFNAJ6.js} +48 -21
- package/dist/chunks/{chunk-4XYRTXRR.js → chunk-Q3EXRNB4.js} +1 -1
- package/dist/chunks/{chunk-QYDSTYGG.js → chunk-SKWKCLJX.js} +3 -3
- package/dist/chunks/{chunk-DSBV4GRK.js → chunk-SSS75WXW.js} +3 -3
- package/dist/chunks/{chunk-I5XB4MZT.js → chunk-SUWR5QEG.js} +94 -65
- package/dist/chunks/{chunk-YR3K53BU.js → chunk-VJWVB55R.js} +2 -2
- package/dist/chunks/{chunk-JAIZY37Z.js → chunk-VMVMEIL3.js} +4 -4
- package/dist/chunks/chunk-WM33BSIL.js +136 -0
- package/dist/chunks/{chunk-6DH73Q5H.js → chunk-X2C5CGGM.js} +52 -51
- package/dist/chunks/{chunk-ELF5TPSG.js → chunk-XLSJC6JZ.js} +6 -6
- package/dist/chunks/{chunk-U3OO3IZF.js → chunk-YN5SD4TX.js} +20 -7
- package/dist/chunks/{conflict-VKCRXHUV.js → conflict-Y4PXZ2YQ.js} +2 -2
- package/dist/chunks/{contract-3PMHUASH.js → contract-C3BGUMBM.js} +48 -5
- package/dist/chunks/{cowork-FZBTTBYX.js → cowork-2AWG4QLA.js} +37 -8
- package/dist/chunks/{create-flow-WYPLBLRK.js → create-flow-LOUOK46Z.js} +6 -6
- package/dist/chunks/{data-2YZ6A6TL.js → data-BSFYMXVO.js} +99 -184
- package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-LAAMTD2Y.js} +17 -7
- package/dist/chunks/{ehr-MNPR4TE5.js → ehr-36KEX5SH.js} +62 -13
- package/dist/chunks/{entry-mode-BCJ7RPFC.js → entry-mode-6N2IGCS4.js} +3 -3
- package/dist/chunks/{env-SCVCHBN2.js → env-QYLS3EB3.js} +2 -2
- package/dist/chunks/{esb-GSB5QCEX.js → esb-PTYS3E67.js} +17 -7
- package/dist/chunks/{factory-CBXYOEBF.js → factory-LPFPKZ4T.js} +1 -1
- package/dist/chunks/{fna-XBSNUS2V.js → fna-JNHCLRDE.js} +15 -5
- package/dist/chunks/{group-chat-RFL4U7RF.js → group-chat-QP2WX4QJ.js} +3 -3
- package/dist/chunks/{host-2UMNXX5H.js → host-57LSRSE7.js} +4 -4
- package/dist/chunks/{host-NVDG3NC6.js → host-7BVR7CQ3.js} +4 -4
- package/dist/chunks/{host-SYPCA63D.js → host-C2BLBIID.js} +4 -4
- package/dist/chunks/{host-XVWBOSEN.js → host-K2ZKNXME.js} +4 -4
- package/dist/chunks/{host-R7BP3CTI.js → host-NS36QFLR.js} +6 -4
- package/dist/chunks/{host-BD44ASOD.js → host-QXFKQXNX.js} +4 -4
- package/dist/chunks/{hrm-FZUDJAND.js → hrm-FSGO4NSH.js} +15 -6
- package/dist/chunks/{im-F5NENPD7.js → im-2BFGS2XO.js} +16 -6
- package/dist/chunks/{invoice-DS6FLU55.js → invoice-JKLTTHSZ.js} +27 -6
- package/dist/chunks/{jiuchuanhui-PY2WEBUH.js → jiuchuanhui-PTABJE7V.js} +1294 -1134
- package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-YN2ZP3CS.js} +6 -6
- package/dist/chunks/{mail-ZEOSANEJ.js → mail-YNO7ZZUK.js} +116 -97
- package/dist/chunks/{meeting-N2AGGLVI.js → meeting-NIDHDBCB.js} +29 -16
- package/dist/chunks/{minute-doc-C62EZOJH.js → minute-doc-G3QAT7DE.js} +4 -4
- package/dist/chunks/{okr-OZUMTMCL.js → okr-QC52G6AJ.js} +15 -5
- package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
- package/dist/chunks/{operations-UTUWFJTX.js → operations-MQV32ITT.js} +5 -5
- package/dist/chunks/{performance-GBKM5G2Y.js → performance-3MQ3AHDQ.js} +97 -11
- package/dist/chunks/{plan-C2NENH42.js → plan-ISINIEPY.js} +15 -5
- package/dist/chunks/{project-FAJ2P3UR.js → project-IJ6DVKT7.js} +18 -5
- package/dist/chunks/{reception-NH6MJFPR.js → reception-3H5LUG2I.js} +17 -7
- package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-MIOJXP6W.js} +412 -85
- package/dist/chunks/{registry-7US3QQXV.js → registry-3GQRYP2R.js} +12 -12
- package/dist/chunks/{registry-Y2HWS6JS.js → registry-3S7AVMXR.js} +4 -4
- package/dist/chunks/{registry-FTPUUHWC.js → registry-NHHKOEU3.js} +5 -5
- package/dist/chunks/{room-recommend-LMNF76YS.js → room-recommend-IOKBJVYP.js} +4 -4
- package/dist/chunks/{schedule-4QE2THAP.js → schedule-IB6EUARH.js} +4 -4
- package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-N2TK3CEF.js} +19 -6
- package/dist/chunks/{workflow-KXYTQZ2H.js → workflow-RINBAL2M.js} +22 -8
- package/dist/cmd/auth/index.js +23 -0
- package/dist/cmd/e10/index.js +2 -1
- package/dist/cmd/index.js +2 -0
- package/dist/core/manifest-view.js +207 -0
- package/dist/core/output.js +38 -8
- package/dist/index.js +35 -35
- package/dist/internal/e10/auth/crypto.js +18 -8
- package/dist/internal/e10/auth/error-log.js +1 -2
- package/dist/internal/e10/auth/messages.js +2 -3
- package/dist/internal/e10/auth/xiaoe.js +1 -1
- package/dist/internal/e10/tls-policy.js +61 -13
- package/dist/shortcuts/archive/index.js +11 -2
- package/dist/shortcuts/archive/operations/download.js +1 -0
- package/dist/shortcuts/archive/operations/flow-url.js +3 -0
- package/dist/shortcuts/archive/operations/prelib.js +2 -0
- package/dist/shortcuts/archive/operations/upload.js +1 -0
- package/dist/shortcuts/archive-oa/index.js +11 -2
- package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
- package/dist/shortcuts/asset/index.js +11 -2
- package/dist/shortcuts/asset/manifest.js +7 -0
- package/dist/shortcuts/asset-idle/index.js +11 -2
- package/dist/shortcuts/blog/index.js +11 -2
- package/dist/shortcuts/blog/manifest.js +10 -0
- package/dist/shortcuts/caizhilian/host.js +20 -4
- package/dist/shortcuts/caizhilian/index.js +12 -2
- package/dist/shortcuts/caizhilian/manifest.js +4 -25
- package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
- package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
- package/dist/shortcuts/calendar/index.js +11 -2
- package/dist/shortcuts/contract/index.js +11 -2
- package/dist/shortcuts/contract/manifest.js +32 -0
- package/dist/shortcuts/contract/operations/write.js +3 -0
- package/dist/shortcuts/cowork/index.js +21 -5
- package/dist/shortcuts/cowork/manifest.js +3 -0
- package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
- package/dist/shortcuts/cowork/operations/item-write.js +3 -0
- package/dist/shortcuts/cowork/operations/member-write.js +2 -0
- package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
- package/dist/shortcuts/cowork/operations/review-write.js +1 -0
- package/dist/shortcuts/data/errors.js +16 -29
- package/dist/shortcuts/data/host.js +16 -7
- package/dist/shortcuts/data/index.js +12 -41
- package/dist/shortcuts/data/manifest.js +5 -44
- package/dist/shortcuts/data/operations/attend.js +2 -2
- package/dist/shortcuts/data/operations/conf.js +0 -88
- package/dist/shortcuts/data/operations/ds.js +4 -4
- package/dist/shortcuts/data/operations/index.js +1 -5
- package/dist/shortcuts/data/operations/module.js +40 -14
- package/dist/shortcuts/data/operations/query.js +2 -2
- package/dist/shortcuts/ebuilder-form/index.js +11 -2
- package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
- package/dist/shortcuts/ehr/index.js +11 -2
- package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
- package/dist/shortcuts/esb/index.js +11 -2
- package/dist/shortcuts/esb/manifest.js +2 -0
- package/dist/shortcuts/fna/index.js +11 -2
- package/dist/shortcuts/hrm/index.js +11 -1
- package/dist/shortcuts/im/index.js +11 -2
- package/dist/shortcuts/invoice/index.js +11 -2
- package/dist/shortcuts/invoice/manifest.js +8 -0
- package/dist/shortcuts/jiuchuanhui/cache.js +49 -35
- package/dist/shortcuts/jiuchuanhui/host.js +37 -5
- package/dist/shortcuts/jiuchuanhui/index.js +57 -7
- package/dist/shortcuts/jiuchuanhui/manifest.js +38 -1
- package/dist/shortcuts/jiuchuanhui/operations/customer-quick.js +110 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +11 -56
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +9 -16
- package/dist/shortcuts/jiuchuanhui/operations/generic.js +8 -30
- package/dist/shortcuts/jiuchuanhui/operations/registry.js +8 -2
- package/dist/shortcuts/jiuchuanhui/operations/shared.js +0 -10
- package/dist/shortcuts/mail/errors.js +14 -0
- package/dist/shortcuts/mail/index.js +23 -6
- package/dist/shortcuts/mail/manifest.js +11 -4
- package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
- package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
- package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
- package/dist/shortcuts/mail/operations/mail-read.js +7 -25
- package/dist/shortcuts/mail/operations/mail-send.js +12 -12
- package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
- package/dist/shortcuts/mail/operations/mail-template.js +10 -10
- package/dist/shortcuts/meeting/index.js +11 -2
- package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
- package/dist/shortcuts/okr/index.js +11 -2
- package/dist/shortcuts/performance/index.js +62 -3
- package/dist/shortcuts/performance/operations/flow-detail.js +5 -4
- package/dist/shortcuts/performance/scheme-validate.js +7 -0
- package/dist/shortcuts/performance/shared.js +40 -2
- package/dist/shortcuts/plan/index.js +11 -2
- package/dist/shortcuts/project/index.js +11 -2
- package/dist/shortcuts/project/operations/write.js +3 -0
- package/dist/shortcuts/reception/index.js +11 -2
- package/dist/shortcuts/reception/manifest.js +2 -2
- package/dist/shortcuts/reception/operations/ask.js +3 -0
- package/dist/shortcuts/recruit-stage/index.js +22 -3
- package/dist/shortcuts/recruit-stage/manifest.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -16
- package/dist/shortcuts/recruit-stage/operations/profile.js +186 -0
- package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +76 -47
- package/dist/shortcuts/recruit-stage/operations/search.js +151 -16
- package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
- package/dist/shortcuts/recruit-stage/shared.js +11 -1
- package/dist/shortcuts/smart-extract/index.js +11 -2
- package/dist/shortcuts/smart-extract/manifest.js +1 -0
- package/dist/shortcuts/smart-extract/operations/save.js +2 -0
- package/dist/shortcuts/workflow/index.js +21 -1
- package/dist/shortcuts/workflow/operations/aiDeepRead/collect.js +5 -2
- package/dist/shortcuts/workflow/operations/read.js +2 -2
- package/dist/shortcuts/workflow/operations/write.js +1 -1
- package/docs/caizhilian.md +1 -1
- package/docs/contract.md +1 -0
- package/docs/data.md +22 -22
- package/docs/e10-auth.md +41 -33
- package/docs/ehr.md +2 -0
- package/docs/jiuchuanhui.md +17 -5
- package/docs/reception.md +4 -3
- package/package.json +1 -1
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/sitecustomize.py +41 -0
- package/skill-template/domains/data.md +4 -4
- package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
- package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
- package/skills/weaver-e10-cowork/SKILL.md +3 -1
- package/skills/weaver-e10-data/SKILL.md +12 -16
- package/skills/weaver-e10-data/references/config-center.md +6 -7
- package/skills/weaver-e10-data/references/datasource.md +1 -1
- package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +51 -90
- package/skills/weaver-e10-jiuchuanhui/references/cache.md +17 -13
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +49 -11
- package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +3 -3
- package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +9 -7
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
- package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
- package/skills/weaver-e10-mail/SKILL.md +4 -1
- package/skills/weaver-e10-mail/references/mail-read.md +4 -2
- package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-performance/SKILL.md +9 -7
- package/skills/weaver-e10-performance/agents/openai.yaml +4 -2
- package/skills/weaver-e10-performance/references/flow-assess.md +19 -6
- package/skills/weaver-e10-recruit-stage/SKILL.md +125 -20
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +359 -0
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +9 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -0
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +177 -0
- package/skills/weaver-e10-shared/SKILL.md +22 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
- package/skills/weaver-e10-workflow/SKILL.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-deep-read.md +8 -3
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
createProgram,
|
|
6
6
|
registerCommands,
|
|
7
7
|
toCommandMetadata
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-MZVQKQP5.js";
|
|
9
|
+
import "./chunk-6MMSLE6K.js";
|
|
10
10
|
import "./chunk-AJ62BGAW.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-2DNCKZRX.js";
|
|
12
12
|
import "./chunk-MD5CW4B6.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-DRJYPXKC.js";
|
|
14
|
+
import "./chunk-IZCQU5D5.js";
|
|
15
|
+
import "./chunk-SUWR5QEG.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
|
18
18
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
MANIFEST_LIST_COMPACT_PATHS,
|
|
5
|
+
manifestView,
|
|
6
|
+
schemaOptionsOf
|
|
7
|
+
} from "./chunk-WM33BSIL.js";
|
|
8
|
+
import {
|
|
9
|
+
shouldReportPlatformError,
|
|
10
|
+
toPlatformError
|
|
5
11
|
} from "./chunk-MD5CW4B6.js";
|
|
6
12
|
import {
|
|
7
13
|
CONTINUATION_TTL_MS
|
|
@@ -11,13 +17,13 @@ import {
|
|
|
11
17
|
createE10RequestRuntime,
|
|
12
18
|
isE10SessionExpiredResponse,
|
|
13
19
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DRJYPXKC.js";
|
|
15
21
|
import {
|
|
16
22
|
E10_SESSION_EXPIRED_MESSAGE
|
|
17
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IZCQU5D5.js";
|
|
18
24
|
import {
|
|
19
25
|
getActiveProfile
|
|
20
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SUWR5QEG.js";
|
|
21
27
|
import {
|
|
22
28
|
CliError,
|
|
23
29
|
isCliError,
|
|
@@ -75,6 +81,24 @@ function mailNetworkError(subtype, message, options = {}) {
|
|
|
75
81
|
exitCode: 4 /* NetworkError */
|
|
76
82
|
});
|
|
77
83
|
}
|
|
84
|
+
function mailUpstreamError(subtype, message, details) {
|
|
85
|
+
return new MailCliError("upstream", subtype, message, {
|
|
86
|
+
details,
|
|
87
|
+
exitCode: 4 /* NetworkError */
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function mailRestrictedError(subtype, message, details) {
|
|
91
|
+
return new MailCliError("policy", subtype, message, {
|
|
92
|
+
details,
|
|
93
|
+
exitCode: 6 /* PolicyError */
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function mailConfirmationError(action, details) {
|
|
97
|
+
return new MailCliError("confirmation", "required", "\u8BE5\u64CD\u4F5C\u9700\u8981\u660E\u786E\u786E\u8BA4", {
|
|
98
|
+
details: { action, ...details },
|
|
99
|
+
exitCode: 10 /* ConfirmationRequired */
|
|
100
|
+
});
|
|
101
|
+
}
|
|
78
102
|
|
|
79
103
|
// src/shortcuts/mail/continuation.ts
|
|
80
104
|
function stateRoot(ctx) {
|
|
@@ -449,7 +473,7 @@ var opContactList = {
|
|
|
449
473
|
),
|
|
450
474
|
async handler(args, env) {
|
|
451
475
|
const name = String(args.name || "").trim();
|
|
452
|
-
if (!name) throw
|
|
476
|
+
if (!name) throw mailValidationError("name_required", "name\uFF08\u4EBA\u5458\u59D3\u540D/\u5DE5\u53F7\uFF09\u5FC5\u586B");
|
|
453
477
|
const [inbox, sent] = await Promise.all([
|
|
454
478
|
listMails(env, { ...args, size: args.size ?? 100 }, 0, { from: name }),
|
|
455
479
|
listMails(env, { ...args, size: args.size ?? 100 }, -1, { to: name })
|
|
@@ -475,7 +499,7 @@ var opViewInfo = {
|
|
|
475
499
|
),
|
|
476
500
|
async handler(args, env) {
|
|
477
501
|
const id = String(args.id || "").trim();
|
|
478
|
-
if (!id) throw
|
|
502
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
479
503
|
const rk = mailRandomKey();
|
|
480
504
|
const [rkKey, rkVal] = rk.split("=");
|
|
481
505
|
const value = await env.host.request({
|
|
@@ -514,7 +538,7 @@ var opViewContent = {
|
|
|
514
538
|
),
|
|
515
539
|
async handler(args, env) {
|
|
516
540
|
const id = String(args.id || "").trim();
|
|
517
|
-
if (!id) throw
|
|
541
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
518
542
|
const rk = mailRandomKey();
|
|
519
543
|
const [rkKey, rkVal] = rk.split("=");
|
|
520
544
|
const value = await env.host.request({
|
|
@@ -571,7 +595,7 @@ var opPersonSearch = {
|
|
|
571
595
|
),
|
|
572
596
|
async handler(args, env) {
|
|
573
597
|
const keyword = String(args.keyword || "").trim();
|
|
574
|
-
if (!keyword) throw
|
|
598
|
+
if (!keyword) throw mailValidationError("keyword_required", "keyword\uFF08\u59D3\u540D/\u5DE5\u53F7\uFF09\u5FC5\u586B");
|
|
575
599
|
const value = await env.host.request({
|
|
576
600
|
path: "/api/mail/base/common/browser/complete/resource",
|
|
577
601
|
method: "POST",
|
|
@@ -659,7 +683,7 @@ var opAddressSearch = {
|
|
|
659
683
|
),
|
|
660
684
|
async handler(args, env) {
|
|
661
685
|
const keyword = String(args.keyword || "").trim();
|
|
662
|
-
if (!keyword) throw
|
|
686
|
+
if (!keyword) throw mailValidationError("keyword_required", "keyword\uFF08\u90AE\u7BB1\u5173\u952E\u5B57\uFF09\u5FC5\u586B");
|
|
663
687
|
const value = await env.host.request({
|
|
664
688
|
path: "/api/mail/base/add/addressFullsearch",
|
|
665
689
|
method: "POST",
|
|
@@ -721,7 +745,7 @@ var opGroupDetail = {
|
|
|
721
745
|
),
|
|
722
746
|
async handler(args, env) {
|
|
723
747
|
const id = String(args.id || "").trim();
|
|
724
|
-
if (!id) throw
|
|
748
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u5206\u7EC4 id\uFF09\u5FC5\u586B");
|
|
725
749
|
const value = await env.host.request({
|
|
726
750
|
path: "/api/mail/base/contacts/getMailContactsGroupVosByGroupId",
|
|
727
751
|
method: "POST",
|
|
@@ -804,27 +828,6 @@ var opAttachmentCenter = {
|
|
|
804
828
|
return mailSuccess("mail.attachment.center", value?.data || {});
|
|
805
829
|
}
|
|
806
830
|
};
|
|
807
|
-
var opClearlogList = {
|
|
808
|
-
name: "mail.clearlog.list",
|
|
809
|
-
resource: "mail/base/setting/mailClear/getEmailClearLogList",
|
|
810
|
-
method: "POST",
|
|
811
|
-
action: "mail.clearlog.list",
|
|
812
|
-
summary: "\u90AE\u4EF6\u6E05\u7406\u65E5\u5FD7\u5217\u8868",
|
|
813
|
-
risk: READ,
|
|
814
|
-
inputSchema: schemaOf(
|
|
815
|
-
{ page: SCHEMA_INTEGER, size: SCHEMA_INTEGER },
|
|
816
|
-
{ description: "\u6E05\u7406\u65E5\u5FD7\u5217\u8868" }
|
|
817
|
-
),
|
|
818
|
-
async handler(args, env) {
|
|
819
|
-
const body = { current: num(args.page, 1), pageSize: num(args.size, 20) };
|
|
820
|
-
const value = await env.host.request({
|
|
821
|
-
path: "/api/mail/base/setting/mailClear/getEmailClearLogList",
|
|
822
|
-
method: "POST",
|
|
823
|
-
body
|
|
824
|
-
});
|
|
825
|
-
return mailSuccess("mail.clearlog.list", value?.data || {});
|
|
826
|
-
}
|
|
827
|
-
};
|
|
828
831
|
var mailReadOperations = [
|
|
829
832
|
opList,
|
|
830
833
|
opContactList,
|
|
@@ -841,8 +844,7 @@ var mailReadOperations = [
|
|
|
841
844
|
opTemplateList,
|
|
842
845
|
opSignList,
|
|
843
846
|
opBlacklistList,
|
|
844
|
-
opAttachmentCenter
|
|
845
|
-
opClearlogList
|
|
847
|
+
opAttachmentCenter
|
|
846
848
|
];
|
|
847
849
|
|
|
848
850
|
// src/shortcuts/mail/operations/mail-send.ts
|
|
@@ -881,7 +883,7 @@ async function mailAdd(env, flag, mailResourceId) {
|
|
|
881
883
|
form: params
|
|
882
884
|
});
|
|
883
885
|
const d = value?.data || {};
|
|
884
|
-
if (!d.sessionUuid) throw
|
|
886
|
+
if (!d.sessionUuid) throw mailUpstreamError("mail_add_contract", "mailAdd \u672A\u8FD4\u56DE sessionUuid\uFF1A" + JSON.stringify(value).slice(0, 300));
|
|
885
887
|
return d;
|
|
886
888
|
}
|
|
887
889
|
async function searchInternal(env, keyword) {
|
|
@@ -925,7 +927,7 @@ async function resolveInternal(env, names) {
|
|
|
925
927
|
else if (exact.length > 1) pending.push({ keyword: n, reason: "\u91CD\u540D", candidates: exact.map(cand) });
|
|
926
928
|
else if (list.length === 1) out.push(toItem(list[0]));
|
|
927
929
|
else if (list.length > 1) pending.push({ keyword: n, reason: "\u591A\u5019\u9009\uFF08\u65E0\u7CBE\u786E\u5339\u914D\uFF09", candidates: list.slice(0, 5).map(cand) });
|
|
928
|
-
else throw
|
|
930
|
+
else throw mailValidationError("recipient_person_not_found", "\u672A\u627E\u5230\u5185\u90E8\u4EBA\u5458\uFF1A" + n + "\uFF08\u53EF\u5C1D\u8BD5\u59D3\u540D/\u5DE5\u53F7\uFF1B\u82E5\u662F\u90E8\u95E8\u8BF7\u7528 to-dep/cc-dep/bcc-dep \u6307\u5B9A\uFF09");
|
|
929
931
|
}
|
|
930
932
|
if (pending.length) throw new CandidateError(pending);
|
|
931
933
|
return out;
|
|
@@ -1018,7 +1020,7 @@ async function resolveDepartment(env, names) {
|
|
|
1018
1020
|
} else if (matches.length > 1) {
|
|
1019
1021
|
pending.push({ keyword: n, reason: "\u540C\u540D\u90E8\u95E8\uFF08\u8BF7\u5728\u7ED3\u679C\u4E2D\u9009\u62E9\uFF09", candidates: matches.map((x) => ({ id: x.id, name: x.name, type: "\u90E8\u95E8" })) });
|
|
1020
1022
|
} else {
|
|
1021
|
-
throw
|
|
1023
|
+
throw mailValidationError("department_not_found", "\u672A\u627E\u5230\u90E8\u95E8\uFF1A" + n + "\uFF08\u8BF7\u786E\u8BA4\u90E8\u95E8\u540D\u79F0\uFF0C\u6216\u7528 to \u6307\u5B9A\u4EBA\u5458\uFF09");
|
|
1022
1024
|
}
|
|
1023
1025
|
}
|
|
1024
1026
|
if (pending.length) throw new CandidateError(pending);
|
|
@@ -1033,7 +1035,7 @@ async function resolveExternal(env, emails) {
|
|
|
1033
1035
|
}
|
|
1034
1036
|
const list = await searchExternal(env, e);
|
|
1035
1037
|
const hit = list.find((x) => x.mailAddress?.includes(e)) || list[0];
|
|
1036
|
-
if (!hit) throw
|
|
1038
|
+
if (!hit) throw mailValidationError("external_address_not_found", "\u672A\u627E\u5230\u5916\u90E8\u90AE\u7BB1\uFF1A" + e + "\uFF08\u53EF\u5C1D\u8BD5\u5B8C\u6574\u90AE\u7BB1\u5730\u5740\uFF09");
|
|
1037
1039
|
out.push({ mailAddress: hit.mailAddress, mailNickName: hit.mailNickName });
|
|
1038
1040
|
}
|
|
1039
1041
|
return out;
|
|
@@ -1071,9 +1073,9 @@ async function parseRecipients(env, add, args) {
|
|
|
1071
1073
|
const hasEmail = all.some(looksLikeEmail);
|
|
1072
1074
|
const hasName = all.some((x) => !looksLikeEmail(x));
|
|
1073
1075
|
if (hasEmail && hasName) {
|
|
1074
|
-
throw
|
|
1076
|
+
throw mailValidationError("recipient_mixed", "\u6536\u4EF6\u4EBA\u5185\u5916\u90E8\u6DF7\u7528\uFF1A\u90AE\u7BB1\u5730\u5740=\u5916\u90E8\u90AE\u4EF6\u3001\u59D3\u540D=\u5185\u90E8\u90AE\u4EF6\uFF0C\u8BF7\u7EDF\u4E00\uFF0C\u6216\u7528 --internal/--external \u660E\u786E\u90AE\u4EF6\u7C7B\u578B");
|
|
1075
1077
|
}
|
|
1076
|
-
if (!all.length) throw
|
|
1078
|
+
if (!all.length) throw mailValidationError("recipient_required", "\u8BF7\u5148\u8BF4\u660E\u6536\u4EF6\u4EBA\uFF08\u59D3\u540D=\u5185\u90E8\u90AE\u4EF6 / \u90AE\u7BB1\u5730\u5740=\u5916\u90E8\u90AE\u4EF6 / \u90E8\u95E8\u7528 to-dep\uFF09");
|
|
1077
1079
|
kind = hasEmail ? "external" : "internal";
|
|
1078
1080
|
}
|
|
1079
1081
|
}
|
|
@@ -1117,7 +1119,7 @@ async function parseRecipients(env, add, args) {
|
|
|
1117
1119
|
const names = (arr) => arr.map((x) => x.mailNickName || x.mailAddress).join("\u3001");
|
|
1118
1120
|
const from = (add.sendFrom_outer || []).find((x) => x.selected) || (add.sendFrom_outer || [])[0];
|
|
1119
1121
|
if (!from || !from.mailAddress) {
|
|
1120
|
-
throw
|
|
1122
|
+
throw mailRestrictedError("outer_account_unbound", "\u5F53\u524D\u8D26\u53F7\u672A\u914D\u7F6E\u5916\u90E8\u90AE\u7BB1\u53D1\u4EF6\u8D26\u53F7\uFF08mailAdd.sendFrom_outer \u4E3A\u7A7A\uFF09\uFF0C\u65E0\u6CD5\u53D1\u9001\u5916\u90E8\u90AE\u4EF6\uFF1B\u8BF7\u5148\u5728\u90AE\u4EF6\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5916\u90E8\u90AE\u7BB1\u8D26\u53F7");
|
|
1121
1123
|
}
|
|
1122
1124
|
const totalCount = [...rawTo, ...rawCc, ...rawBcc].length;
|
|
1123
1125
|
return {
|
|
@@ -1145,22 +1147,22 @@ async function checkMailConfig(env, isInternal) {
|
|
|
1145
1147
|
const sys = value?.data?.sysConfig || {};
|
|
1146
1148
|
if (isInternal === 1) {
|
|
1147
1149
|
if (sys.innerMail !== void 0 && Number(sys.innerMail) !== 1) {
|
|
1148
|
-
throw
|
|
1150
|
+
throw mailRestrictedError("internal_mail_disabled", "\u5F53\u524D\u73AF\u5883\u672A\u542F\u7528\u5185\u90E8\u90AE\u4EF6\uFF08getEmailAllConfig.sysConfig.innerMail=" + sys.innerMail + "\uFF09\uFF0C\u65E0\u6CD5\u53D1\u9001\u5185\u90E8\u90AE\u4EF6");
|
|
1149
1151
|
}
|
|
1150
1152
|
} else {
|
|
1151
1153
|
if (sys.outterMail !== void 0 && Number(sys.outterMail) !== 1) {
|
|
1152
|
-
throw
|
|
1154
|
+
throw mailRestrictedError("outer_mail_disabled", "\u5F53\u524D\u73AF\u5883\u672A\u542F\u7528\u5916\u90E8\u90AE\u4EF6\uFF08getEmailAllConfig.outterMail=0\uFF09\uFF0C\u65E0\u6CD5\u53D1\u9001\u5916\u90E8\u90AE\u4EF6");
|
|
1153
1155
|
}
|
|
1154
1156
|
}
|
|
1155
1157
|
if (sys.innerMail !== void 0 && sys.outterMail !== void 0 && Number(sys.innerMail) !== 1 && Number(sys.outterMail) !== 1) {
|
|
1156
|
-
throw
|
|
1158
|
+
throw mailRestrictedError("mail_disabled", "\u7CFB\u7EDF\u672A\u542F\u7528\u90AE\u4EF6\u529F\u80FD\uFF08\u5185\u90E8/\u5916\u90E8\u90AE\u4EF6\u5747\u672A\u5F00\u542F\uFF09\uFF0C\u65E0\u6CD5\u53D1\u9001\u90AE\u4EF6");
|
|
1157
1159
|
}
|
|
1158
1160
|
}
|
|
1159
1161
|
async function precheckSend(env, body) {
|
|
1160
1162
|
const c = await env.host.request({ path: "/api/mail/send/canSendMail", method: "POST", body });
|
|
1161
1163
|
const cdata = c?.data || {};
|
|
1162
1164
|
if (cdata.success !== void 0 && cdata.success !== 1) {
|
|
1163
|
-
throw
|
|
1165
|
+
throw mailRestrictedError("send_blocked", "\u53D1\u9001\u524D\u6821\u9A8C\u672A\u901A\u8FC7\uFF1A" + (cdata.msg || "\u672A\u77E5\u62E6\u622A\uFF08canSendMail\uFF09"));
|
|
1164
1166
|
}
|
|
1165
1167
|
}
|
|
1166
1168
|
async function buildBody(env, add, args, draft) {
|
|
@@ -1345,7 +1347,7 @@ var opStar = {
|
|
|
1345
1347
|
async handler(args, env) {
|
|
1346
1348
|
const id = String(args.id || "").trim();
|
|
1347
1349
|
const star = String(args.star ?? "1");
|
|
1348
|
-
if (!id) throw
|
|
1350
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
1349
1351
|
const value = await env.host.request({
|
|
1350
1352
|
path: "/api/mail/base/resource/starMail",
|
|
1351
1353
|
method: "POST",
|
|
@@ -1368,7 +1370,7 @@ var opReadStatus = {
|
|
|
1368
1370
|
async handler(args, env) {
|
|
1369
1371
|
const id = String(args.id || "").trim();
|
|
1370
1372
|
const read = String(args.read ?? "1");
|
|
1371
|
-
if (!id) throw
|
|
1373
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
1372
1374
|
const value = await env.host.request({
|
|
1373
1375
|
path: "/api/mail/base/resource/setMailReadStatus",
|
|
1374
1376
|
method: "POST",
|
|
@@ -1417,7 +1419,7 @@ var opWaitAdd = {
|
|
|
1417
1419
|
),
|
|
1418
1420
|
async handler(args, env) {
|
|
1419
1421
|
const id = String(args.id || "").trim();
|
|
1420
|
-
if (!id) throw
|
|
1422
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
1421
1423
|
const content = args.title ? String(args.title) : await fetchSubject(env, id);
|
|
1422
1424
|
const processTime = args.endDate ? String(args.endDate) : "";
|
|
1423
1425
|
const reminderTime = args.reminderTime ? String(args.reminderTime) : "";
|
|
@@ -1449,8 +1451,8 @@ var opMoveFolder = {
|
|
|
1449
1451
|
async handler(args, env) {
|
|
1450
1452
|
const id = String(args.id || "").trim();
|
|
1451
1453
|
const folder = String(args.folder || "").trim();
|
|
1452
|
-
if (!id) throw
|
|
1453
|
-
if (!folder) throw
|
|
1454
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
1455
|
+
if (!folder) throw mailValidationError("folder_required", "folder\uFF08\u76EE\u6807\u6587\u4EF6\u5939 id\uFF09\u5FC5\u586B");
|
|
1454
1456
|
const value = await env.host.request({
|
|
1455
1457
|
path: "/api/mail/base/resource/moveMailToFolder",
|
|
1456
1458
|
method: "POST",
|
|
@@ -1472,7 +1474,7 @@ var opDeleteMove = {
|
|
|
1472
1474
|
),
|
|
1473
1475
|
async handler(args, env) {
|
|
1474
1476
|
const id = String(args.id || "").trim();
|
|
1475
|
-
if (!id) throw
|
|
1477
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
1476
1478
|
const value = await env.host.request({
|
|
1477
1479
|
path: "/api/mail/base/resource/deleteMailResourceByMoveBatch",
|
|
1478
1480
|
method: "POST",
|
|
@@ -1495,7 +1497,7 @@ var opFolderCreate = {
|
|
|
1495
1497
|
),
|
|
1496
1498
|
async handler(args, env) {
|
|
1497
1499
|
const name = String(args.name || "").trim();
|
|
1498
|
-
if (!name) throw
|
|
1500
|
+
if (!name) throw mailValidationError("folder_name_required", "name\uFF08\u6587\u4EF6\u5939\u540D\uFF09\u5FC5\u586B");
|
|
1499
1501
|
const body = { name };
|
|
1500
1502
|
if (args.id) body.id = String(args.id);
|
|
1501
1503
|
const value = await env.host.request({ path: "/api/mail/base/setting/folder/saveMailFolder", method: "POST", body });
|
|
@@ -1515,7 +1517,7 @@ var opFolderDelete = {
|
|
|
1515
1517
|
),
|
|
1516
1518
|
async handler(args, env) {
|
|
1517
1519
|
const id = String(args.id || "").trim();
|
|
1518
|
-
if (!id) throw
|
|
1520
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u6587\u4EF6\u5939 id\uFF09\u5FC5\u586B");
|
|
1519
1521
|
const value = await env.host.request({ path: "/api/mail/base/setting/folder/deleteMailFolder", method: "POST", body: { id } });
|
|
1520
1522
|
return mailSuccess("mail.folder.delete", value?.data ?? "SUCCESS", { id });
|
|
1521
1523
|
}
|
|
@@ -1533,7 +1535,7 @@ var opRecall = {
|
|
|
1533
1535
|
),
|
|
1534
1536
|
async handler(args, env) {
|
|
1535
1537
|
const id = String(args.id || "").trim();
|
|
1536
|
-
if (!id) throw
|
|
1538
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u90AE\u4EF6 id\uFF09\u5FC5\u586B");
|
|
1537
1539
|
const value = await env.host.request({ path: "/api/mail/base/recallMail", method: "POST", body: { mailResourceId: id, ids: id } });
|
|
1538
1540
|
const d = value?.data || {};
|
|
1539
1541
|
return mailSuccess("mail.recall", { success: d.success === 1, msg: d.msg }, { id });
|
|
@@ -1552,7 +1554,7 @@ var opAttachmentUpload = {
|
|
|
1552
1554
|
),
|
|
1553
1555
|
async handler(args, env) {
|
|
1554
1556
|
const filePath = String(args.file || "").trim();
|
|
1555
|
-
if (!filePath) throw
|
|
1557
|
+
if (!filePath) throw mailValidationError("file_required", "file\uFF08\u672C\u5730\u6587\u4EF6\u8DEF\u5F84\uFF09\u5FC5\u586B");
|
|
1556
1558
|
const name = args.name ? String(args.name) : filePath.split(/[\\/]/).pop() || "attachment";
|
|
1557
1559
|
let buffer;
|
|
1558
1560
|
let size;
|
|
@@ -1561,7 +1563,7 @@ var opAttachmentUpload = {
|
|
|
1561
1563
|
size = stat.size;
|
|
1562
1564
|
buffer = readFileSync(filePath);
|
|
1563
1565
|
} catch {
|
|
1564
|
-
throw
|
|
1566
|
+
throw mailValidationError("file_unreadable", "\u65E0\u6CD5\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF1A" + filePath);
|
|
1565
1567
|
}
|
|
1566
1568
|
const md5 = createHash("md5").update(buffer).digest("hex");
|
|
1567
1569
|
const lastModified = Date.now();
|
|
@@ -1583,14 +1585,14 @@ var opAttachmentUpload = {
|
|
|
1583
1585
|
multipart: buildMultipart({ ...base })
|
|
1584
1586
|
});
|
|
1585
1587
|
const preUploadId = precheck?.data?.preUploadId;
|
|
1586
|
-
if (!preUploadId) throw
|
|
1588
|
+
if (!preUploadId) throw mailUpstreamError("attachment_precheck_contract", "\u9644\u4EF6\u9884\u68C0\u672A\u8FD4\u56DE preUploadId\uFF1A" + JSON.stringify(precheck?.data).slice(0, 200));
|
|
1587
1589
|
const upload = await env.host.request({
|
|
1588
1590
|
path: "/api/file/module/upload",
|
|
1589
1591
|
method: "POST",
|
|
1590
1592
|
multipart: buildMultipart({ ...base, preUploadId, uploadType: "common" }, { file: buffer, filename: name, type: mimeOf(name) })
|
|
1591
1593
|
});
|
|
1592
1594
|
const fileid = upload?.data?.fileid;
|
|
1593
|
-
if (!fileid) throw
|
|
1595
|
+
if (!fileid) throw mailUpstreamError("attachment_upload_contract", "\u9644\u4EF6\u4E0A\u4F20\u672A\u8FD4\u56DE fileid\uFF1A" + JSON.stringify(upload?.data).slice(0, 200));
|
|
1594
1596
|
await env.host.request({
|
|
1595
1597
|
path: "/api/mail/base/add/addPermissionFile",
|
|
1596
1598
|
method: "POST",
|
|
@@ -1612,7 +1614,7 @@ var opAttachmentDownload = {
|
|
|
1612
1614
|
),
|
|
1613
1615
|
async handler(args, env) {
|
|
1614
1616
|
const ids = String(args.ids || "").trim();
|
|
1615
|
-
if (!ids) throw
|
|
1617
|
+
if (!ids) throw mailValidationError("ids_required", "ids\uFF08\u9644\u4EF6 id\uFF09\u5FC5\u586B");
|
|
1616
1618
|
const value = await env.host.request({
|
|
1617
1619
|
path: "/api/mail/base/file/batchDownload",
|
|
1618
1620
|
method: "POST",
|
|
@@ -1659,8 +1661,8 @@ var CONTACT_SCHEMA = schemaOf(
|
|
|
1659
1661
|
function buildContactBody(args) {
|
|
1660
1662
|
const name = String(args.mailUserName || "").trim();
|
|
1661
1663
|
const address = String(args.mailAddress || "").trim();
|
|
1662
|
-
if (!name) throw
|
|
1663
|
-
if (!address) throw
|
|
1664
|
+
if (!name) throw mailValidationError("user_name_required", "mailUserName\uFF08\u59D3\u540D\uFF09\u5FC5\u586B");
|
|
1665
|
+
if (!address) throw mailValidationError("mail_address_required", "mailAddress\uFF08\u90AE\u7BB1\u5730\u5740\uFF09\u5FC5\u586B");
|
|
1664
1666
|
const body = {
|
|
1665
1667
|
mailUserName: name,
|
|
1666
1668
|
mailAddress: address,
|
|
@@ -1714,8 +1716,8 @@ var opContactSaveApply = {
|
|
|
1714
1716
|
requiresConfirmation: true,
|
|
1715
1717
|
inputSchema: CONTACT_SCHEMA,
|
|
1716
1718
|
async handler(args, env) {
|
|
1717
|
-
if (args.confirm !== true) throw
|
|
1718
|
-
if (!args.continuation) throw
|
|
1719
|
+
if (args.confirm !== true) throw mailConfirmationError("mail.contacts.save.apply");
|
|
1720
|
+
if (!args.continuation) throw mailValidationError("continuation_required", "mail.contacts.save.apply \u9700\u8981 prepare \u8FD4\u56DE\u7684 continuation");
|
|
1719
1721
|
const lease = await env.continuation.verify(String(args.continuation), "mail.contacts.save.apply");
|
|
1720
1722
|
const session = await env.host.getSession();
|
|
1721
1723
|
if (lease.baseUrl !== session.baseUrl || lease.profile !== session.profile || lease.userId !== session.userId) {
|
|
@@ -1738,7 +1740,7 @@ var opContactDelete = {
|
|
|
1738
1740
|
),
|
|
1739
1741
|
async handler(args, env) {
|
|
1740
1742
|
const id = String(args.id || "").trim();
|
|
1741
|
-
if (!id) throw
|
|
1743
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u8054\u7CFB\u4EBA id\uFF09\u5FC5\u586B");
|
|
1742
1744
|
const value = await env.host.request({ path: "/api/mail/base/contacts/delContacts", method: "POST", body: { ids: id } });
|
|
1743
1745
|
return mailSuccess("mail.contacts.delete", value?.data ?? true, { id });
|
|
1744
1746
|
}
|
|
@@ -1754,7 +1756,7 @@ var GROUP_SCHEMA = schemaOf(
|
|
|
1754
1756
|
);
|
|
1755
1757
|
function buildGroupBody(args) {
|
|
1756
1758
|
const groupName = String(args.groupName || "").trim();
|
|
1757
|
-
if (!groupName) throw
|
|
1759
|
+
if (!groupName) throw mailValidationError("group_name_required", "groupName\uFF08\u5206\u7EC4\u540D\uFF09\u5FC5\u586B");
|
|
1758
1760
|
const body = { groupName };
|
|
1759
1761
|
if (args.id) body.groupId = String(args.id);
|
|
1760
1762
|
return body;
|
|
@@ -1798,8 +1800,8 @@ var opGroupSaveApply = {
|
|
|
1798
1800
|
requiresConfirmation: true,
|
|
1799
1801
|
inputSchema: GROUP_SCHEMA,
|
|
1800
1802
|
async handler(args, env) {
|
|
1801
|
-
if (args.confirm !== true) throw
|
|
1802
|
-
if (!args.continuation) throw
|
|
1803
|
+
if (args.confirm !== true) throw mailConfirmationError("mail.contacts.group.save.apply");
|
|
1804
|
+
if (!args.continuation) throw mailValidationError("continuation_required", "mail.contacts.group.save.apply \u9700\u8981 prepare \u8FD4\u56DE\u7684 continuation");
|
|
1803
1805
|
const lease = await env.continuation.verify(String(args.continuation), "mail.contacts.group.save.apply");
|
|
1804
1806
|
const session = await env.host.getSession();
|
|
1805
1807
|
if (lease.baseUrl !== session.baseUrl || lease.profile !== session.profile || lease.userId !== session.userId) {
|
|
@@ -1822,7 +1824,7 @@ var opGroupDelete = {
|
|
|
1822
1824
|
),
|
|
1823
1825
|
async handler(args, env) {
|
|
1824
1826
|
const id = String(args.id || "").trim();
|
|
1825
|
-
if (!id) throw
|
|
1827
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u5206\u7EC4 id\uFF09\u5FC5\u586B");
|
|
1826
1828
|
const value = await env.host.request({ path: "/api/mail/base/contacts/delContactsGroup", method: "POST", body: { groupId: id } });
|
|
1827
1829
|
return mailSuccess("mail.contacts.group.delete", value?.data ?? true, { id });
|
|
1828
1830
|
}
|
|
@@ -1855,8 +1857,8 @@ var TEMPLATE_SCHEMA = schemaOf(
|
|
|
1855
1857
|
function buildTemplateBody(args) {
|
|
1856
1858
|
const subject = String(args.subject || "").trim();
|
|
1857
1859
|
const clobContent = String(args.clobContent || "").trim();
|
|
1858
|
-
if (!subject) throw
|
|
1859
|
-
if (!clobContent) throw
|
|
1860
|
+
if (!subject) throw mailValidationError("subject_required", "subject\uFF08\u6A21\u677F\u4E3B\u9898\uFF09\u5FC5\u586B");
|
|
1861
|
+
if (!clobContent) throw mailValidationError("content_required", "clobContent\uFF08Base64 \u7F16\u7801\u7684 HTML \u5185\u5BB9\uFF09\u5FC5\u586B");
|
|
1860
1862
|
const body = {
|
|
1861
1863
|
templateType: args.templateType ? String(args.templateType) : "personal",
|
|
1862
1864
|
subject,
|
|
@@ -1911,8 +1913,8 @@ var opTemplateSaveApply = {
|
|
|
1911
1913
|
requiresConfirmation: true,
|
|
1912
1914
|
inputSchema: TEMPLATE_SCHEMA,
|
|
1913
1915
|
async handler(args, env) {
|
|
1914
|
-
if (args.confirm !== true) throw
|
|
1915
|
-
if (!args.continuation) throw
|
|
1916
|
+
if (args.confirm !== true) throw mailConfirmationError("mail.template.save.apply");
|
|
1917
|
+
if (!args.continuation) throw mailValidationError("continuation_required", "mail.template.save.apply \u9700\u8981 prepare \u8FD4\u56DE\u7684 continuation");
|
|
1916
1918
|
const lease = await env.continuation.verify(String(args.continuation), "mail.template.save.apply");
|
|
1917
1919
|
const session = await env.host.getSession();
|
|
1918
1920
|
if (lease.baseUrl !== session.baseUrl || lease.profile !== session.profile || lease.userId !== session.userId) {
|
|
@@ -1942,7 +1944,7 @@ var opTemplateUpdate = {
|
|
|
1942
1944
|
),
|
|
1943
1945
|
async handler(args, env) {
|
|
1944
1946
|
const id = String(args.id || "").trim();
|
|
1945
|
-
if (!id) throw
|
|
1947
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u6A21\u677F id\uFF09\u5FC5\u586B");
|
|
1946
1948
|
const info = await env.host.request({
|
|
1947
1949
|
path: "/api/mail/base/setting/template/getMailTemplateInfo",
|
|
1948
1950
|
method: "POST",
|
|
@@ -1960,8 +1962,8 @@ var opTemplateUpdate = {
|
|
|
1960
1962
|
contentId: cur.contentId ?? "null",
|
|
1961
1963
|
templateFile: cur.templateFile ?? []
|
|
1962
1964
|
};
|
|
1963
|
-
if (!body.subject) throw
|
|
1964
|
-
if (!body.clobContent) throw
|
|
1965
|
+
if (!body.subject) throw mailValidationError("subject_empty", "\u6A21\u677F\u4E3B\u9898\u4E3A\u7A7A\uFF08\u539F\u503C\u7F3A\u5931\u4E14\u672A\u63D0\u4F9B subject\uFF09");
|
|
1966
|
+
if (!body.clobContent) throw mailValidationError("content_empty", "\u6A21\u677F\u5185\u5BB9\u4E3A\u7A7A\uFF08\u539F\u503C\u7F3A\u5931\u4E14\u672A\u63D0\u4F9B clobContent\uFF09");
|
|
1965
1967
|
const value = await env.host.request({ path: "/api/mail/base/setting/template/updateMailTemplate", method: "POST", body });
|
|
1966
1968
|
return mailSuccess("mail.template.update", value?.data ?? "SUCCESS", { id });
|
|
1967
1969
|
}
|
|
@@ -1979,7 +1981,7 @@ var opTemplateDelete = {
|
|
|
1979
1981
|
),
|
|
1980
1982
|
async handler(args, env) {
|
|
1981
1983
|
const id = String(args.id || "").trim();
|
|
1982
|
-
if (!id) throw
|
|
1984
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u6A21\u677F id\uFF09\u5FC5\u586B");
|
|
1983
1985
|
const value = await env.host.request({ path: "/api/mail/base/setting/template/deleteMailTemplate", method: "POST", body: { id } });
|
|
1984
1986
|
return mailSuccess("mail.template.delete", value?.data ?? "SUCCESS", { id });
|
|
1985
1987
|
}
|
|
@@ -1997,7 +1999,7 @@ var opTemplateDefault = {
|
|
|
1997
1999
|
),
|
|
1998
2000
|
async handler(args, env) {
|
|
1999
2001
|
const id = String(args.id || "").trim();
|
|
2000
|
-
if (!id) throw
|
|
2002
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u6A21\u677F id\uFF09\u5FC5\u586B");
|
|
2001
2003
|
const value = await env.host.request({ path: "/api/mail/base/setting/template/defaultMailTemplate", method: "POST", body: { id } });
|
|
2002
2004
|
return mailSuccess("mail.template.default", value?.data ?? "SUCCESS", { id });
|
|
2003
2005
|
}
|
|
@@ -2028,8 +2030,8 @@ var SIGN_SCHEMA = schemaOf(
|
|
|
2028
2030
|
function buildSignBody(args) {
|
|
2029
2031
|
const signName = String(args.signName || "").trim();
|
|
2030
2032
|
const clobContent = String(args.clobContent || "").trim();
|
|
2031
|
-
if (!signName) throw
|
|
2032
|
-
if (!clobContent) throw
|
|
2033
|
+
if (!signName) throw mailValidationError("sign_name_required", "signName\uFF08\u7B7E\u540D\u540D\u79F0\uFF09\u5FC5\u586B");
|
|
2034
|
+
if (!clobContent) throw mailValidationError("content_required", "clobContent\uFF08Base64 \u7F16\u7801\u7684 HTML \u5185\u5BB9\uFF09\u5FC5\u586B");
|
|
2033
2035
|
const body = {
|
|
2034
2036
|
signName,
|
|
2035
2037
|
clobContent,
|
|
@@ -2080,8 +2082,8 @@ var opSignSaveApply = {
|
|
|
2080
2082
|
requiresConfirmation: true,
|
|
2081
2083
|
inputSchema: SIGN_SCHEMA,
|
|
2082
2084
|
async handler(args, env) {
|
|
2083
|
-
if (args.confirm !== true) throw
|
|
2084
|
-
if (!args.continuation) throw
|
|
2085
|
+
if (args.confirm !== true) throw mailConfirmationError("mail.sign.save.apply");
|
|
2086
|
+
if (!args.continuation) throw mailValidationError("continuation_required", "mail.sign.save.apply \u9700\u8981 prepare \u8FD4\u56DE\u7684 continuation");
|
|
2085
2087
|
const lease = await env.continuation.verify(String(args.continuation), "mail.sign.save.apply");
|
|
2086
2088
|
const session = await env.host.getSession();
|
|
2087
2089
|
if (lease.baseUrl !== session.baseUrl || lease.profile !== session.profile || lease.userId !== session.userId) {
|
|
@@ -2112,7 +2114,7 @@ var opSignUpdate = {
|
|
|
2112
2114
|
),
|
|
2113
2115
|
async handler(args, env) {
|
|
2114
2116
|
const id = String(args.id || "").trim();
|
|
2115
|
-
if (!id) throw
|
|
2117
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u7B7E\u540D id\uFF09\u5FC5\u586B");
|
|
2116
2118
|
const form = await env.host.request({ path: "/api/mail/base/setting/sign/getMailSignForm", method: "POST", body: { id } });
|
|
2117
2119
|
const cur = form?.data?.formData || {};
|
|
2118
2120
|
const body = {
|
|
@@ -2124,8 +2126,8 @@ var opSignUpdate = {
|
|
|
2124
2126
|
signType: args.signType ? String(args.signType) : cur.signType ?? "0",
|
|
2125
2127
|
electronSignEnable: args.electronSignEnable !== void 0 ? Number(args.electronSignEnable) : cur.electronSignEnable ?? 0
|
|
2126
2128
|
};
|
|
2127
|
-
if (!body.signName) throw
|
|
2128
|
-
if (!body.clobContent) throw
|
|
2129
|
+
if (!body.signName) throw mailValidationError("sign_name_empty", "\u7B7E\u540D\u540D\u79F0\u4E3A\u7A7A\uFF08\u539F\u503C\u7F3A\u5931\u4E14\u672A\u63D0\u4F9B signName\uFF09");
|
|
2130
|
+
if (!body.clobContent) throw mailValidationError("content_empty", "\u7B7E\u540D\u5185\u5BB9\u4E3A\u7A7A\uFF08\u539F\u503C\u7F3A\u5931\u4E14\u672A\u63D0\u4F9B clobContent\uFF09");
|
|
2129
2131
|
const value = await env.host.request({ path: "/api/mail/base/setting/sign/updateMailSign", method: "POST", body });
|
|
2130
2132
|
return mailSuccess("mail.sign.update", value?.data ?? "SUCCESS", { id });
|
|
2131
2133
|
}
|
|
@@ -2143,7 +2145,7 @@ var opSignDelete = {
|
|
|
2143
2145
|
),
|
|
2144
2146
|
async handler(args, env) {
|
|
2145
2147
|
const id = String(args.id || "").trim();
|
|
2146
|
-
if (!id) throw
|
|
2148
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u7B7E\u540D id\uFF09\u5FC5\u586B");
|
|
2147
2149
|
const value = await env.host.request({ path: "/api/mail/base/setting/sign/deleteMailSign", method: "POST", body: { id } });
|
|
2148
2150
|
return mailSuccess("mail.sign.delete", value?.data ?? "SUCCESS", { id });
|
|
2149
2151
|
}
|
|
@@ -2161,7 +2163,7 @@ var opSignDefault = {
|
|
|
2161
2163
|
),
|
|
2162
2164
|
async handler(args, env) {
|
|
2163
2165
|
const id = String(args.id || "").trim();
|
|
2164
|
-
if (!id) throw
|
|
2166
|
+
if (!id) throw mailValidationError("id_required", "id\uFF08\u7B7E\u540D id\uFF09\u5FC5\u586B");
|
|
2165
2167
|
const value = await env.host.request({ path: "/api/mail/base/setting/sign/defaultMailSign", method: "POST", body: { id } });
|
|
2166
2168
|
return mailSuccess("mail.sign.default", value?.data ?? "SUCCESS", { id });
|
|
2167
2169
|
}
|
|
@@ -2233,15 +2235,15 @@ var BLACKLIST_SCHEMA = schemaOf(
|
|
|
2233
2235
|
);
|
|
2234
2236
|
function buildBlacklistBody(args) {
|
|
2235
2237
|
const operateType = String(args.operateType || "add").toLowerCase();
|
|
2236
|
-
if (operateType !== "add" && operateType !== "delete") throw
|
|
2238
|
+
if (operateType !== "add" && operateType !== "delete") throw mailValidationError("operate_type_invalid", "operateType \u5FC5\u987B\u662F add \u6216 delete");
|
|
2237
2239
|
const body = { operateType };
|
|
2238
2240
|
if (operateType === "add") {
|
|
2239
2241
|
const mailAddress = String(args.mailAddress || "").trim();
|
|
2240
|
-
if (!mailAddress) throw
|
|
2242
|
+
if (!mailAddress) throw mailValidationError("mail_address_required", "add \u64CD\u4F5C\u5FC5\u987B\u63D0\u4F9B mailAddress\uFF08\u90AE\u7BB1\u5730\u5740\uFF09");
|
|
2241
2243
|
body.mailAddress = mailAddress;
|
|
2242
2244
|
} else {
|
|
2243
2245
|
const id = String(args.id || "").trim();
|
|
2244
|
-
if (!id) throw
|
|
2246
|
+
if (!id) throw mailValidationError("id_required", "delete \u64CD\u4F5C\u5FC5\u987B\u63D0\u4F9B id\uFF08\u9ED1\u540D\u5355\u8BB0\u5F55 id\uFF09");
|
|
2245
2247
|
body.id = id;
|
|
2246
2248
|
}
|
|
2247
2249
|
return body;
|
|
@@ -2285,8 +2287,8 @@ var opBlacklistOperateApply = {
|
|
|
2285
2287
|
requiresConfirmation: true,
|
|
2286
2288
|
inputSchema: BLACKLIST_SCHEMA,
|
|
2287
2289
|
async handler(args, env) {
|
|
2288
|
-
if (args.confirm !== true) throw
|
|
2289
|
-
if (!args.continuation) throw
|
|
2290
|
+
if (args.confirm !== true) throw mailConfirmationError("mail.blacklist.operate.apply");
|
|
2291
|
+
if (!args.continuation) throw mailValidationError("continuation_required", "mail.blacklist.operate.apply \u9700\u8981 prepare \u8FD4\u56DE\u7684 continuation");
|
|
2290
2292
|
const lease = await env.continuation.verify(String(args.continuation), "mail.blacklist.operate.apply");
|
|
2291
2293
|
const session = await env.host.getSession();
|
|
2292
2294
|
if (lease.baseUrl !== session.baseUrl || lease.profile !== session.profile || lease.userId !== session.userId) {
|
|
@@ -2331,7 +2333,12 @@ function getMailOperation(operation) {
|
|
|
2331
2333
|
}
|
|
2332
2334
|
|
|
2333
2335
|
// src/shortcuts/mail/manifest.ts
|
|
2334
|
-
var
|
|
2336
|
+
var MAIL_WITHHELD_REASONS = {
|
|
2337
|
+
"mail.delete.batch": "\u7269\u7406\u6C38\u4E45\u5220\u9664\uFF08deleteMailResourceBatch\uFF09\u4E0D\u53EF\u9006\u3001\u65E0\u6CD5\u64A4\u9500\uFF0C\u7834\u574F\u6027\u6700\u5F3A\uFF1B\u5982\u786E\u9700\u6267\u884C\uFF0C\u8BF7\u5728\u786E\u8BA4\u98CE\u9669\u540E\u4EE5\u5355\u72EC\u6388\u6743\u65B9\u5F0F\u5904\u7406\uFF0C\u4E0D\u5728\u5E38\u89C4 CLI \u63D0\u4F9B\u3002",
|
|
2338
|
+
"mail.resend": "\u91CD\u53D1\u90AE\u4EF6\uFF08resendMail\uFF09\u4F9D\u8D56\u300C\u90AE\u4EF6\u53D1\u9001\u65E5\u5FD7 id\u300D(mailRemindLogId)\uFF0C\u6E90\u6280\u80FD\u672A\u5C01\u88C5\u65E5\u5FD7\u67E5\u8BE2\u63A5\u53E3\uFF0C\u65E0\u6CD5\u83B7\u5F97\u8BE5 id \u65F6\u5982\u5B9E\u63D0\u793A\uFF0C\u4E0D\u81C6\u9020\uFF1B\u6682\u7F13\u5B9E\u73B0\u3002",
|
|
2339
|
+
"mail.clearlog.list": "\u90AE\u4EF6\u6E05\u7406\u65E5\u5FD7\u63A5\u53E3\uFF08getEmailClearLogList\uFF09\u5728\u672C\u73AF\u5883\u5B9E\u6D4B HTTP 404\uFF0CE10 \u670D\u52A1\u7AEF\u4E0D\u5B58\u5728\u6216\u672A\u88C5\u914D\uFF1B\u8C03\u7528\u5FC5\u7136\u5931\u8D25\uFF0C\u6682\u4E0D\u63D0\u4F9B\uFF0C\u5F85\u786E\u8BA4\u76EE\u6807\u7248\u672C\u540E\u6062\u590D\u3002"
|
|
2340
|
+
};
|
|
2341
|
+
var MAIL_WITHHELD = Object.keys(MAIL_WITHHELD_REASONS);
|
|
2335
2342
|
function buildOperations() {
|
|
2336
2343
|
return mailOperationDefinitions().map((definition) => ({
|
|
2337
2344
|
name: definition.name,
|
|
@@ -2353,9 +2360,11 @@ var mailManifest = {
|
|
|
2353
2360
|
sourceSkill: "weaver-e10-mail",
|
|
2354
2361
|
capabilities: ["mail"],
|
|
2355
2362
|
operations: buildOperations(),
|
|
2363
|
+
// 2026-11-27 审计 MA-04 / G-10:首屏先给被扣下的能力总数,避免截断后模型误判"这里只有这些"。
|
|
2364
|
+
withheldCount: MAIL_WITHHELD.length,
|
|
2356
2365
|
withheldOperations: MAIL_WITHHELD.map((name) => ({
|
|
2357
2366
|
name,
|
|
2358
|
-
reason: name
|
|
2367
|
+
reason: MAIL_WITHHELD_REASONS[name]
|
|
2359
2368
|
}))
|
|
2360
2369
|
};
|
|
2361
2370
|
|
|
@@ -2435,7 +2444,7 @@ function parseJsonInput(raw, label) {
|
|
|
2435
2444
|
try {
|
|
2436
2445
|
const parsed = JSON.parse(stripBom(raw));
|
|
2437
2446
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
2438
|
-
throw
|
|
2447
|
+
throw mailValidationError("input_invalid", label + " \u5FC5\u987B\u662F JSON \u5BF9\u8C61");
|
|
2439
2448
|
}
|
|
2440
2449
|
return parsed;
|
|
2441
2450
|
} catch {
|
|
@@ -2470,8 +2479,13 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
2470
2479
|
});
|
|
2471
2480
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
2472
2481
|
} catch (error) {
|
|
2473
|
-
|
|
2474
|
-
|
|
2482
|
+
const env = failureEnvelope(error);
|
|
2483
|
+
if (shouldReportPlatformError(error)) {
|
|
2484
|
+
const pe = toPlatformError(error);
|
|
2485
|
+
console.error(JSON.stringify({ ...env, code: pe.code, message: pe.message }, null, 2));
|
|
2486
|
+
} else {
|
|
2487
|
+
console.error(JSON.stringify(env, null, 2));
|
|
2488
|
+
}
|
|
2475
2489
|
process.exitCode = isCliError(error) ? error.exitCode : 1 /* GeneralError */;
|
|
2476
2490
|
}
|
|
2477
2491
|
}
|
|
@@ -2481,8 +2495,13 @@ var mailShortcut = {
|
|
|
2481
2495
|
category: "shortcut",
|
|
2482
2496
|
register({ program, action }) {
|
|
2483
2497
|
const mail = program.command("mail").description("\u6CDB\u5FAEE10\u90AE\u4EF6\u7BA1\u7406\uFF08\u67E5\u8BE2/\u53D1\u9001/\u7BA1\u7406\uFF09");
|
|
2484
|
-
mail.command("schema").description("Print mail operation manifest for agents").action(action((ctx) => {
|
|
2485
|
-
|
|
2498
|
+
mail.command("schema").description("Print mail operation manifest for agents").option("--list", '\u53EA\u5217\u64CD\u4F5C\u6E05\u5355\uFF08name/summary/risk\uFF09\uFF0C\u5168\u91CF\u4E0D\u622A\u65AD\uFF1B\u5224\u65AD"\u6709\u6CA1\u6709\u67D0\u64CD\u4F5C"\u7528\u8FD9\u4E2A').option("--full", "\u6253\u5370\u5B8C\u6574 manifest\uFF08\u8D85 stdout \u9884\u7B97\u4F1A\u843D\u672C\u5730 ref\uFF0C\u7528 refs get \u5206\u9875\u53D6\uFF09").option("--operation <name>", "\u53EA\u8F93\u51FA\u5355\u4E2A\u64CD\u4F5C\u7684\u5B8C\u6574\u5951\u7EA6\uFF08\u542B inputSchema\uFF0C\u4F53\u79EF\u8FDC\u4F4E\u4E8E\u9884\u7B97\uFF09").action(action((ctx, options) => {
|
|
2499
|
+
const schema = schemaOptionsOf(options);
|
|
2500
|
+
ctx.output.write(manifestView(mailManifest, schema), {
|
|
2501
|
+
json: true,
|
|
2502
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
2503
|
+
...schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}
|
|
2504
|
+
});
|
|
2486
2505
|
}));
|
|
2487
2506
|
mail.command("run").description("Run a mail operation with JSON input").argument("<operation>", "operation name, e.g. mail.list").option("--input <path>", "JSON input file, or - for stdin").option("--input-json <json>", "inline JSON input object").action(action(async (ctx, operation, options) => {
|
|
2488
2507
|
await executeAndPrint(ctx, String(operation), await inputFrom(options));
|