feat: 添加 PocketBase 管理端与自定义 hooks 的 API 文档

- 新增 openapi.yaml 文件,定义管理端与自定义 hooks 的接口文档,包括系统、微信认证、平台认证、字典管理、附件管理、文档管理、购物车和订单等接口。
- 新增 order.yaml 文件,定义订单相关的接口,包括查询订单列表、查询订单详情、新增订单记录、修改订单记录和删除订单记录的请求和响应结构。
- 新增 openapi-wx/openapi.yaml 文件,定义 PocketBase 原生 API 文档,包含企业信息、附件信息、产品信息、文档信息、购物车和订单的接口。
- 新增 pocketbase.scheme.js 文件,包含 PocketBase 集合的创建和更新逻辑,定义了多个集合的字段、索引和权限规则。
This commit is contained in:
2026-04-08 20:14:22 +08:00
parent e47060f54f
commit 0bdaf54eed
36 changed files with 4391 additions and 2418 deletions

View File

@@ -0,0 +1,103 @@
openapi: 3.1.0
info:
title: BAI PocketBase Manage Hooks API
version: 1.0.0-manage-folder
description: |
面向管理端与自定义 hooks 的接口文档。
本目录仅收敛自定义 hooks API不包含 PocketBase 原生 records API。
文档约定:
- 不单独配置鉴权组件;如接口需要登录,请直接在说明中关注 `Authorization: Bearer <token>`
- 示例字段值统一使用 `<字段说明>|<类型>` 风格
- 当前 `tbl_auth_users.openid` 为全平台统一身份锚点
servers:
- url: https://bai-api.blv-oa.com
description: 生产环境
- url: http://localhost:8090
description: PocketBase 本地环境
tags:
- name: 系统
description: hooks 系统基础接口
- name: 微信认证
description: hooks 微信认证与资料接口
- name: 平台认证
description: hooks 平台用户认证接口
- name: 字典管理
description: hooks 字典管理接口
- name: 附件管理
description: hooks 附件管理接口
- name: 文档管理
description: hooks 文档管理接口
- name: 文档历史
description: hooks 文档历史接口
- name: 购物车
description: hooks 购物车接口
- name: 订单
description: hooks 订单接口
paths:
/pb/api/system/test-helloworld:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1system~1test-helloworld'
/pb/api/system/health:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1system~1health'
/pb/api/system/users-count:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1system~1users-count'
/pb/api/system/refresh-token:
$ref: '../openapi.yaml#/paths/~1pb~1api~1system~1refresh-token'
/pb/api/wechat/login:
$ref: '../openapi.yaml#/paths/~1pb~1api~1wechat~1login'
/pb/api/wechat/profile:
$ref: '../openapi.yaml#/paths/~1pb~1api~1wechat~1profile'
/pb/api/platform/register:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1platform~1register'
/pb/api/platform/login:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1platform~1login'
/pb/api/dictionary/list:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1dictionary~1list'
/pb/api/dictionary/detail:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1dictionary~1detail'
/pb/api/dictionary/create:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1dictionary~1create'
/pb/api/dictionary/update:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1dictionary~1update'
/pb/api/dictionary/delete:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1dictionary~1delete'
/pb/api/attachment/list:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1attachment~1list'
/pb/api/attachment/detail:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1attachment~1detail'
/pb/api/attachment/upload:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1attachment~1upload'
/pb/api/attachment/delete:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1attachment~1delete'
/pb/api/document/list:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1document~1list'
/pb/api/document/detail:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1document~1detail'
/pb/api/document/create:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1document~1create'
/pb/api/document/update:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1document~1update'
/pb/api/document/delete:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1document~1delete'
/pb/api/document-history/list:
$ref: '../openapi-manage.yaml#/paths/~1pb~1api~1document-history~1list'
/pb/api/cart/list:
$ref: './cart.yaml#/paths/cartList'
/pb/api/cart/detail:
$ref: './cart.yaml#/paths/cartDetail'
/pb/api/cart/create:
$ref: './cart.yaml#/paths/cartCreate'
/pb/api/cart/update:
$ref: './cart.yaml#/paths/cartUpdate'
/pb/api/cart/delete:
$ref: './cart.yaml#/paths/cartDelete'
/pb/api/order/list:
$ref: './order.yaml#/paths/orderList'
/pb/api/order/detail:
$ref: './order.yaml#/paths/orderDetail'
/pb/api/order/create:
$ref: './order.yaml#/paths/orderCreate'
/pb/api/order/update:
$ref: './order.yaml#/paths/orderUpdate'
/pb/api/order/delete:
$ref: './order.yaml#/paths/orderDelete'