@djvlc/openapi-user-client 1.8.0 → 1.8.2
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 +2456 -3410
- package/dist/index.d.ts +2456 -3410
- package/dist/index.js +1822 -2709
- package/dist/index.mjs +1645 -2417
- package/openapi/dist/user-api.yaml +1198 -1599
- package/openapi/src/components/schemas/_index.yaml +829 -1041
- package/openapi/src/openapi.yaml +20 -20
- package/openapi/src/paths/actions.yaml +32 -52
- package/openapi/src/paths/activities.yaml +138 -161
- package/openapi/src/paths/health.yaml +34 -61
- package/openapi/src/paths/pages.yaml +63 -70
- package/openapi/src/paths/queries.yaml +49 -54
- package/openapi/src/paths/tenant.yaml +25 -49
- package/openapi/src/paths/track.yaml +9 -53
- package/package.json +1 -1
|
@@ -2,87 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
health:
|
|
4
4
|
get:
|
|
5
|
-
tags:
|
|
6
|
-
- Health
|
|
7
|
-
summary: 健康检查
|
|
5
|
+
tags: [Health]
|
|
8
6
|
operationId: healthCheck
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
返回:
|
|
13
|
-
- 服务状态(healthy/degraded/unhealthy)
|
|
14
|
-
- 版本信息
|
|
15
|
-
- 运行时间
|
|
16
|
-
- 依赖服务状态
|
|
7
|
+
summary: 健康检查
|
|
8
|
+
description: 综合健康检查,返回服务状态和时间戳
|
|
17
9
|
responses:
|
|
18
10
|
'200':
|
|
19
|
-
description:
|
|
20
|
-
content:
|
|
21
|
-
application/json:
|
|
22
|
-
schema:
|
|
23
|
-
$ref: '../components/schemas/_index.yaml#/HealthResponse'
|
|
24
|
-
'503':
|
|
25
|
-
description: 服务不健康
|
|
11
|
+
description: 健康
|
|
26
12
|
content:
|
|
27
13
|
application/json:
|
|
28
14
|
schema:
|
|
29
|
-
|
|
15
|
+
allOf:
|
|
16
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
17
|
+
- type: object
|
|
18
|
+
properties:
|
|
19
|
+
data:
|
|
20
|
+
$ref: '../components/schemas/_index.yaml#/HealthCheckResponse'
|
|
30
21
|
security: []
|
|
31
22
|
|
|
32
|
-
|
|
23
|
+
live:
|
|
33
24
|
get:
|
|
34
|
-
tags:
|
|
35
|
-
|
|
36
|
-
summary:
|
|
37
|
-
|
|
38
|
-
description: |
|
|
39
|
-
Kubernetes readiness probe。
|
|
40
|
-
检查服务是否准备好接收流量。
|
|
25
|
+
tags: [Health]
|
|
26
|
+
operationId: livenessCheck
|
|
27
|
+
summary: 存活检查
|
|
28
|
+
description: Kubernetes liveness probe
|
|
41
29
|
responses:
|
|
42
30
|
'200':
|
|
43
|
-
description:
|
|
31
|
+
description: 存活
|
|
44
32
|
content:
|
|
45
33
|
application/json:
|
|
46
34
|
schema:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
description: 服务未就绪
|
|
54
|
-
content:
|
|
55
|
-
application/json:
|
|
56
|
-
schema:
|
|
57
|
-
type: object
|
|
58
|
-
properties:
|
|
59
|
-
ready:
|
|
60
|
-
type: boolean
|
|
61
|
-
example: false
|
|
62
|
-
reason:
|
|
63
|
-
type: string
|
|
35
|
+
allOf:
|
|
36
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
37
|
+
- type: object
|
|
38
|
+
properties:
|
|
39
|
+
data:
|
|
40
|
+
$ref: '../components/schemas/_index.yaml#/LivenessResponse'
|
|
64
41
|
security: []
|
|
65
42
|
|
|
66
|
-
|
|
43
|
+
ready:
|
|
67
44
|
get:
|
|
68
|
-
tags:
|
|
69
|
-
|
|
70
|
-
summary:
|
|
71
|
-
|
|
72
|
-
description: |
|
|
73
|
-
Kubernetes liveness probe。
|
|
74
|
-
检查服务是否存活。
|
|
45
|
+
tags: [Health]
|
|
46
|
+
operationId: readinessCheck
|
|
47
|
+
summary: 就绪检查
|
|
48
|
+
description: Kubernetes readiness probe
|
|
75
49
|
responses:
|
|
76
50
|
'200':
|
|
77
|
-
description:
|
|
51
|
+
description: 就绪
|
|
78
52
|
content:
|
|
79
53
|
application/json:
|
|
80
54
|
schema:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
description: 服务不存活
|
|
55
|
+
allOf:
|
|
56
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
57
|
+
- type: object
|
|
58
|
+
properties:
|
|
59
|
+
data:
|
|
60
|
+
$ref: '../components/schemas/_index.yaml#/ReadinessResponse'
|
|
88
61
|
security: []
|
|
@@ -4,76 +4,88 @@ resolve:
|
|
|
4
4
|
get:
|
|
5
5
|
tags: [Pages]
|
|
6
6
|
operationId: resolvePage
|
|
7
|
-
summary:
|
|
7
|
+
summary: 解析页面
|
|
8
8
|
description: |
|
|
9
|
-
Runtime
|
|
9
|
+
Runtime 核心接口,返回渲染所需的完整数据。
|
|
10
10
|
|
|
11
11
|
支持两种模式:
|
|
12
12
|
1. 稳定入口(推荐):支持灰度/回滚/ops,返回 resolvedVersionId 和 CDN 地址
|
|
13
|
-
2. 保底模式:当 includeSnapshot=
|
|
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 时返回)
|
|
13
|
+
2. 保底模式:当 includeSnapshot=true 时,返回完整 snapshot(CDN 失败时使用)
|
|
24
14
|
parameters:
|
|
25
|
-
- name: X-Trace-Id
|
|
26
|
-
in: header
|
|
27
|
-
required: false
|
|
28
|
-
schema:
|
|
29
|
-
type: string
|
|
30
|
-
description: 链路追踪 ID(OTel,全链路透传)
|
|
31
15
|
- name: pageId
|
|
32
16
|
in: query
|
|
33
17
|
required: true
|
|
18
|
+
description: 页面 ID
|
|
34
19
|
schema:
|
|
35
20
|
type: string
|
|
36
|
-
|
|
21
|
+
example: page_123456
|
|
37
22
|
- name: env
|
|
38
23
|
in: query
|
|
39
24
|
required: false
|
|
25
|
+
description: 环境
|
|
40
26
|
schema:
|
|
41
27
|
type: string
|
|
42
28
|
enum: [prod, preview, staging]
|
|
43
29
|
default: prod
|
|
44
|
-
|
|
30
|
+
example: prod
|
|
31
|
+
- name: includeSnapshot
|
|
32
|
+
in: query
|
|
33
|
+
required: false
|
|
34
|
+
description: 是否包含完整快照(CDN 失败保底)
|
|
35
|
+
schema:
|
|
36
|
+
type: boolean
|
|
37
|
+
default: false
|
|
45
38
|
- name: uid
|
|
46
39
|
in: query
|
|
47
40
|
required: false
|
|
41
|
+
description: 用户 ID(契约 query;也可用 Header x-user-id)
|
|
48
42
|
schema:
|
|
49
43
|
type: string
|
|
50
|
-
|
|
44
|
+
maxLength: 64
|
|
45
|
+
example: user_123456
|
|
51
46
|
- name: deviceId
|
|
52
47
|
in: query
|
|
53
48
|
required: false
|
|
49
|
+
description: 设备 ID(契约 query;也可用 Header x-device-id)
|
|
54
50
|
schema:
|
|
55
51
|
type: string
|
|
56
|
-
|
|
52
|
+
maxLength: 64
|
|
53
|
+
example: device_123456
|
|
57
54
|
- name: channel
|
|
58
55
|
in: query
|
|
59
56
|
required: false
|
|
57
|
+
description: 渠道(契约 query;也可用 Header x-channel)
|
|
60
58
|
schema:
|
|
61
59
|
type: string
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
maxLength: 64
|
|
61
|
+
example: wechat
|
|
62
|
+
- name: x-user-id
|
|
63
|
+
in: header
|
|
64
|
+
required: true
|
|
66
65
|
schema:
|
|
67
|
-
type:
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
type: string
|
|
67
|
+
- name: x-device-id
|
|
68
|
+
in: header
|
|
69
|
+
required: true
|
|
70
|
+
schema:
|
|
71
|
+
type: string
|
|
72
|
+
- name: x-channel
|
|
73
|
+
in: header
|
|
74
|
+
required: true
|
|
75
|
+
schema:
|
|
76
|
+
type: string
|
|
70
77
|
responses:
|
|
71
78
|
'200':
|
|
72
79
|
description: 解析成功
|
|
73
80
|
content:
|
|
74
81
|
application/json:
|
|
75
82
|
schema:
|
|
76
|
-
|
|
83
|
+
allOf:
|
|
84
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
85
|
+
- type: object
|
|
86
|
+
properties:
|
|
87
|
+
data:
|
|
88
|
+
$ref: '../components/schemas/_index.yaml#/ResolvePageResponse'
|
|
77
89
|
'400':
|
|
78
90
|
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
79
91
|
'404':
|
|
@@ -86,45 +98,36 @@ manifest:
|
|
|
86
98
|
tags: [Pages]
|
|
87
99
|
operationId: getPageManifest
|
|
88
100
|
summary: 获取组件清单
|
|
89
|
-
description:
|
|
90
|
-
返回页面的组件锁定清单(manifest),包含所有引用的组件版本和资源信息。
|
|
91
|
-
|
|
92
|
-
用途:
|
|
93
|
-
- Runtime 根据 manifest 预加载组件资源
|
|
94
|
-
- Editor 根据 manifest 展示组件依赖
|
|
101
|
+
description: 返回页面的组件锁定清单
|
|
95
102
|
parameters:
|
|
96
|
-
- name: X-Trace-Id
|
|
97
|
-
in: header
|
|
98
|
-
required: false
|
|
99
|
-
schema:
|
|
100
|
-
type: string
|
|
101
|
-
description: 链路追踪 ID(OTel,全链路透传)
|
|
102
103
|
- name: pageId
|
|
103
104
|
in: query
|
|
104
105
|
required: true
|
|
106
|
+
description: 页面 ID
|
|
105
107
|
schema:
|
|
106
108
|
type: string
|
|
107
|
-
|
|
109
|
+
example: page_123456
|
|
108
110
|
- name: env
|
|
109
111
|
in: query
|
|
110
112
|
required: false
|
|
113
|
+
description: 环境
|
|
111
114
|
schema:
|
|
112
115
|
type: string
|
|
113
116
|
enum: [prod, preview, staging]
|
|
114
117
|
default: prod
|
|
115
|
-
|
|
118
|
+
example: prod
|
|
116
119
|
responses:
|
|
117
120
|
'200':
|
|
118
121
|
description: 获取成功
|
|
119
122
|
content:
|
|
120
123
|
application/json:
|
|
121
124
|
schema:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
allOf:
|
|
126
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
127
|
+
- type: object
|
|
128
|
+
properties:
|
|
129
|
+
data:
|
|
130
|
+
$ref: '../components/schemas/_index.yaml#/ManifestResponse'
|
|
128
131
|
'400':
|
|
129
132
|
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
130
133
|
'404':
|
|
@@ -135,38 +138,28 @@ config:
|
|
|
135
138
|
tags: [Pages]
|
|
136
139
|
operationId: getPageConfig
|
|
137
140
|
summary: 获取运维配置
|
|
138
|
-
description:
|
|
139
|
-
返回当前运维配置(killSwitch、blockedComponents、featureFlags 等)。
|
|
140
|
-
|
|
141
|
-
用途:
|
|
142
|
-
- Runtime 启动时获取全局运维配置
|
|
143
|
-
- 判断是否有组件被阻断或功能被关闭
|
|
141
|
+
description: 返回当前运维配置(killSwitch、blockedComponents 等)
|
|
144
142
|
parameters:
|
|
145
|
-
- name: X-Trace-Id
|
|
146
|
-
in: header
|
|
147
|
-
required: false
|
|
148
|
-
schema:
|
|
149
|
-
type: string
|
|
150
|
-
description: 链路追踪 ID(OTel,全链路透传)
|
|
151
143
|
- name: env
|
|
152
144
|
in: query
|
|
153
145
|
required: false
|
|
146
|
+
description: 环境
|
|
154
147
|
schema:
|
|
155
148
|
type: string
|
|
156
149
|
enum: [prod, preview, staging]
|
|
157
150
|
default: prod
|
|
158
|
-
|
|
151
|
+
example: prod
|
|
159
152
|
responses:
|
|
160
153
|
'200':
|
|
161
154
|
description: 获取成功
|
|
162
155
|
content:
|
|
163
156
|
application/json:
|
|
164
157
|
schema:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
allOf:
|
|
159
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
160
|
+
- type: object
|
|
161
|
+
properties:
|
|
162
|
+
data:
|
|
163
|
+
$ref: '../components/schemas/_index.yaml#/OpsConfig'
|
|
171
164
|
'503':
|
|
172
165
|
$ref: '../components/responses/_index.yaml#/ServiceUnavailable'
|
|
@@ -4,23 +4,8 @@ query:
|
|
|
4
4
|
post:
|
|
5
5
|
tags: [Queries]
|
|
6
6
|
operationId: queryData
|
|
7
|
-
summary:
|
|
8
|
-
description:
|
|
9
|
-
Data Proxy 统一入口,所有数据查询都通过此接口执行。
|
|
10
|
-
|
|
11
|
-
功能:
|
|
12
|
-
- 白名单校验(queryVersionId 属于该 app/workspace)
|
|
13
|
-
- 字段裁剪、脱敏
|
|
14
|
-
- 缓存(短 TTL)
|
|
15
|
-
- 失败降级(兜底结构)
|
|
16
|
-
- 审计(可选,或采样)
|
|
17
|
-
|
|
18
|
-
支持的数据源类型:
|
|
19
|
-
- http: HTTP 接口
|
|
20
|
-
- graphql: GraphQL 查询
|
|
21
|
-
- database: 数据库查询(受限)
|
|
22
|
-
- internal: 内部服务
|
|
23
|
-
- aggregation: 聚合查询
|
|
7
|
+
summary: 执行数据查询
|
|
8
|
+
description: 通过 queryVersionId 查询数据
|
|
24
9
|
requestBody:
|
|
25
10
|
required: true
|
|
26
11
|
content:
|
|
@@ -33,53 +18,27 @@ query:
|
|
|
33
18
|
content:
|
|
34
19
|
application/json:
|
|
35
20
|
schema:
|
|
36
|
-
|
|
21
|
+
allOf:
|
|
22
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
23
|
+
- type: object
|
|
24
|
+
properties:
|
|
25
|
+
data:
|
|
26
|
+
$ref: '../components/schemas/_index.yaml#/QueryDataResponse'
|
|
37
27
|
'400':
|
|
38
28
|
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
39
29
|
'401':
|
|
40
30
|
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
41
|
-
'403':
|
|
42
|
-
$ref: '../components/responses/_index.yaml#/Forbidden'
|
|
43
|
-
'404':
|
|
44
|
-
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
45
|
-
'422':
|
|
46
|
-
$ref: '../components/responses/_index.yaml#/UnprocessableEntity'
|
|
47
31
|
'500':
|
|
48
32
|
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
definitions:
|
|
53
|
-
get:
|
|
54
|
-
tags: [Queries]
|
|
55
|
-
operationId: getQueryDefinition
|
|
56
|
-
summary: 获取查询定义
|
|
57
|
-
description: 获取指定数据查询定义版本的详细信息
|
|
58
|
-
parameters:
|
|
59
|
-
- name: queryVersionId
|
|
60
|
-
in: query
|
|
61
|
-
required: true
|
|
62
|
-
schema:
|
|
63
|
-
type: string
|
|
64
|
-
description: 查询定义版本 ID
|
|
65
|
-
responses:
|
|
66
|
-
'200':
|
|
67
|
-
description: 成功
|
|
68
|
-
content:
|
|
69
|
-
application/json:
|
|
70
|
-
schema:
|
|
71
|
-
$ref: '../components/schemas/_index.yaml#/QueryDefinitionResponse'
|
|
72
|
-
'404':
|
|
73
|
-
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
33
|
+
security:
|
|
34
|
+
- BearerAuth: []
|
|
74
35
|
|
|
75
36
|
batch:
|
|
76
37
|
post:
|
|
77
38
|
tags: [Queries]
|
|
78
39
|
operationId: batchQueryData
|
|
79
40
|
summary: 批量执行数据查询
|
|
80
|
-
description:
|
|
81
|
-
批量执行多个数据查询,用于页面初始化时预取多个数据源。
|
|
82
|
-
所有查询并行执行,部分失败不影响其他查询返回。
|
|
41
|
+
description: 批量执行多个数据查询,所有查询并行执行
|
|
83
42
|
requestBody:
|
|
84
43
|
required: true
|
|
85
44
|
content:
|
|
@@ -88,10 +47,46 @@ batch:
|
|
|
88
47
|
$ref: '../components/schemas/_index.yaml#/BatchQueryRequest'
|
|
89
48
|
responses:
|
|
90
49
|
'200':
|
|
91
|
-
description:
|
|
50
|
+
description: 批量查询成功
|
|
92
51
|
content:
|
|
93
52
|
application/json:
|
|
94
53
|
schema:
|
|
95
|
-
|
|
54
|
+
allOf:
|
|
55
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
56
|
+
- type: object
|
|
57
|
+
properties:
|
|
58
|
+
data:
|
|
59
|
+
$ref: '../components/schemas/_index.yaml#/BatchQueryResponse'
|
|
96
60
|
'400':
|
|
97
61
|
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
62
|
+
security:
|
|
63
|
+
- BearerAuth: []
|
|
64
|
+
|
|
65
|
+
definitions:
|
|
66
|
+
get:
|
|
67
|
+
tags: [Queries]
|
|
68
|
+
operationId: getQueryDefinition
|
|
69
|
+
summary: 获取查询定义
|
|
70
|
+
description: 按版本 ID 获取数据查询定义
|
|
71
|
+
parameters:
|
|
72
|
+
- name: queryVersionId
|
|
73
|
+
in: query
|
|
74
|
+
required: true
|
|
75
|
+
schema:
|
|
76
|
+
type: string
|
|
77
|
+
responses:
|
|
78
|
+
'200':
|
|
79
|
+
description: 获取查询定义成功
|
|
80
|
+
content:
|
|
81
|
+
application/json:
|
|
82
|
+
schema:
|
|
83
|
+
allOf:
|
|
84
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
85
|
+
- type: object
|
|
86
|
+
properties:
|
|
87
|
+
data:
|
|
88
|
+
$ref: '../components/schemas/_index.yaml#/QueryDefinitionResponse'
|
|
89
|
+
'404':
|
|
90
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
91
|
+
security:
|
|
92
|
+
- BearerAuth: []
|
|
@@ -2,47 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
resolve:
|
|
4
4
|
post:
|
|
5
|
-
tags:
|
|
6
|
-
- Tenant
|
|
7
|
-
summary: 解析租户信息
|
|
5
|
+
tags: [Tenant]
|
|
8
6
|
operationId: resolveTenant
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
用于:
|
|
13
|
-
- Runtime 初始化时获取应用配置
|
|
14
|
-
- 多租户场景下的应用隔离
|
|
7
|
+
summary: 解析租户信息
|
|
8
|
+
description: 根据 appKey 或 host 解析租户/应用信息
|
|
15
9
|
requestBody:
|
|
16
10
|
required: true
|
|
17
11
|
content:
|
|
18
12
|
application/json:
|
|
19
13
|
schema:
|
|
20
|
-
|
|
21
|
-
properties:
|
|
22
|
-
appKey:
|
|
23
|
-
type: string
|
|
24
|
-
description: 应用密钥
|
|
25
|
-
host:
|
|
26
|
-
type: string
|
|
27
|
-
description: 请求来源域名
|
|
28
|
-
channel:
|
|
29
|
-
type: string
|
|
30
|
-
description: 渠道标识
|
|
31
|
-
anyOf:
|
|
32
|
-
- required: [appKey]
|
|
33
|
-
- required: [host]
|
|
14
|
+
$ref: '../components/schemas/_index.yaml#/ResolveTenantRequest'
|
|
34
15
|
responses:
|
|
35
16
|
'200':
|
|
36
17
|
description: 解析成功
|
|
37
18
|
content:
|
|
38
19
|
application/json:
|
|
39
20
|
schema:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
21
|
+
allOf:
|
|
22
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
23
|
+
- type: object
|
|
24
|
+
properties:
|
|
25
|
+
data:
|
|
26
|
+
$ref: '../components/schemas/_index.yaml#/ResolveTenantResponse'
|
|
46
27
|
'400':
|
|
47
28
|
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
48
29
|
'404':
|
|
@@ -55,38 +36,33 @@ resolve:
|
|
|
55
36
|
|
|
56
37
|
config:
|
|
57
38
|
get:
|
|
58
|
-
tags:
|
|
59
|
-
- Tenant
|
|
60
|
-
summary: 获取租户配置
|
|
39
|
+
tags: [Tenant]
|
|
61
40
|
operationId: getTenantConfig
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
包括:
|
|
66
|
-
- 功能开关
|
|
67
|
-
- 主题配置
|
|
68
|
-
- CDN 域名
|
|
69
|
-
- 阻断组件列表
|
|
70
|
-
- Kill Switch 状态
|
|
41
|
+
summary: 获取租户配置
|
|
42
|
+
description: 获取当前租户的运行时配置
|
|
71
43
|
parameters:
|
|
44
|
+
- name: x-app-id
|
|
45
|
+
in: header
|
|
46
|
+
required: true
|
|
47
|
+
schema:
|
|
48
|
+
type: string
|
|
72
49
|
- name: X-App-Id
|
|
73
50
|
in: header
|
|
74
51
|
required: true
|
|
75
52
|
schema:
|
|
76
53
|
type: string
|
|
77
|
-
description: 应用 ID
|
|
78
54
|
responses:
|
|
79
55
|
'200':
|
|
80
|
-
description:
|
|
56
|
+
description: 获取成功
|
|
81
57
|
content:
|
|
82
58
|
application/json:
|
|
83
59
|
schema:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
60
|
+
allOf:
|
|
61
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
62
|
+
- type: object
|
|
63
|
+
properties:
|
|
64
|
+
data:
|
|
65
|
+
$ref: '../components/schemas/_index.yaml#/TenantConfigResponse'
|
|
90
66
|
'401':
|
|
91
67
|
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
92
68
|
'404':
|
|
@@ -2,55 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
track:
|
|
4
4
|
post:
|
|
5
|
-
tags:
|
|
6
|
-
- Track
|
|
7
|
-
summary: 埋点上报
|
|
5
|
+
tags: [Track]
|
|
8
6
|
operationId: track
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
特点:
|
|
13
|
-
- 高性能:不阻塞主链路
|
|
14
|
-
- 可靠:通过 Outbox 异步持久化
|
|
15
|
-
- 可追溯:自动关联 pageVersionId/componentVersionId/traceId
|
|
7
|
+
summary: 单个埋点上报
|
|
8
|
+
description: 接收客户端埋点数据,异步处理
|
|
16
9
|
requestBody:
|
|
17
10
|
required: true
|
|
18
11
|
content:
|
|
19
12
|
application/json:
|
|
20
13
|
schema:
|
|
21
|
-
$ref: '../components/schemas/_index.yaml#/
|
|
14
|
+
$ref: '../components/schemas/_index.yaml#/TrackSingleRequest'
|
|
22
15
|
responses:
|
|
23
16
|
'202':
|
|
24
17
|
description: 接收成功(异步处理)
|
|
25
18
|
content:
|
|
26
19
|
application/json:
|
|
27
20
|
schema:
|
|
28
|
-
|
|
29
|
-
properties:
|
|
30
|
-
success:
|
|
31
|
-
type: boolean
|
|
32
|
-
example: true
|
|
33
|
-
data:
|
|
34
|
-
type: object
|
|
35
|
-
properties:
|
|
36
|
-
eventId:
|
|
37
|
-
type: string
|
|
38
|
-
description: 事件 ID
|
|
21
|
+
$ref: '../components/schemas/_index.yaml#/TrackSingleResponse'
|
|
39
22
|
'400':
|
|
40
23
|
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
41
24
|
|
|
42
25
|
trackBatch:
|
|
43
26
|
post:
|
|
44
|
-
tags:
|
|
45
|
-
- Track
|
|
46
|
-
summary: 批量埋点上报
|
|
27
|
+
tags: [Track]
|
|
47
28
|
operationId: trackBatch
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
限制:
|
|
52
|
-
- 单次最多 100 条
|
|
53
|
-
- 单条事件不超过 10KB
|
|
29
|
+
summary: 批量埋点上报
|
|
30
|
+
description: 批量接收客户端埋点数据,提高上报效率
|
|
54
31
|
requestBody:
|
|
55
32
|
required: true
|
|
56
33
|
content:
|
|
@@ -63,27 +40,6 @@ trackBatch:
|
|
|
63
40
|
content:
|
|
64
41
|
application/json:
|
|
65
42
|
schema:
|
|
66
|
-
|
|
67
|
-
properties:
|
|
68
|
-
success:
|
|
69
|
-
type: boolean
|
|
70
|
-
data:
|
|
71
|
-
type: object
|
|
72
|
-
properties:
|
|
73
|
-
accepted:
|
|
74
|
-
type: integer
|
|
75
|
-
description: 接收的事件数量
|
|
76
|
-
rejected:
|
|
77
|
-
type: integer
|
|
78
|
-
description: 拒绝的事件数量
|
|
79
|
-
errors:
|
|
80
|
-
type: array
|
|
81
|
-
items:
|
|
82
|
-
type: object
|
|
83
|
-
properties:
|
|
84
|
-
index:
|
|
85
|
-
type: integer
|
|
86
|
-
reason:
|
|
87
|
-
type: string
|
|
43
|
+
$ref: '../components/schemas/_index.yaml#/TrackBatchResponse'
|
|
88
44
|
'400':
|
|
89
45
|
$ref: '../components/responses/_index.yaml#/BadRequest'
|