weaver-work-cli 0.1.1 → 0.1.4
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/README.md +187 -76
- package/dist/cmd/setup/index.js +5 -5
- package/dist/cmd/skills/index.js +1 -1
- package/dist/core/hooks.js +7 -0
- package/dist/index.js +0 -0
- package/dist/internal/e10/auth/commands.js +160 -55
- package/dist/internal/e10/auth/crypto.js +7 -22
- package/dist/internal/e10/auth/session.js +1 -1
- package/dist/internal/e10/auth/xiaoe.js +268 -0
- package/dist/internal/e10/context.js +16 -2
- package/dist/internal/e10/index.js +1 -0
- package/dist/internal/e10/request-runtime.js +344 -0
- package/dist/internal/skills/install.js +48 -6
- package/dist/internal/skills/reader.js +27 -0
- package/dist/shortcuts/archive/continuation.js +70 -0
- package/dist/shortcuts/archive/errors.js +53 -0
- package/dist/shortcuts/archive/host.js +197 -0
- package/dist/shortcuts/archive/index.js +363 -0
- package/dist/shortcuts/archive/manifest.js +45 -0
- package/dist/shortcuts/archive/operations/archive-info.js +55 -0
- package/dist/shortcuts/archive/operations/borrow-car.js +146 -0
- package/dist/shortcuts/archive/operations/borrow-list.js +200 -0
- package/dist/shortcuts/archive/operations/confirm.js +46 -0
- package/dist/shortcuts/archive/operations/download.js +238 -0
- package/dist/shortcuts/archive/operations/flow-url.js +240 -0
- package/dist/shortcuts/archive/operations/fonds.js +95 -0
- package/dist/shortcuts/archive/operations/getPageUrl.js +137 -0
- package/dist/shortcuts/archive/operations/registry.js +43 -0
- package/dist/shortcuts/archive/operations/search.js +88 -0
- package/dist/shortcuts/archive/operations/shared.js +120 -0
- package/dist/shortcuts/archive/operations/types.js +23 -0
- package/dist/shortcuts/archive/operations/upload.js +182 -0
- package/dist/shortcuts/archive/operations.js +13 -0
- package/dist/shortcuts/archive/render/search-format.js +276 -0
- package/dist/shortcuts/archive/render/search-view.js +125 -0
- package/dist/shortcuts/asset/continuation.js +70 -0
- package/dist/shortcuts/asset/errors.js +67 -0
- package/dist/shortcuts/asset/host.js +438 -0
- package/dist/shortcuts/asset/index.js +255 -0
- package/dist/shortcuts/asset/manifest.js +471 -0
- package/dist/shortcuts/asset/operations/query.js +249 -0
- package/dist/shortcuts/asset/operations/registry.js +85 -0
- package/dist/shortcuts/asset/operations/shared.js +100 -0
- package/dist/shortcuts/asset/operations/type-cache.js +49 -0
- package/dist/shortcuts/asset/operations/types.js +1 -0
- package/dist/shortcuts/asset/operations/viewlink.js +117 -0
- package/dist/shortcuts/asset/operations/write.js +435 -0
- package/dist/shortcuts/asset/operations.js +9 -0
- package/dist/shortcuts/calendar/continuation.js +70 -0
- package/dist/shortcuts/calendar/errors.js +53 -0
- package/dist/shortcuts/calendar/host.js +148 -0
- package/dist/shortcuts/calendar/index.js +125 -0
- package/dist/shortcuts/calendar/manifest.js +26 -0
- package/dist/shortcuts/calendar/operations/read.js +259 -0
- package/dist/shortcuts/calendar/operations/registry.js +31 -0
- package/dist/shortcuts/calendar/operations/shared.js +132 -0
- package/dist/shortcuts/calendar/operations/types.js +25 -0
- package/dist/shortcuts/calendar/operations/write.js +439 -0
- package/dist/shortcuts/calendar/operations.js +8 -0
- package/dist/shortcuts/ehr/continuation.js +70 -0
- package/dist/shortcuts/ehr/errors.js +53 -0
- package/dist/shortcuts/ehr/host.js +213 -0
- package/dist/shortcuts/ehr/index.js +205 -0
- package/dist/shortcuts/ehr/manifest.js +47 -0
- package/dist/shortcuts/ehr/operations/attend-read.js +373 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +514 -0
- package/dist/shortcuts/ehr/operations/hr-contact.js +363 -0
- package/dist/shortcuts/ehr/operations/hr-ds.js +298 -0
- package/dist/shortcuts/ehr/operations/hr-report.js +386 -0
- package/dist/shortcuts/ehr/operations/recruit-write.js +1629 -0
- package/dist/shortcuts/ehr/operations/recruit.js +803 -0
- package/dist/shortcuts/ehr/operations/registry.js +43 -0
- package/dist/shortcuts/ehr/operations/salary.js +319 -0
- package/dist/shortcuts/ehr/operations/shared.js +246 -0
- package/dist/shortcuts/ehr/operations/types.js +25 -0
- package/dist/shortcuts/ehr/operations.js +25 -0
- package/dist/shortcuts/esb/continuation.js +70 -0
- package/dist/shortcuts/esb/errors.js +65 -0
- package/dist/shortcuts/esb/host.js +187 -0
- package/dist/shortcuts/esb/index.js +112 -0
- package/dist/shortcuts/esb/manifest.js +91 -0
- package/dist/shortcuts/esb/operations/input-format.js +31 -0
- package/dist/shortcuts/esb/operations/registry.js +48 -0
- package/dist/shortcuts/esb/operations/shared.js +152 -0
- package/dist/shortcuts/esb/operations/trigger.js +76 -0
- package/dist/shortcuts/esb/operations/types.js +21 -0
- package/dist/shortcuts/esb/operations.js +15 -0
- package/dist/shortcuts/fna/continuation.js +70 -0
- package/dist/shortcuts/fna/errors.js +59 -0
- package/dist/shortcuts/fna/host.js +146 -0
- package/dist/shortcuts/fna/index.js +111 -0
- package/dist/shortcuts/fna/manifest.js +41 -0
- package/dist/shortcuts/fna/operations/budget.js +124 -0
- package/dist/shortcuts/fna/operations/expense-center.js +148 -0
- package/dist/shortcuts/fna/operations/invoice-writeoff.js +212 -0
- package/dist/shortcuts/fna/operations/loan.js +195 -0
- package/dist/shortcuts/fna/operations/registry.js +35 -0
- package/dist/shortcuts/fna/operations/shared.js +210 -0
- package/dist/shortcuts/fna/operations/types.js +25 -0
- package/dist/shortcuts/fna/operations.js +19 -0
- package/dist/shortcuts/hrm/errors.js +38 -0
- package/dist/shortcuts/hrm/host.js +156 -0
- package/dist/shortcuts/hrm/index.js +111 -0
- package/dist/shortcuts/hrm/manifest.js +32 -0
- package/dist/shortcuts/hrm/operations/employee.js +338 -0
- package/dist/shortcuts/hrm/operations/org.js +110 -0
- package/dist/shortcuts/hrm/operations/position.js +176 -0
- package/dist/shortcuts/hrm/operations/registry.js +33 -0
- package/dist/shortcuts/hrm/operations/shared.js +143 -0
- package/dist/shortcuts/hrm/operations/types.js +23 -0
- package/dist/shortcuts/hrm/operations.js +19 -0
- package/dist/shortcuts/index.js +20 -0
- package/dist/shortcuts/invoice/host.js +99 -94
- package/dist/shortcuts/invoice/index.js +65 -61
- package/dist/shortcuts/invoice/manifest.js +222 -14
- package/dist/shortcuts/invoice/operations/browse-field.js +17 -0
- package/dist/shortcuts/invoice/operations/issuing.js +198 -0
- package/dist/shortcuts/invoice/operations/ocr-preview.js +6 -3
- package/dist/shortcuts/invoice/operations/registry.js +17 -0
- package/dist/shortcuts/invoice/operations/reim.js +401 -0
- package/dist/shortcuts/invoice/operations/shared.js +271 -6
- package/dist/shortcuts/invoice/operations/validate-preview.js +1 -1
- package/dist/shortcuts/jiuchuanhui/cache.js +441 -0
- package/dist/shortcuts/jiuchuanhui/continuation.js +70 -0
- package/dist/shortcuts/jiuchuanhui/errors.js +59 -0
- package/dist/shortcuts/jiuchuanhui/host.js +159 -0
- package/dist/shortcuts/jiuchuanhui/index.js +109 -0
- package/dist/shortcuts/jiuchuanhui/manifest.js +469 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +214 -0
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +157 -0
- package/dist/shortcuts/jiuchuanhui/operations/generic.js +146 -0
- package/dist/shortcuts/jiuchuanhui/operations/registry.js +133 -0
- package/dist/shortcuts/jiuchuanhui/operations/shared.js +158 -0
- package/dist/shortcuts/jiuchuanhui/operations/types.js +1 -0
- package/dist/shortcuts/jiuchuanhui/operations.js +8 -0
- package/dist/shortcuts/mail/continuation.js +70 -0
- package/dist/shortcuts/mail/errors.js +53 -0
- package/dist/shortcuts/mail/host.js +182 -0
- package/dist/shortcuts/mail/index.js +519 -0
- package/dist/shortcuts/mail/manifest.js +38 -0
- package/dist/shortcuts/mail/operations/mail-blacklist.js +79 -0
- package/dist/shortcuts/mail/operations/mail-contacts.js +195 -0
- package/dist/shortcuts/mail/operations/mail-manage.js +335 -0
- package/dist/shortcuts/mail/operations/mail-read.js +508 -0
- package/dist/shortcuts/mail/operations/mail-send.js +474 -0
- package/dist/shortcuts/mail/operations/mail-sign.js +203 -0
- package/dist/shortcuts/mail/operations/mail-template.js +170 -0
- package/dist/shortcuts/mail/operations/registry.js +41 -0
- package/dist/shortcuts/mail/operations/shared.js +64 -0
- package/dist/shortcuts/mail/operations/types.js +27 -0
- package/dist/shortcuts/mail/operations.js +19 -0
- package/dist/shortcuts/plan/continuation.js +70 -0
- package/dist/shortcuts/plan/errors.js +70 -0
- package/dist/shortcuts/plan/host.js +180 -0
- package/dist/shortcuts/plan/index.js +150 -0
- package/dist/shortcuts/plan/manifest.js +53 -0
- package/dist/shortcuts/plan/operations/link.js +256 -0
- package/dist/shortcuts/plan/operations/read.js +259 -0
- package/dist/shortcuts/plan/operations/registry.js +33 -0
- package/dist/shortcuts/plan/operations/shared.js +246 -0
- package/dist/shortcuts/plan/operations/types.js +49 -0
- package/dist/shortcuts/plan/operations/version.js +49 -0
- package/dist/shortcuts/plan/operations/write.js +710 -0
- package/dist/shortcuts/plan/operations.js +8 -0
- package/docs/SKILL.md +11 -7
- package/docs/_catalog.md +23 -5
- package/docs/agent-invoice.md +31 -10
- package/docs/agent-skill-install.md +211 -0
- package/docs/calendar.md +87 -0
- package/docs/e10-auth.md +28 -9
- package/docs/ehr.md +186 -0
- package/docs/esb.md +64 -0
- package/docs/fna.md +72 -0
- package/docs/hrm.md +89 -0
- package/docs/invoice.md +66 -20
- package/docs/jiuchuanhui.md +131 -0
- package/docs/operation-manual.md +443 -0
- package/docs/plan.md +82 -0
- package/docs/wenshuding.md +129 -0
- package/docs/ziguanjia.md +89 -0
- package/package.json +4 -4
- package/scripts/package-skill.mjs +127 -34
- package/scripts/postbuild.mjs +13 -0
- package/skill-template/business-info.json +13 -2
- package/skill-template/domains/calendar.md +15 -0
- package/skill-template/domains/esb.md +13 -0
- package/skill-template/domains/hrm.md +16 -0
- package/skill-template/domains/jiuchuanhui.md +23 -0
- package/skill-template/domains/jucailin.md +22 -0
- package/skill-template/domains/mail.md +21 -0
- package/skill-template/domains/plan.md +17 -0
- package/skill-template/domains/qiyecheng.md +17 -0
- package/skill-template/domains/shared.md +9 -3
- package/skill-template/domains/skill-maker.md +10 -0
- package/skill-template/domains/wenshuding.md +22 -0
- package/skill-template/domains/{invoice.md → yepiaotong.md} +4 -0
- package/skill-template/domains/ziguanjia.md +21 -0
- package/skill-template/master-skill-template.md +12 -6
- package/skill-template/skill-template.md +40 -9
- package/skills/weaver-e10-calendar/SKILL.md +101 -0
- package/skills/weaver-e10-calendar/product.json +8 -0
- package/skills/weaver-e10-calendar/references/calendar-app-check.md +65 -0
- package/skills/weaver-e10-calendar/references/calendar-dict.md +55 -0
- package/skills/weaver-e10-calendar/references/calendar-query.md +70 -0
- package/skills/weaver-e10-calendar/references/calendar-write.md +97 -0
- package/skills/weaver-e10-calendar/references/source-manifest.json +54 -0
- package/skills/weaver-e10-esb/SKILL.md +102 -0
- package/skills/weaver-e10-esb/product.json +8 -0
- package/skills/weaver-e10-esb/references/input-format.md +52 -0
- package/skills/weaver-e10-esb/references/source-manifest.json +242 -0
- package/skills/weaver-e10-esb/references/trigger.md +99 -0
- package/skills/weaver-e10-hrm/SKILL.md +87 -0
- package/skills/weaver-e10-hrm/product.json +8 -0
- package/skills/weaver-e10-hrm/references/employee.md +109 -0
- package/skills/weaver-e10-hrm/references/org.md +95 -0
- package/skills/weaver-e10-hrm/references/position.md +95 -0
- package/skills/weaver-e10-hrm/references/source-manifest.json +121 -0
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +174 -0
- package/skills/weaver-e10-jiuchuanhui/product.json +8 -0
- package/skills/weaver-e10-jiuchuanhui/references/cache.md +110 -0
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +61 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-plan.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-records.md +48 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +69 -0
- package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +24 -0
- package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +59 -0
- package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +72 -0
- package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +2632 -0
- package/skills/weaver-e10-jucailin/SKILL.md +101 -0
- package/skills/weaver-e10-jucailin/product.json +8 -0
- package/skills/weaver-e10-jucailin/references/attend-read.md +73 -0
- package/skills/weaver-e10-jucailin/references/attend-write.md +82 -0
- package/skills/weaver-e10-jucailin/references/hr-contact.md +92 -0
- package/skills/weaver-e10-jucailin/references/hr-datasource.md +104 -0
- package/skills/weaver-e10-jucailin/references/hr-report.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-read.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +70 -0
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +35 -0
- package/skills/weaver-e10-jucailin/references/salary.md +110 -0
- package/skills/weaver-e10-jucailin/references/source-manifest.json +152 -0
- package/skills/weaver-e10-mail/SKILL.md +151 -0
- package/skills/weaver-e10-mail/product.json +8 -0
- package/skills/weaver-e10-mail/references/mail-agent-entry.md +47 -0
- package/skills/weaver-e10-mail/references/mail-attachment.md +30 -0
- package/skills/weaver-e10-mail/references/mail-blacklist.md +27 -0
- package/skills/weaver-e10-mail/references/mail-contacts.md +33 -0
- package/skills/weaver-e10-mail/references/mail-manage.md +44 -0
- package/skills/weaver-e10-mail/references/mail-read.md +76 -0
- package/skills/weaver-e10-mail/references/mail-send.md +43 -0
- package/skills/weaver-e10-mail/references/mail-sign.md +33 -0
- package/skills/weaver-e10-mail/references/mail-template.md +31 -0
- package/skills/weaver-e10-mail/references/safety-boundaries.md +32 -0
- package/skills/weaver-e10-plan/SKILL.md +139 -0
- package/skills/weaver-e10-plan/product.json +8 -0
- package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +123 -0
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +138 -0
- package/skills/weaver-e10-plan/references/plan-report-query.md +154 -0
- package/skills/weaver-e10-plan/references/plan-report-remind.md +104 -0
- package/skills/weaver-e10-plan/references/plan-report-write.md +162 -0
- package/skills/weaver-e10-plan/references/source-manifest.json +858 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +118 -0
- package/skills/weaver-e10-qiyecheng/product.json +8 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +65 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +56 -0
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +51 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +57 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +59 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +698 -0
- package/skills/weaver-e10-shared/SKILL.md +86 -0
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +127 -0
- package/skills/weaver-e10-shared/references/json-output-contract.md +120 -0
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +110 -0
- package/skills/weaver-e10-skill-maker/SKILL.md +77 -0
- package/skills/weaver-e10-skill-maker/product.json +8 -0
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +124 -0
- package/skills/weaver-e10-skill-maker/references/detector-validation.md +101 -0
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +230 -0
- package/skills/weaver-e10-skill-maker/references/post-generation-install.md +105 -0
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +261 -0
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +141 -0
- package/skills/weaver-e10-wenshuding/SKILL.md +157 -0
- package/skills/weaver-e10-wenshuding/product.json +8 -0
- package/skills/weaver-e10-wenshuding/references/archive-agent-entry.md +63 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-car.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-wenshuding/references/archive-download.md +48 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +46 -0
- package/skills/weaver-e10-wenshuding/references/archive-fonds.md +34 -0
- package/skills/weaver-e10-wenshuding/references/archive-info.md +33 -0
- package/skills/weaver-e10-wenshuding/references/archive-search.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-upload.md +41 -0
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +517 -0
- package/skills/weaver-e10-yepiaotong/SKILL.md +184 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-add.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +47 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +204 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-delete.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-detail.md +13 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +28 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-download.md +31 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +45 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-file-upload.md +15 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +45 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +120 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-field-rules.md +161 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +99 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-ocr-preview.md +14 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +58 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-red.md +261 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +97 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-update.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-validation-preview.md +10 -3
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1340 -0
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +845 -0
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +94 -0
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +449 -0
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +266 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +494 -0
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1103 -0
- package/skills/weaver-e10-ziguanjia/SKILL.md +162 -0
- package/skills/weaver-e10-ziguanjia/product.json +8 -0
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +147 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +65 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-create.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-depre.md +48 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-purch.md +57 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-query.md +62 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-repair.md +83 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-resolve.md +49 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-return.md +70 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-update.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-use.md +60 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-viewlink.md +81 -0
- package/skills/weaver-work-cli-invoice/SKILL.md +0 -103
- package/skills/weaver-work-cli-invoice/references/invoice-agent-entry.md +0 -38
- package/skills/weaver-work-cli-invoice/references/invoice-disabled-capabilities.md +0 -26
- package/skills/weaver-work-cli-invoice/references/invoice-download.md +0 -22
- package/skills/weaver-work-cli-invoice/references/invoice-enterprise-list.md +0 -35
- package/skills/weaver-work-cli-invoice/references/invoice-import.md +0 -28
- package/skills/weaver-work-cli-invoice/references/invoice-personal-list.md +0 -47
- package/skills/weaver-work-cli-shared/SKILL.md +0 -53
- package/skills/weaver-work-cli-shared/references/e10-auth-and-session.md +0 -83
- package/skills/weaver-work-cli-shared/references/json-output-contract.md +0 -61
- package/skills/weaver-work-cli-shared/references/weaver-work-cli-installation.md +0 -61
- /package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/high-risk-write.md +0 -0
- /package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/product.json +0 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { READ, SCHEMA_DATE, SCHEMA_ID, SCHEMA_ID_LIST, SCHEMA_STRING_LIST, ehrSuccess, schemaOf, } from './types.js';
|
|
2
|
+
import { ehrValidationError } from '../errors.js';
|
|
3
|
+
import { compact, normalizePaged, pickDefined, requireDateRange, toIdList, toNumber, toPageQuery, } from './shared.js';
|
|
4
|
+
const ATTEND_STATUS = [
|
|
5
|
+
'SIGN_IN_LATE',
|
|
6
|
+
'SIGN_OUT_EARLY',
|
|
7
|
+
'SIGN_IN_ABSENTEEISM',
|
|
8
|
+
'SIGN_OUT_ABSENTEEISM',
|
|
9
|
+
'ABSENTEEISM',
|
|
10
|
+
'LOST',
|
|
11
|
+
];
|
|
12
|
+
const attendPageSchema = {
|
|
13
|
+
current: SCHEMA_ID,
|
|
14
|
+
pageSize: SCHEMA_ID,
|
|
15
|
+
};
|
|
16
|
+
const attendSummaryGet = {
|
|
17
|
+
name: 'ehr.attend.summary.get',
|
|
18
|
+
resource: 'attend',
|
|
19
|
+
method: 'summary.get',
|
|
20
|
+
action: 'ehr.attend.summary.get',
|
|
21
|
+
summary: '查询指定时间范围内的出勤情况统计:出勤统计、出勤汇总、请假信息、外勤、假期余额',
|
|
22
|
+
capability: 'attend',
|
|
23
|
+
risk: READ,
|
|
24
|
+
inputSchema: schemaOf({
|
|
25
|
+
beginDate: SCHEMA_DATE,
|
|
26
|
+
endDate: SCHEMA_DATE,
|
|
27
|
+
userId: SCHEMA_ID,
|
|
28
|
+
type: { type: 'string' },
|
|
29
|
+
date: SCHEMA_DATE,
|
|
30
|
+
missingCardType: { type: 'string', enum: ['all', 'leaveReturn', 'outCard'], default: 'all' },
|
|
31
|
+
signType: { type: 'string' },
|
|
32
|
+
containOcheck: { type: 'boolean' },
|
|
33
|
+
onlyMine: { type: 'boolean' },
|
|
34
|
+
empIds: SCHEMA_ID_LIST,
|
|
35
|
+
...attendPageSchema,
|
|
36
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
37
|
+
handler: async (args, { host }) => {
|
|
38
|
+
const body = {
|
|
39
|
+
...requireDateRange(args),
|
|
40
|
+
...toPageQuery(args),
|
|
41
|
+
...pickDefined(args, ['type', 'date', 'missingCardType', 'signType', 'containOcheck', 'onlyMine']),
|
|
42
|
+
empIds: toIdList(args.empIds, 'empIds'),
|
|
43
|
+
};
|
|
44
|
+
if (args.userId !== undefined)
|
|
45
|
+
body.userId = Number(args.userId);
|
|
46
|
+
const response = await host.request({
|
|
47
|
+
method: 'POST',
|
|
48
|
+
path: '/api/attend/web/attendInfoV2/getAttendInfoStatis',
|
|
49
|
+
body: compact(body),
|
|
50
|
+
});
|
|
51
|
+
return ehrSuccess('ehr.attend.summary.get', normalizePaged(response).data);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const attendAbnormalList = {
|
|
55
|
+
name: 'ehr.attend.abnormal.list',
|
|
56
|
+
resource: 'attend',
|
|
57
|
+
method: 'abnormal.list',
|
|
58
|
+
action: 'ehr.attend.abnormal.list',
|
|
59
|
+
summary: '查询指定时间范围内的异常考勤明细:迟到、早退、缺卡、缺勤、失联等',
|
|
60
|
+
capability: 'attend',
|
|
61
|
+
risk: READ,
|
|
62
|
+
inputSchema: schemaOf({
|
|
63
|
+
beginDate: SCHEMA_DATE,
|
|
64
|
+
endDate: SCHEMA_DATE,
|
|
65
|
+
attendStatus: { type: 'array', items: { type: 'string', enum: [...ATTEND_STATUS] } },
|
|
66
|
+
employeeRange: { type: 'array', items: { type: 'string', enum: ['MINE', 'DIRECT_SURBODINATE', 'OTHER_SURBODINATE'] } },
|
|
67
|
+
employeeType: SCHEMA_STRING_LIST,
|
|
68
|
+
processResult: SCHEMA_STRING_LIST,
|
|
69
|
+
hrmStatus: SCHEMA_STRING_LIST,
|
|
70
|
+
keyword: { type: 'string' },
|
|
71
|
+
departments: SCHEMA_ID_LIST,
|
|
72
|
+
resourceids: SCHEMA_ID_LIST,
|
|
73
|
+
...attendPageSchema,
|
|
74
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
75
|
+
handler: async (args, { host }) => {
|
|
76
|
+
const body = {
|
|
77
|
+
...requireDateRange(args),
|
|
78
|
+
...toPageQuery(args),
|
|
79
|
+
...pickDefined(args, ['attendStatus', 'employeeRange', 'employeeType', 'processResult', 'hrmStatus', 'keyword']),
|
|
80
|
+
departments: toIdList(args.departments, 'departments'),
|
|
81
|
+
resourceids: toIdList(args.resourceids, 'resourceids'),
|
|
82
|
+
};
|
|
83
|
+
const response = await host.request({
|
|
84
|
+
method: 'POST',
|
|
85
|
+
path: '/api/attend/web/abnormal/getAbnormalList',
|
|
86
|
+
body: compact(body),
|
|
87
|
+
});
|
|
88
|
+
const { data, page } = normalizePaged(response);
|
|
89
|
+
return ehrSuccess('ehr.attend.abnormal.list', data, { page });
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
const attendReportGet = {
|
|
93
|
+
name: 'ehr.attend.report.get',
|
|
94
|
+
resource: 'attend',
|
|
95
|
+
method: 'report.get',
|
|
96
|
+
action: 'ehr.attend.report.get',
|
|
97
|
+
summary: '查询出勤汇总报表:工作时长、加班(工作日/周末/节假日)、迟到早退、缺勤、调休;返回 recalcPermission',
|
|
98
|
+
capability: 'attend',
|
|
99
|
+
risk: READ,
|
|
100
|
+
inputSchema: schemaOf({
|
|
101
|
+
beginDate: SCHEMA_DATE,
|
|
102
|
+
endDate: SCHEMA_DATE,
|
|
103
|
+
unit: { type: 'string', enum: ['day', 'hour'] },
|
|
104
|
+
keyword: { type: 'string' },
|
|
105
|
+
accountType: { type: 'string', enum: ['0', '1', '2'], description: '0 全部,1 主身份,2 次身份' },
|
|
106
|
+
searchAndOr: { type: 'string', enum: ['OR', 'AND'] },
|
|
107
|
+
containOcheck: { type: 'boolean' },
|
|
108
|
+
rules: SCHEMA_ID_LIST,
|
|
109
|
+
onlyEmpIds: SCHEMA_ID_LIST,
|
|
110
|
+
hrmStatus: SCHEMA_STRING_LIST,
|
|
111
|
+
...attendPageSchema,
|
|
112
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
113
|
+
handler: async (args, { host }) => {
|
|
114
|
+
const body = {
|
|
115
|
+
...requireDateRange(args),
|
|
116
|
+
...toPageQuery(args),
|
|
117
|
+
...pickDefined(args, ['unit', 'keyword', 'accountType', 'searchAndOr', 'containOcheck', 'hrmStatus']),
|
|
118
|
+
rules: toIdList(args.rules, 'rules'),
|
|
119
|
+
onlyEmpIds: toIdList(args.onlyEmpIds, 'onlyEmpIds'),
|
|
120
|
+
};
|
|
121
|
+
const response = await host.request({
|
|
122
|
+
method: 'POST',
|
|
123
|
+
path: '/api/attend/web/attendWorkTimeSummaryReport/getAttendWorkTimeSummaryReport',
|
|
124
|
+
body: compact(body),
|
|
125
|
+
});
|
|
126
|
+
const { data, page } = normalizePaged(response);
|
|
127
|
+
return ehrSuccess('ehr.attend.report.get', data, { page });
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
const attendWorktimeList = {
|
|
131
|
+
name: 'ehr.attend.worktime.list',
|
|
132
|
+
resource: 'attend',
|
|
133
|
+
method: 'worktime.list',
|
|
134
|
+
action: 'ehr.attend.worktime.list',
|
|
135
|
+
summary: '查询工作时长报表:应出勤天数、实际工作时长、加班时长等',
|
|
136
|
+
capability: 'attend',
|
|
137
|
+
risk: READ,
|
|
138
|
+
inputSchema: schemaOf({
|
|
139
|
+
beginDate: SCHEMA_DATE,
|
|
140
|
+
endDate: SCHEMA_DATE,
|
|
141
|
+
keyword: { type: 'string' },
|
|
142
|
+
unit: { type: 'string' },
|
|
143
|
+
employeeRange: SCHEMA_STRING_LIST,
|
|
144
|
+
hrmStatus: SCHEMA_STRING_LIST,
|
|
145
|
+
departments: SCHEMA_ID_LIST,
|
|
146
|
+
resourceids: SCHEMA_ID_LIST,
|
|
147
|
+
...attendPageSchema,
|
|
148
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
149
|
+
handler: async (args, { host }) => {
|
|
150
|
+
const body = {
|
|
151
|
+
...requireDateRange(args),
|
|
152
|
+
...toPageQuery(args),
|
|
153
|
+
...pickDefined(args, ['keyword', 'unit', 'employeeRange', 'hrmStatus']),
|
|
154
|
+
departments: toIdList(args.departments, 'departments'),
|
|
155
|
+
resourceids: toIdList(args.resourceids, 'resourceids'),
|
|
156
|
+
};
|
|
157
|
+
const response = await host.request({
|
|
158
|
+
method: 'POST',
|
|
159
|
+
path: '/api/attend/web/worktime/getWorktimeList',
|
|
160
|
+
body: compact(body),
|
|
161
|
+
});
|
|
162
|
+
const { data, page } = normalizePaged(response);
|
|
163
|
+
return ehrSuccess('ehr.attend.worktime.list', data, { page });
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
const attendSignrecordList = {
|
|
167
|
+
name: 'ehr.attend.signrecord.list',
|
|
168
|
+
resource: 'attend',
|
|
169
|
+
method: 'signrecord.list',
|
|
170
|
+
action: 'ehr.attend.signrecord.list',
|
|
171
|
+
summary: '查询原始打卡记录:打卡时间、打卡方式(GPS/WiFi/蓝牙)、打卡地点',
|
|
172
|
+
capability: 'attend',
|
|
173
|
+
risk: READ,
|
|
174
|
+
inputSchema: schemaOf({
|
|
175
|
+
beginDate: SCHEMA_DATE,
|
|
176
|
+
endDate: SCHEMA_DATE,
|
|
177
|
+
keyword: { type: 'string' },
|
|
178
|
+
employeeRange: SCHEMA_STRING_LIST,
|
|
179
|
+
departments: SCHEMA_ID_LIST,
|
|
180
|
+
resourceids: SCHEMA_ID_LIST,
|
|
181
|
+
...attendPageSchema,
|
|
182
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
183
|
+
handler: async (args, { host }) => {
|
|
184
|
+
const body = {
|
|
185
|
+
...requireDateRange(args),
|
|
186
|
+
...toPageQuery(args),
|
|
187
|
+
...pickDefined(args, ['keyword', 'employeeRange']),
|
|
188
|
+
departments: toIdList(args.departments, 'departments'),
|
|
189
|
+
resourceids: toIdList(args.resourceids, 'resourceids'),
|
|
190
|
+
};
|
|
191
|
+
const response = await host.request({
|
|
192
|
+
method: 'POST',
|
|
193
|
+
path: '/api/attend/web/signRecord/getSignRecordList',
|
|
194
|
+
body: compact(body),
|
|
195
|
+
});
|
|
196
|
+
const { data, page } = normalizePaged(response);
|
|
197
|
+
return ehrSuccess('ehr.attend.signrecord.list', data, { page });
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
const attendOrbitList = {
|
|
201
|
+
name: 'ehr.attend.orbit.list',
|
|
202
|
+
resource: 'attend',
|
|
203
|
+
method: 'orbit.list',
|
|
204
|
+
action: 'ehr.attend.orbit.list',
|
|
205
|
+
summary: '查询外勤轨迹记录:外勤打卡地点、签到签退时间、签到距离',
|
|
206
|
+
capability: 'attend',
|
|
207
|
+
risk: READ,
|
|
208
|
+
inputSchema: schemaOf({
|
|
209
|
+
beginDate: SCHEMA_DATE,
|
|
210
|
+
endDate: SCHEMA_DATE,
|
|
211
|
+
employeeRange: SCHEMA_STRING_LIST,
|
|
212
|
+
hrmStatus: SCHEMA_STRING_LIST,
|
|
213
|
+
departments: SCHEMA_ID_LIST,
|
|
214
|
+
resourceids: SCHEMA_ID_LIST,
|
|
215
|
+
...attendPageSchema,
|
|
216
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
217
|
+
handler: async (args, { host }) => {
|
|
218
|
+
const body = {
|
|
219
|
+
...requireDateRange(args),
|
|
220
|
+
...toPageQuery(args),
|
|
221
|
+
...pickDefined(args, ['employeeRange', 'hrmStatus']),
|
|
222
|
+
departments: toIdList(args.departments, 'departments'),
|
|
223
|
+
resourceids: toIdList(args.resourceids, 'resourceids'),
|
|
224
|
+
};
|
|
225
|
+
const response = await host.request({
|
|
226
|
+
method: 'POST',
|
|
227
|
+
path: '/api/attend/web/orbit/queryOcheckList',
|
|
228
|
+
body: compact(body),
|
|
229
|
+
});
|
|
230
|
+
const { data, page } = normalizePaged(response);
|
|
231
|
+
return ehrSuccess('ehr.attend.orbit.list', data, { page });
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
const attendLeaveReport = {
|
|
235
|
+
name: 'ehr.attend.leave.report',
|
|
236
|
+
resource: 'attend',
|
|
237
|
+
method: 'leave.report',
|
|
238
|
+
action: 'ehr.attend.leave.report',
|
|
239
|
+
summary: '查询假期统计报表:各类假期使用量与剩余额度,支持按部门、人员、年份筛选',
|
|
240
|
+
capability: 'attend',
|
|
241
|
+
risk: READ,
|
|
242
|
+
inputSchema: schemaOf({
|
|
243
|
+
beginDate: SCHEMA_DATE,
|
|
244
|
+
endDate: SCHEMA_DATE,
|
|
245
|
+
keyword: { type: 'string' },
|
|
246
|
+
year: { type: 'integer', minimum: 1000, maximum: 9999 },
|
|
247
|
+
employeeRange: SCHEMA_STRING_LIST,
|
|
248
|
+
departments: SCHEMA_ID_LIST,
|
|
249
|
+
resourceids: SCHEMA_ID_LIST,
|
|
250
|
+
...attendPageSchema,
|
|
251
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
252
|
+
handler: async (args, { host }) => {
|
|
253
|
+
const body = {
|
|
254
|
+
...requireDateRange(args),
|
|
255
|
+
...toPageQuery(args),
|
|
256
|
+
...pickDefined(args, ['keyword', 'employeeRange']),
|
|
257
|
+
departments: toIdList(args.departments, 'departments'),
|
|
258
|
+
resourceids: toIdList(args.resourceids, 'resourceids'),
|
|
259
|
+
};
|
|
260
|
+
if (args.year !== undefined)
|
|
261
|
+
body.year = toNumber(args.year, 'year');
|
|
262
|
+
const response = await host.request({
|
|
263
|
+
method: 'POST',
|
|
264
|
+
path: '/api/attend/web/leavestatis/getReportList',
|
|
265
|
+
body: compact(body),
|
|
266
|
+
});
|
|
267
|
+
const { data, page } = normalizePaged(response);
|
|
268
|
+
return ehrSuccess('ehr.attend.leave.report', data, { page });
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
const attendAppealFormid = {
|
|
272
|
+
name: 'ehr.attend.appeal.formid',
|
|
273
|
+
resource: 'attend',
|
|
274
|
+
method: 'appeal.formid',
|
|
275
|
+
action: 'ehr.attend.appeal.formid',
|
|
276
|
+
summary: '获取发起申诉所需的表单 ID 与可申诉状态;创建申诉前必须先调用,stillShowAppeal=false 时不得继续',
|
|
277
|
+
capability: 'attend',
|
|
278
|
+
risk: READ,
|
|
279
|
+
inputSchema: schemaOf({ userId: { oneOf: [{ type: 'integer', minimum: 1 }, { type: 'string', minLength: 1 }] } }, { required: ['userId'] }),
|
|
280
|
+
handler: async (args, { host }) => {
|
|
281
|
+
if (args.userId === undefined || args.userId === null || args.userId === '') {
|
|
282
|
+
throw new Error('userId 必填');
|
|
283
|
+
}
|
|
284
|
+
if (!/^\d+$/.test(String(args.userId))) {
|
|
285
|
+
throw ehrValidationError('user_id_invalid', 'userId 必须是人员 ID');
|
|
286
|
+
}
|
|
287
|
+
const response = await host.request({
|
|
288
|
+
method: 'GET',
|
|
289
|
+
path: '/api/attend/web/attendinfo/getAppealformId',
|
|
290
|
+
query: { userId: String(args.userId) },
|
|
291
|
+
});
|
|
292
|
+
return ehrSuccess('ehr.attend.appeal.formid', normalizePaged(response).data);
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
const attendAppealCalendar = {
|
|
296
|
+
name: 'ehr.attend.appeal.calendar',
|
|
297
|
+
resource: 'attend',
|
|
298
|
+
method: 'appeal.calendar',
|
|
299
|
+
action: 'ehr.attend.appeal.calendar',
|
|
300
|
+
summary: '获取某一天的考勤日历详情,供申诉取 periodId/timecardId/attendStatus 等参数',
|
|
301
|
+
capability: 'attend',
|
|
302
|
+
risk: READ,
|
|
303
|
+
inputSchema: schemaOf({
|
|
304
|
+
date: SCHEMA_DATE,
|
|
305
|
+
beginDate: SCHEMA_DATE,
|
|
306
|
+
endDate: SCHEMA_DATE,
|
|
307
|
+
employeeRange: SCHEMA_STRING_LIST,
|
|
308
|
+
empIds: SCHEMA_ID_LIST,
|
|
309
|
+
...attendPageSchema,
|
|
310
|
+
}, { required: ['date'] }),
|
|
311
|
+
handler: async (args, { host }) => {
|
|
312
|
+
const body = {
|
|
313
|
+
date: args.date,
|
|
314
|
+
...toPageQuery(args),
|
|
315
|
+
...pickDefined(args, ['beginDate', 'endDate', 'employeeRange']),
|
|
316
|
+
empIds: toIdList(args.empIds, 'empIds'),
|
|
317
|
+
};
|
|
318
|
+
const response = await host.request({
|
|
319
|
+
method: 'POST',
|
|
320
|
+
path: '/api/attend/web/attendInfoV2/getCalendarDetailByDate',
|
|
321
|
+
body: compact(body),
|
|
322
|
+
});
|
|
323
|
+
return ehrSuccess('ehr.attend.appeal.calendar', normalizePaged(response).data);
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
const attendAppealList = {
|
|
327
|
+
name: 'ehr.attend.appeal.list',
|
|
328
|
+
resource: 'attend',
|
|
329
|
+
method: 'appeal.list',
|
|
330
|
+
action: 'ehr.attend.appeal.list',
|
|
331
|
+
summary: '查询申诉记录列表;处理申诉前用它取得申诉记录 ID',
|
|
332
|
+
capability: 'attend',
|
|
333
|
+
risk: READ,
|
|
334
|
+
inputSchema: schemaOf({
|
|
335
|
+
beginDate: SCHEMA_DATE,
|
|
336
|
+
endDate: SCHEMA_DATE,
|
|
337
|
+
keyword: { type: 'string' },
|
|
338
|
+
attendStatus: SCHEMA_STRING_LIST,
|
|
339
|
+
processResult: SCHEMA_STRING_LIST,
|
|
340
|
+
employeeRange: SCHEMA_STRING_LIST,
|
|
341
|
+
departments: SCHEMA_ID_LIST,
|
|
342
|
+
resourceids: SCHEMA_ID_LIST,
|
|
343
|
+
...attendPageSchema,
|
|
344
|
+
}, { required: ['beginDate', 'endDate'] }),
|
|
345
|
+
handler: async (args, { host }) => {
|
|
346
|
+
const body = {
|
|
347
|
+
...requireDateRange(args),
|
|
348
|
+
...toPageQuery(args),
|
|
349
|
+
...pickDefined(args, ['keyword', 'attendStatus', 'processResult', 'employeeRange']),
|
|
350
|
+
departments: toIdList(args.departments, 'departments'),
|
|
351
|
+
resourceids: toIdList(args.resourceids, 'resourceids'),
|
|
352
|
+
};
|
|
353
|
+
const response = await host.request({
|
|
354
|
+
method: 'POST',
|
|
355
|
+
path: '/api/attend/web/appeal/getAppealList',
|
|
356
|
+
body: compact(body),
|
|
357
|
+
});
|
|
358
|
+
const { data, page } = normalizePaged(response);
|
|
359
|
+
return ehrSuccess('ehr.attend.appeal.list', data, { page });
|
|
360
|
+
},
|
|
361
|
+
};
|
|
362
|
+
export const attendReadOperations = [
|
|
363
|
+
attendSummaryGet,
|
|
364
|
+
attendAbnormalList,
|
|
365
|
+
attendReportGet,
|
|
366
|
+
attendWorktimeList,
|
|
367
|
+
attendSignrecordList,
|
|
368
|
+
attendOrbitList,
|
|
369
|
+
attendLeaveReport,
|
|
370
|
+
attendAppealFormid,
|
|
371
|
+
attendAppealCalendar,
|
|
372
|
+
attendAppealList,
|
|
373
|
+
];
|