chore(repo): consolidate spec artifacts into specs/ and complete README coverage

- Move generated OpenAPI bundles out of dist/ into committed specs/
  (specs/openapi.json, specs/openapi.raw.json); source YAML tree moves
  openapi/ -> specs/openapi/; schemas/workflow-schema.json joins as
  specs/workflow-schema.json
- Update all generators/consumers: bundle-openapi, generate-raw-openapi,
  check-version-sync, bump-version, export-workflow-schema,
  packaging/embedded-openapi
- Rewrite stale .env.example with current HOSE_* environment variables
- Archive stale repo-local enterprise configs (superseded by
  ~/.config/hose-use/enterprises) out of the repo; root enterprises/
  keeps only the tracked example.json plus an explanatory README
- Add missing directory READMEs: approval/contact/message/task/events
  domains, cli/, http/, packaging/
- Fix stale domain doc links in README.domains.md and
  docs/modules/platform.md
This commit is contained in:
gitea committed 2026-10-04 14:00:03 +08:00
1 parent 6d532fc719
commit a3b64d8c8d
29 files changed
+177 -28

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
login:
post:
tags:
- Auth & SSO
summary: 纯 API 账密自动全流程登录
description: 自动拉取公钥进行 RSA PKCS#1 加密,发起统一认证中心握手并批量获取名下所有企业身份。
operationId: authLogin
requestBody:
required: true
content:
"application/json":
schema:
$ref: ../components/schemas/index.yaml#/AuthLoginRequest
responses:
"200":
description: 登录成功
content:
"application/json":
schema:
type: object
properties:
success:
type: boolean
totalCorps:
type: integer
activeCorp:
$ref: ../components/schemas/index.yaml#/CorpConfig
"401":
description: 账密错误或鉴权失败
content:
"application/json":
schema:
$ref: ../components/schemas/index.yaml#/ErrorResponse
status:
get:
tags:
- Auth & SSO
summary: 查看当前登录与活跃企业状态
description: 查询本地或无状态下的当前账号、工作企业与凭证有效期。
operationId: authStatus
responses:
"200":
description: 状态正常
content:
"application/json":
schema:
$ref: ../components/schemas/index.yaml#/AuthStatusResponse
refresh:
post:
tags:
- Auth & SSO
summary: 批量刷新企业 30 天 AccessToken
description: 自动无感为当前账号名下的所有企业租户更新最新 30 天访问令牌。
operationId: authRefresh
responses:
"200":
description: 刷新完成
content:
"application/json":
schema:
type: object
properties:
refreshed:
type: integer
total:
type: integer
+101
View File
@@ -0,0 +1,101 @@
list:
get:
tags:
- Bills & Documents
summary: 检索费用单据与发票明细列表
description: 查询企业名下的费用单据、报销单、借款单与发票列表,支持按单号、阶段、状态过滤。
operationId: listBills
parameters:
- name: code
in: query
required: false
description: 按单据编号/单号过滤(如 jO1it3cIufDjNS)
schema:
type: string
- name: keyword
in: query
required: false
description: 按关键字搜索标题、名称或内容
schema:
type: string
- name: stage
in: query
required: false
description: 按业务阶段过滤(expense 报销, loan 借款, payment 付款)
schema:
type: string
- name: state
in: query
required: false
description: 按审批/支付状态过滤(paid 已支付, approving 审批中, draft 草稿)
schema:
type: string
- name: count
in: query
required: false
description: 返回条数限制
schema:
type: integer
default: 20
responses:
"200":
description: 格式化后的单据列表
content:
"application/json":
schema:
type: object
properties:
total:
type: integer
returned:
type: integer
items:
type: array
items:
$ref: "../components/schemas/index.yaml#/FormattedBill"
get:
get:
tags:
- Bills & Documents
summary: 根据单号或 ID 查询单据结构化详情
description: 自动结合 DataLink 字段字典将代码字段还原为业务中文字段。
operationId: getBillByCode
parameters:
- name: code
in: path
required: true
description: 单据编号(如 n0GMIM0dkQmKbS)或单据 ID(如 ID01TRzg7HMLcb)
schema:
type: string
responses:
"200":
description: 单据详情列表
content:
"application/json":
schema:
type: array
items:
$ref: "../components/schemas/index.yaml#/FormattedBill"
schema:
get:
tags:
- Bills & Documents
summary: 获取单据实体与数据模型字典
description: 获取企业全部表单实体、中文字段 Label 与类型定义。
operationId: getBillSchemas
responses:
"200":
description: 实体模型字典
content:
"application/json":
schema:
type: object
properties:
totalEntities:
type: integer
entities:
type: array
items:
type: object
+48
View File
@@ -0,0 +1,48 @@
list:
get:
tags:
- Corps & Tenancy
summary: 列出当前账号名下所有已配置企业租户
description: 支持单账号管理多家企业与同一企业下的多员工身份分层展示。
operationId: listCorps
responses:
"200":
description: 企业租户列表
content:
"application/json":
schema:
type: array
items:
$ref: ../components/schemas/index.yaml#/CorpConfig
switch:
post:
tags:
- Corps & Tenancy
summary: 切换当前工作企业
description: 在有状态模式下切换并记忆工作企业,后续操作自动以该企业身份执行。
operationId: switchCorp
requestBody:
required: true
content:
"application/json":
schema:
type: object
required:
- corpId
properties:
corpId:
type: string
description: 目标企业 ID 或身份 ID (corpId@accountId)
responses:
"200":
description: 切换成功
content:
"application/json":
schema:
type: object
properties:
success:
type: boolean
activeCorp:
$ref: ../components/schemas/index.yaml#/CorpConfig
+23
View File
@@ -0,0 +1,23 @@
list:
get:
tags:
- Platforms
summary: 查询企业下所有启用的自建应用
description: 枚举当前企业已配置的自建应用及 EASO 平台实例。
operationId: listPlatforms
parameters:
- name: corpId
in: query
required: false
schema:
type: string
description: 目标企业 ID (未指定时使用默认工作企业)
responses:
"200":
description: 自建应用列表
content:
"application/json":
schema:
type: array
items:
$ref: ../components/schemas/index.yaml#/PlatformItem
+20
View File
@@ -0,0 +1,20 @@
probe:
get:
tags:
- Probe & Diagnostics
summary: 诊断当前企业鉴权与接口连通性
description: 依次校验企业主站 Session Cookie、EASO 换票握手与自建应用接口可访问性。
operationId: probeCorp
parameters:
- name: corpId
in: query
required: false
schema:
type: string
responses:
"200":
description: 诊断报告
content:
"application/json":
schema:
$ref: ../components/schemas/index.yaml#/ProbeResult
+113
View File
@@ -0,0 +1,113 @@
list:
get:
tags:
- Workflows
summary: 跨自建应用汇总查看全部工作流
description: 自动遍历当前企业下所有自建应用,聚合返回全量工作流列表及运行状态。
operationId: listAllWorkflows
parameters:
- name: corpId
in: query
required: false
schema:
type: string
responses:
"200":
description: 聚合工作流列表
content:
"application/json":
schema:
type: array
items:
$ref: ../components/schemas/index.yaml#/WorkflowSummary
find:
get:
tags:
- Workflows
summary: 按节点类型递归搜索工作流
description: 递归解析所有工作流的 DSL 节点图谱,检索包含特定任务类型(如 code-js2, loop, sql 等)的工作流。
operationId: findWorkflowsByTask
parameters:
- name: task
in: query
required: true
schema:
type: string
example: "code-js2"
description: 目标节点任务类型
- name: corpId
in: query
required: false
schema:
type: string
responses:
"200":
description: 匹配的工作流列表
content:
"application/json":
schema:
type: array
items:
$ref: ../components/schemas/index.yaml#/WorkflowSummary
detail:
get:
tags:
- Workflows
summary: 获取单个工作流详情与节点结构
description: 查询指定工作流的完整节点链、输入输出参数映射与触发器配置。
operationId: getWorkflowDetail
parameters:
- name: pipelineId
in: path
required: true
schema:
type: string
description: 工作流 ID
responses:
"200":
description: 工作流详情
content:
"application/json":
schema:
$ref: ../components/schemas/index.yaml#/WorkflowDetail
toggle:
put:
tags:
- Workflows
summary: 启用或停用工作流
description: "切换工作流的运行开关(1: 启用, 0: 停用)。"
operationId: toggleWorkflow
parameters:
- name: pipelineId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
"application/json":
schema:
type: object
required:
- state
properties:
state:
type: integer
enum: [0, 1]
description: "目标状态 (1=启用, 0=停用)"
responses:
"200":
description: 状态切换成功
content:
"application/json":
schema:
type: object
properties:
success:
type: boolean
state:
type: integer