@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.
- package/dist/index.d.mts +1985 -2690
- package/dist/index.d.ts +1985 -2690
- package/dist/index.js +1415 -2074
- package/dist/index.mjs +1241 -1834
- package/openapi/dist/user-api.yaml +1512 -1287
- package/openapi/src/components/responses/_index.yaml +50 -9
- package/openapi/src/components/schemas/_index.yaml +521 -260
- package/openapi/src/openapi.yaml +3 -5
- package/openapi/src/paths/pages.yaml +50 -45
- package/package.json +2 -2
package/openapi/src/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: DJVLC User API
|
|
4
|
-
version:
|
|
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
|
-
/
|
|
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
|
-
|
|
3
|
+
resolve:
|
|
4
4
|
get:
|
|
5
5
|
tags: [Pages]
|
|
6
|
-
operationId:
|
|
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:
|
|
26
|
+
in: query
|
|
12
27
|
required: true
|
|
13
28
|
schema:
|
|
14
29
|
type: string
|
|
15
30
|
description: 页面 ID
|
|
16
|
-
- name:
|
|
31
|
+
- name: env
|
|
17
32
|
in: query
|
|
33
|
+
required: false
|
|
18
34
|
schema:
|
|
19
35
|
type: string
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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.
|
|
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.
|
|
28
|
+
"@djvlc/openapi-client-core": "1.2.9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^20.0.0",
|