@djvlc/openapi-user-client 1.7.8 → 1.7.10

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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: DJVLC User API
4
- version: 2.0.0
4
+ version: 1.0.0
5
5
  description: |
6
6
  DJVLC 低代码平台用户端 API(数据面)
7
7
 
@@ -46,10 +46,8 @@ tags:
46
46
  description: 健康检查
47
47
 
48
48
  paths:
49
- # 页面解析
50
- /pages/{pageId}:
51
- $ref: './paths/pages.yaml#/page'
52
- /pages/{pageId}/resolve:
49
+ # 页面解析(根据设计总纲 V2)
50
+ /page/resolve:
53
51
  $ref: './paths/pages.yaml#/resolve'
54
52
 
55
53
  # Action Gateway(统一入口)
@@ -1,64 +1,69 @@
1
- # 页面获取相关路径
1
+ # 页面解析相关路径(根据设计总纲 V2)
2
2
 
3
- page:
3
+ resolve:
4
4
  get:
5
5
  tags: [Pages]
6
- operationId: getPage
7
- summary: 获取页面
8
- description: 获取指定页面的基本信息和元数据
6
+ operationId: resolvePage
7
+ summary: 解析页面(Runtime 核心接口)
8
+ description: |
9
+ Runtime 的核心接口,返回渲染所需的完整数据。
10
+
11
+ 支持两种模式:
12
+ 1. 稳定入口(推荐):支持灰度/回滚/ops,返回 resolvedVersionId 和 CDN 地址
13
+ 2. 保底模式:当 includeSnapshot=1 时,返回完整 snapshot(CDN 失败时使用)
14
+
15
+ 响应包含:
16
+ - resolvedVersionId: 解析后的页面版本 ID(考虑灰度/回滚)
17
+ - cdnBase: CDN 基础地址
18
+ - snapshotUrl: snapshot.json 的完整 URL
19
+ - manifestUrl: manifest.json 的完整 URL
20
+ - ops: 运维配置(killSwitch、blockedComponents、flags)
21
+ - etag: 内容哈希(用于缓存)
22
+ - cacheTtlSeconds: 缓存 TTL(建议 10~30 秒)
23
+ - snapshot: 完整快照(仅当 includeSnapshot=1 时返回)
9
24
  parameters:
10
25
  - name: pageId
11
- in: path
26
+ in: query
12
27
  required: true
13
28
  schema:
14
29
  type: string
15
30
  description: 页面 ID
16
- - name: version
31
+ - name: env
17
32
  in: query
33
+ required: false
18
34
  schema:
19
35
  type: string
20
- description: 指定版本号(可选,默认最新版本)
21
- responses:
22
- '200':
23
- description: 成功
24
- content:
25
- application/json:
26
- schema:
27
- $ref: '../components/schemas/_index.yaml#/PageResponse'
28
- '404':
29
- $ref: '../components/responses/_index.yaml#/NotFound'
30
- '503':
31
- $ref: '../components/responses/_index.yaml#/ServiceUnavailable'
32
-
33
- resolve:
34
- post:
35
- tags: [Pages]
36
- operationId: resolvePage
37
- summary: 解析页面
38
- description: |
39
- 解析页面 Schema,返回完整的渲染数据。
40
-
41
- 包括:
42
- - 解析后的页面 Schema
43
- - 组件资源清单
44
- - 预取的数据查询结果
45
- - 动作资源清单
46
- parameters:
47
- - name: pageId
48
- in: path
49
- required: true
36
+ enum: [prod, preview, staging]
37
+ default: prod
38
+ description: 环境(prod/preview/staging)
39
+ - name: uid
40
+ in: query
41
+ required: false
50
42
  schema:
51
43
  type: string
52
- description: 页面 ID
53
- requestBody:
54
- required: true
55
- content:
56
- application/json:
57
- schema:
58
- $ref: '../components/schemas/_index.yaml#/ResolvePageRequest'
44
+ description: 用户 ID(用于灰度路由)
45
+ - name: deviceId
46
+ in: query
47
+ required: false
48
+ schema:
49
+ type: string
50
+ description: 设备 ID
51
+ - name: channel
52
+ in: query
53
+ required: false
54
+ schema:
55
+ type: string
56
+ description: 渠道标识
57
+ - name: includeSnapshot
58
+ in: query
59
+ required: false
60
+ schema:
61
+ type: boolean
62
+ default: false
63
+ description: 是否包含完整 snapshot(CDN 失败保底时使用)
59
64
  responses:
60
65
  '200':
61
- description: 成功
66
+ description: 解析成功
62
67
  content:
63
68
  application/json:
64
69
  schema:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djvlc/openapi-user-client",
3
- "version": "1.7.8",
3
+ "version": "1.7.10",
4
4
  "description": "DJV Low-code Platform - User API 客户端(自动生成)",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -25,7 +25,7 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@djvlc/openapi-client-core": "1.2.7"
28
+ "@djvlc/openapi-client-core": "1.2.9"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.0.0",