feat: 更新 API 响应结构,统一使用 statusCode 和 errMsg 替代 code 和 msg;新增用户类型和公司 ID 字段;优化数据库索引;添加公司所有者同步测试脚本
This commit is contained in:
@@ -40,13 +40,13 @@ components:
|
||||
schemas:
|
||||
ApiResponse:
|
||||
type: object
|
||||
required: [code, msg, data]
|
||||
required: [statusCode, errMsg, data]
|
||||
properties:
|
||||
code:
|
||||
statusCode:
|
||||
type: integer
|
||||
description: "业务状态码"
|
||||
example: 200
|
||||
msg:
|
||||
errMsg:
|
||||
type: string
|
||||
description: "业务提示信息"
|
||||
example: 操作成功
|
||||
@@ -343,13 +343,13 @@ components:
|
||||
type: object
|
||||
description: |
|
||||
项目统一认证响应。
|
||||
所有对外接口统一返回 `code`、`msg`、`data`,认证成功时额外返回顶层 `token`。
|
||||
所有对外接口统一返回 `statusCode`、`errMsg`、`data`,认证成功时额外返回顶层 `token`。
|
||||
properties:
|
||||
code:
|
||||
statusCode:
|
||||
type: integer
|
||||
description: "业务状态码"
|
||||
example: 200
|
||||
msg:
|
||||
errMsg:
|
||||
type: string
|
||||
description: "业务提示信息"
|
||||
example: 登录成功
|
||||
@@ -370,8 +370,8 @@ components:
|
||||
type: string
|
||||
description: "PocketBase 原生 auth token;仅认证类接口在成功时额外返回"
|
||||
example:
|
||||
code: 200
|
||||
msg: 登录成功
|
||||
statusCode: 200
|
||||
errMsg: 登录成功
|
||||
data:
|
||||
status: 登录或注册状态 | string
|
||||
is_info_complete: 资料是否完整 | boolean
|
||||
@@ -450,6 +450,14 @@ components:
|
||||
type: string
|
||||
description: "可选。未传 `users_phone_code` 时,可直接写入手机号"
|
||||
example: '13800138000'
|
||||
users_type:
|
||||
type: string
|
||||
description: "可选。用户类型;仅在传入非空值时更新"
|
||||
example: 服务商
|
||||
company_id:
|
||||
type: string
|
||||
description: "可选。公司业务 id;仅在传入非空值时更新"
|
||||
example: WX-COMPANY-10001
|
||||
users_tag:
|
||||
type: string
|
||||
description: "可选。用户标签;非空时才更新"
|
||||
@@ -1194,13 +1202,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HelloWorldData'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HelloWorldData'
|
||||
/pb/api/system/health:
|
||||
post:
|
||||
tags: [系统]
|
||||
@@ -1211,13 +1214,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HealthData'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HealthData'
|
||||
/pb/api/system/users-count:
|
||||
post:
|
||||
tags: [系统]
|
||||
@@ -1229,13 +1227,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/UsersCountData'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/UsersCountData'
|
||||
/pb/api/platform/register:
|
||||
post:
|
||||
tags: [平台认证]
|
||||
@@ -1292,8 +1285,8 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PocketBaseAuthResponse'
|
||||
example:
|
||||
code: 200
|
||||
msg: 登录成功
|
||||
statusCode: 200
|
||||
errMsg: 登录成功
|
||||
data:
|
||||
status: login_success
|
||||
is_info_complete: false
|
||||
@@ -1348,18 +1341,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'415':
|
||||
description: "请求体必须为 application/json"
|
||||
/pb/api/dictionary/detail:
|
||||
@@ -1382,13 +1370,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'400':
|
||||
description: "参数错误"
|
||||
'404':
|
||||
@@ -1415,13 +1398,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'400':
|
||||
description: "参数错误或 dict_name 已存在"
|
||||
'401':
|
||||
@@ -1451,13 +1429,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'400':
|
||||
description: "参数错误或 dict_name 冲突"
|
||||
'401':
|
||||
@@ -1489,17 +1462,12 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
dict_name:
|
||||
description: "字典名称,当前按全局唯一维护"
|
||||
type: string
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
dict_name:
|
||||
description: "字典名称,当前按全局唯一维护"
|
||||
type: string
|
||||
'400':
|
||||
description: "参数错误或删除失败"
|
||||
'401':
|
||||
@@ -1531,18 +1499,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
'401':
|
||||
description: "token 无效或已过期"
|
||||
'403':
|
||||
@@ -1568,13 +1531,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
'400':
|
||||
description: "参数错误"
|
||||
'401':
|
||||
@@ -1605,13 +1563,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
'400':
|
||||
description: "参数错误、缺少文件或附件保存失败"
|
||||
'401':
|
||||
@@ -1637,17 +1590,12 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
attachments_id:
|
||||
description: "附件业务 ID"
|
||||
type: string
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
attachments_id:
|
||||
description: "附件业务 ID"
|
||||
type: string
|
||||
'400':
|
||||
description: "参数错误、附件已被文档引用或删除失败"
|
||||
'401':
|
||||
@@ -1681,18 +1629,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'401':
|
||||
description: "token 无效或已过期"
|
||||
'403':
|
||||
@@ -1718,13 +1661,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'400':
|
||||
description: "参数错误"
|
||||
'401':
|
||||
@@ -1757,13 +1695,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'400':
|
||||
description: "参数错误、附件不存在或文档创建失败"
|
||||
'401':
|
||||
@@ -1796,13 +1729,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'400':
|
||||
description: "参数错误、附件不存在或修改失败"
|
||||
'401':
|
||||
@@ -1834,17 +1762,12 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
document_id:
|
||||
description: "文档业务 ID"
|
||||
type: string
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
document_id:
|
||||
description: "文档业务 ID"
|
||||
type: string
|
||||
'400':
|
||||
description: "参数错误或删除失败"
|
||||
'401':
|
||||
@@ -1876,18 +1799,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentHistoryRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentHistoryRecord'
|
||||
'401':
|
||||
description: "token 无效或已过期"
|
||||
'403':
|
||||
@@ -1895,3 +1813,5 @@ paths:
|
||||
'415':
|
||||
description: "请求体必须为 application/json"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ paths:
|
||||
- 其他原生操作中,`update/delete/view` 仅管理员或管理后台用户允许
|
||||
|
||||
注意:
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ code, msg, data }` 包装
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ statusCode, errMsg, data }` 包装
|
||||
- `company_id` 由数据库自动生成,客户端创建时不需要传
|
||||
- `company_id` 仍带唯一索引,可用于后续按业务 id 查询
|
||||
requestBody:
|
||||
@@ -320,7 +320,7 @@ paths:
|
||||
- 按需传 `page`、`perPage`
|
||||
|
||||
注意:
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ code, msg, data }` 包装
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ statusCode, errMsg, data }` 包装
|
||||
- PocketBase 原生标准接口里,“按 `company_id` 查询单条”和“查询整个列表”共用同一个 `GET /records` 路径,因此文档以同一个 GET operation 展示两种调用模式
|
||||
parameters:
|
||||
- name: filter
|
||||
@@ -539,7 +539,7 @@ paths:
|
||||
- `page=1`
|
||||
|
||||
注意:
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ code, msg, data }` 包装
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ statusCode, errMsg, data }` 包装
|
||||
- `attachments_link` 返回的是 PocketBase 文件字段值,不是完整下载地址
|
||||
- 若需文件流地址,可按 PocketBase 标准文件路径自行拼接:`/pb/api/files/{collectionId}/{recordId}/{attachments_link}`
|
||||
parameters:
|
||||
@@ -660,7 +660,7 @@ paths:
|
||||
- 若要按最新上传倒序,传 `sort=-document_create`
|
||||
|
||||
注意:
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ code, msg, data }` 包装
|
||||
- 这是 PocketBase 原生返回结构,不是 hooks 统一 `{ statusCode, errMsg, data }` 包装
|
||||
- 如果需要更复杂的条件组合,可继续使用 PocketBase 原生 `filter` 语法自行扩展
|
||||
parameters:
|
||||
- name: filter
|
||||
@@ -786,17 +786,17 @@ components:
|
||||
ApiResponseBase:
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- msg
|
||||
- statusCode
|
||||
- errMsg
|
||||
- data
|
||||
properties:
|
||||
code:
|
||||
statusCode:
|
||||
type:
|
||||
- integer
|
||||
- string
|
||||
description: "业务状态码"
|
||||
example: 业务状态码 | integer
|
||||
msg:
|
||||
errMsg:
|
||||
type: string
|
||||
description: "业务提示信息"
|
||||
example: 业务提示信息 | string
|
||||
@@ -805,24 +805,24 @@ components:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
example:
|
||||
code: 业务状态码 | integer
|
||||
msg: 业务提示信息 | string
|
||||
statusCode: 业务状态码 | integer
|
||||
errMsg: 业务提示信息 | string
|
||||
data:
|
||||
任意业务字段: 业务响应数据 | object
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- msg
|
||||
- statusCode
|
||||
- errMsg
|
||||
- data
|
||||
properties:
|
||||
code:
|
||||
statusCode:
|
||||
type:
|
||||
- integer
|
||||
- string
|
||||
description: "业务状态码"
|
||||
example: 业务状态码 | integer
|
||||
msg:
|
||||
errMsg:
|
||||
type: string
|
||||
description: "业务提示信息"
|
||||
example: 失败原因提示 | string
|
||||
@@ -831,8 +831,8 @@ components:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
example:
|
||||
code: 业务状态码 | integer
|
||||
msg: 失败原因提示 | string
|
||||
statusCode: 业务状态码 | integer
|
||||
errMsg: 失败原因提示 | string
|
||||
data:
|
||||
任意错误字段: 错误附加信息 | object
|
||||
CompanyInfo:
|
||||
@@ -1698,6 +1698,14 @@ components:
|
||||
type: string
|
||||
description: 可选。未传 `users_phone_code` 时,可直接写入手机号
|
||||
example: '13800138000'
|
||||
users_type:
|
||||
type: string
|
||||
description: 可选。用户类型;仅在传入非空值时更新
|
||||
example: 服务商
|
||||
company_id:
|
||||
type: string
|
||||
description: 可选。公司业务 id;仅在传入非空值时更新
|
||||
example: WX-COMPANY-10001
|
||||
users_tag:
|
||||
type: string
|
||||
description: 可选。用户标签;非空时才更新
|
||||
@@ -1756,8 +1764,8 @@ components:
|
||||
type: string
|
||||
description: PocketBase 原生 auth token
|
||||
example:
|
||||
code: 业务状态码 | integer
|
||||
msg: 业务提示信息 | string
|
||||
statusCode: 业务状态码 | integer
|
||||
errMsg: 业务提示信息 | string
|
||||
data:
|
||||
status: 登录或注册状态 | string
|
||||
is_info_complete: 资料是否完整 | boolean
|
||||
@@ -1835,8 +1843,8 @@ components:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/WechatProfileResponseData'
|
||||
example:
|
||||
code: 业务状态码 | integer
|
||||
msg: 业务提示信息 | string
|
||||
statusCode: 业务状态码 | integer
|
||||
errMsg: 业务提示信息 | string
|
||||
data:
|
||||
status: 资料更新状态 | string
|
||||
user:
|
||||
@@ -1908,8 +1916,8 @@ components:
|
||||
type: string
|
||||
description: 新签发的 PocketBase 原生 auth token
|
||||
example:
|
||||
code: 业务状态码 | integer
|
||||
msg: 刷新成功 | string
|
||||
statusCode: 业务状态码 | integer
|
||||
errMsg: 刷新成功 | string
|
||||
data: {}
|
||||
token: 新签发的PocketBase原生auth token | string
|
||||
UsersCountData:
|
||||
@@ -1929,7 +1937,8 @@ components:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/UsersCountData'
|
||||
example:
|
||||
code: 业务状态码 | integer
|
||||
msg: 业务提示信息 | string
|
||||
statusCode: 业务状态码 | integer
|
||||
errMsg: 业务提示信息 | string
|
||||
data:
|
||||
total_users: 用户总数 | integer
|
||||
|
||||
|
||||
@@ -33,13 +33,13 @@ components:
|
||||
schemas:
|
||||
ApiResponse:
|
||||
type: object
|
||||
required: [code, msg, data]
|
||||
required: [statusCode, errMsg, data]
|
||||
properties:
|
||||
code:
|
||||
statusCode:
|
||||
type: integer
|
||||
description: "业务状态码"
|
||||
example: 200
|
||||
msg:
|
||||
errMsg:
|
||||
type: string
|
||||
description: "业务提示信息"
|
||||
example: 操作成功
|
||||
@@ -313,13 +313,13 @@ components:
|
||||
type: object
|
||||
description: |
|
||||
项目统一认证响应。
|
||||
所有对外接口统一返回 `code`、`msg`、`data`,认证成功时额外返回顶层 `token`。
|
||||
所有对外接口统一返回 `statusCode`、`errMsg`、`data`,认证成功时额外返回顶层 `token`。
|
||||
properties:
|
||||
code:
|
||||
statusCode:
|
||||
type: integer
|
||||
description: "业务状态码"
|
||||
example: 200
|
||||
msg:
|
||||
errMsg:
|
||||
type: string
|
||||
description: "业务提示信息"
|
||||
example: 登录成功
|
||||
@@ -340,8 +340,8 @@ components:
|
||||
type: string
|
||||
description: PocketBase 原生 auth token;仅认证类接口在成功时额外返回
|
||||
example:
|
||||
code: 200
|
||||
msg: 登录成功
|
||||
statusCode: 200
|
||||
errMsg: 登录成功
|
||||
data:
|
||||
status: 登录或注册状态 | string
|
||||
is_info_complete: 资料是否完整 | boolean
|
||||
@@ -420,6 +420,14 @@ components:
|
||||
type: string
|
||||
description: 可选。未传 `users_phone_code` 时,可直接写入手机号
|
||||
example: '13800138000'
|
||||
users_type:
|
||||
type: string
|
||||
description: 可选。用户类型;仅在传入非空值时更新
|
||||
example: 服务商
|
||||
company_id:
|
||||
type: string
|
||||
description: 可选。公司业务 id;仅在传入非空值时更新
|
||||
example: WX-COMPANY-10001
|
||||
users_tag:
|
||||
type: string
|
||||
description: 可选。用户标签;非空时才更新
|
||||
@@ -1164,13 +1172,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HelloWorldData'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HelloWorldData'
|
||||
/pb/api/system/health:
|
||||
post:
|
||||
tags: [系统]
|
||||
@@ -1181,13 +1184,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HealthData'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/HealthData'
|
||||
/pb/api/system/users-count:
|
||||
post:
|
||||
tags: [系统]
|
||||
@@ -1199,13 +1197,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/UsersCountData'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/UsersCountData'
|
||||
/pb/api/system/refresh-token:
|
||||
post:
|
||||
tags: [系统]
|
||||
@@ -1235,8 +1228,8 @@ paths:
|
||||
type: string
|
||||
description: 新签发的 PocketBase 原生 auth token
|
||||
example:
|
||||
code: 200
|
||||
msg: 刷新成功
|
||||
statusCode: 200
|
||||
errMsg: 刷新成功
|
||||
data: {}
|
||||
token: eyJhbGciOi...
|
||||
'400':
|
||||
@@ -1337,8 +1330,8 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PocketBaseAuthResponse'
|
||||
example:
|
||||
code: 200
|
||||
msg: 登录成功
|
||||
statusCode: 200
|
||||
errMsg: 登录成功
|
||||
data:
|
||||
status: login_success
|
||||
is_info_complete: false
|
||||
@@ -1395,13 +1388,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/WechatProfileResponseData'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/WechatProfileResponseData'
|
||||
'401':
|
||||
description: token 无效或当前 auth record 缺少统一身份字段 openid
|
||||
'400':
|
||||
@@ -1426,18 +1414,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'415':
|
||||
description: 请求体必须为 application/json
|
||||
/pb/api/dictionary/detail:
|
||||
@@ -1460,13 +1443,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'400':
|
||||
description: 参数错误
|
||||
'404':
|
||||
@@ -1493,13 +1471,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'400':
|
||||
description: 参数错误或 dict_name 已存在
|
||||
'401':
|
||||
@@ -1529,13 +1502,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DictionaryRecord'
|
||||
'400':
|
||||
description: 参数错误或 dict_name 冲突
|
||||
'401':
|
||||
@@ -1567,17 +1535,12 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
dict_name:
|
||||
description: "字典名称,当前按全局唯一维护"
|
||||
type: string
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
dict_name:
|
||||
description: "字典名称,当前按全局唯一维护"
|
||||
type: string
|
||||
'400':
|
||||
description: 参数错误或删除失败
|
||||
'401':
|
||||
@@ -1609,18 +1572,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
'401':
|
||||
description: token 无效或已过期
|
||||
'403':
|
||||
@@ -1646,13 +1604,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
'400':
|
||||
description: 参数错误
|
||||
'401':
|
||||
@@ -1683,13 +1636,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/AttachmentRecord'
|
||||
'400':
|
||||
description: 参数错误、缺少文件或附件保存失败
|
||||
'401':
|
||||
@@ -1715,17 +1663,12 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
attachments_id:
|
||||
description: "附件业务 ID"
|
||||
type: string
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
attachments_id:
|
||||
description: "附件业务 ID"
|
||||
type: string
|
||||
'400':
|
||||
description: 参数错误、附件已被文档引用或删除失败
|
||||
'401':
|
||||
@@ -1759,18 +1702,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'401':
|
||||
description: token 无效或已过期
|
||||
'403':
|
||||
@@ -1796,13 +1734,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'400':
|
||||
description: 参数错误
|
||||
'401':
|
||||
@@ -1835,13 +1768,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'400':
|
||||
description: 参数错误、附件不存在或文档创建失败
|
||||
'401':
|
||||
@@ -1874,13 +1802,8 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
description: "业务响应数据"
|
||||
$ref: '#/components/schemas/DocumentRecord'
|
||||
'400':
|
||||
description: 参数错误、附件不存在或修改失败
|
||||
'401':
|
||||
@@ -1912,17 +1835,12 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
document_id:
|
||||
description: "文档业务 ID"
|
||||
type: string
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
document_id:
|
||||
description: "文档业务 ID"
|
||||
type: string
|
||||
'400':
|
||||
description: 参数错误或删除失败
|
||||
'401':
|
||||
@@ -1954,21 +1872,18 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ApiResponse'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentHistoryRecord'
|
||||
description: "业务响应数据"
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/DocumentHistoryRecord'
|
||||
'401':
|
||||
description: token 无效或已过期
|
||||
'403':
|
||||
description: 非 ManagePlatform 用户无权访问
|
||||
'415':
|
||||
description: 请求体必须为 application/json
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user