feat(bill): 引入费控单据与费用明细检索(支持按单号精准查询与 DataLink 字典自动还原)并发布 v0.3.0
🚀 Release / 🚀 Build & Publish Multi-Platform Binaries (push) Has been cancelled
🚀 Release / 🚀 Build & Publish Multi-Platform Binaries (push) Has been cancelled
This commit is contained in:
1 parent
0372698ff9
commit
5cf6c9e014
19 files changed
+1141
-14
No files matched your search
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bun
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import { readFileSync, writeFileSync, existsSync, cpSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { execSync } from "node:child_process";
|
||||
|
||||
@@ -65,7 +65,6 @@ if (existsSync(openapiPath)) {
|
||||
|
||||
// 6. Sync to global ~/.agents/skills/hose-use/ if present
|
||||
const globalSkillDir = join(process.env.HOME || "", ".agents", "skills", "hose-use");
|
||||
const { existsSync, cpSync } = await import("node:fs");
|
||||
if (existsSync(globalSkillDir)) {
|
||||
cpSync(join(ROOT, "skills", "hose-use"), globalSkillDir, { recursive: true });
|
||||
console.log("✓ Synchronized ~/.agents/skills/hose-use/");
|
||||
|
||||
@@ -67,10 +67,140 @@ const spec = {
|
||||
{ name: "EASO & Piper Auth", description: "开放平台 OAuth2 免登握手、换票与 Token 自动刷新" },
|
||||
{ name: "Platforms & Apps", description: "自建应用列表与集成检索" },
|
||||
{ name: "Workflows & Pipelines", description: "跨应用工作流聚合、运行日志、节点详情与启停" },
|
||||
{ name: "Bills & Invoices", description: "费控单据、报销单、借款单、发票与 DataLink 实体字典" },
|
||||
{ name: "Jobs & Execution", description: "工作流任务运行实例与调试" },
|
||||
{ name: "Staffs & Webhooks", description: "企业通讯录人员与 Webhook 触发配置" },
|
||||
],
|
||||
paths: {
|
||||
"/api/v2/invoice/search": {
|
||||
post: {
|
||||
tags: ["Bills & Invoices"],
|
||||
summary: "检索企业费用单据与发票池",
|
||||
description: "检索企业名下的费用单据、报销借款单、发票与审批流记录,支持分页与阶段过滤。",
|
||||
operationId: "rawSearchInvoices",
|
||||
parameters: [
|
||||
{ name: "corporationId", in: "query", required: true, schema: { type: "string" } },
|
||||
],
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
limit: {
|
||||
type: "object",
|
||||
properties: {
|
||||
start: { type: "integer", default: 0 },
|
||||
count: { type: "integer", default: 50 },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {
|
||||
"200": {
|
||||
description: "单据列表响应",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
count: { type: "integer" },
|
||||
items: { type: "array", items: { type: "object" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"/api/v2/invoice": {
|
||||
post: {
|
||||
tags: ["Bills & Invoices"],
|
||||
summary: "批量按 ID 精确获取单据详情",
|
||||
description: "根据单据物理 ID 列表批量拉取完整的表单数据与状态。",
|
||||
operationId: "rawGetInvoicesByIds",
|
||||
parameters: [
|
||||
{ name: "corporationId", in: "query", required: true, schema: { type: "string" } },
|
||||
],
|
||||
requestBody: {
|
||||
required: true,
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
required: ["ids"],
|
||||
properties: {
|
||||
ids: { type: "array", items: { type: "string" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {
|
||||
"200": {
|
||||
description: "单据详情列表",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
items: { type: "array", items: { type: "object" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"/api/v2/datalink/entity/search": {
|
||||
post: {
|
||||
tags: ["Bills & Invoices"],
|
||||
summary: "查询 DataLink 实体定义与字段字典",
|
||||
description: "获取企业全部单据实体模型、字段 Label 中文映射与类型定义。",
|
||||
operationId: "rawSearchEntities",
|
||||
parameters: [
|
||||
{ name: "corporationId", in: "query", required: true, schema: { type: "string" } },
|
||||
],
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
limit: {
|
||||
type: "object",
|
||||
properties: {
|
||||
start: { type: "integer", default: 0 },
|
||||
count: { type: "integer", default: 100 },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {
|
||||
"200": {
|
||||
description: "实体定义字典",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
items: { type: "array", items: { type: "object" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"/api/common/security/getPublicKey": {
|
||||
post: {
|
||||
tags: ["SSO & Security"],
|
||||
|
||||
Reference in new issue
Block a user