@djvlc/openapi-user-client 1.7.9 → 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 +1886 -2591
- package/dist/index.d.ts +1886 -2591
- package/dist/index.js +1414 -2073
- package/dist/index.mjs +1240 -1833
- package/openapi/dist/user-api.yaml +1511 -1286
- package/openapi/src/components/responses/_index.yaml +50 -9
- package/openapi/src/components/schemas/_index.yaml +521 -260
- package/openapi/src/openapi.yaml +2 -4
- package/openapi/src/paths/pages.yaml +50 -45
- package/package.json +2 -2
|
@@ -4,144 +4,317 @@
|
|
|
4
4
|
# 通用
|
|
5
5
|
# ============================================================================
|
|
6
6
|
|
|
7
|
+
# ============================================================================
|
|
8
|
+
# 统一响应结构(与 platform 仓库保持一致)
|
|
9
|
+
# ============================================================================
|
|
10
|
+
|
|
11
|
+
SuccessResponse:
|
|
12
|
+
type: object
|
|
13
|
+
required: [success, code, message, data, timestamp, path]
|
|
14
|
+
description: 成功响应(ApiSuccessResponse,与 types/src/common/api.ts 保持一致)
|
|
15
|
+
properties:
|
|
16
|
+
success:
|
|
17
|
+
type: boolean
|
|
18
|
+
enum: [true]
|
|
19
|
+
example: true
|
|
20
|
+
description: 是否成功(固定为 true)
|
|
21
|
+
code:
|
|
22
|
+
type: string
|
|
23
|
+
example: OK
|
|
24
|
+
description: 业务状态码
|
|
25
|
+
message:
|
|
26
|
+
type: string
|
|
27
|
+
example: 操作成功
|
|
28
|
+
description: 响应消息
|
|
29
|
+
data:
|
|
30
|
+
description: 响应数据(泛型 T)
|
|
31
|
+
timestamp:
|
|
32
|
+
type: integer
|
|
33
|
+
format: int64
|
|
34
|
+
example: 1702300000000
|
|
35
|
+
description: 响应时间戳(Unix 毫秒时间戳,number)
|
|
36
|
+
path:
|
|
37
|
+
type: string
|
|
38
|
+
example: /api/user/pages/resolve
|
|
39
|
+
description: 请求路径
|
|
40
|
+
requestId:
|
|
41
|
+
type: string
|
|
42
|
+
example: uuid-string
|
|
43
|
+
description: 请求 ID(可选)
|
|
44
|
+
|
|
7
45
|
ErrorResponse:
|
|
8
46
|
type: object
|
|
9
|
-
required: [code, message]
|
|
47
|
+
required: [success, code, message, timestamp, path]
|
|
48
|
+
description: 错误响应(ApiErrorResponse,与 types/src/common/api.ts 保持一致)
|
|
10
49
|
properties:
|
|
50
|
+
success:
|
|
51
|
+
type: boolean
|
|
52
|
+
enum: [false]
|
|
53
|
+
example: false
|
|
54
|
+
description: 是否成功(固定为 false)
|
|
11
55
|
code:
|
|
12
56
|
type: string
|
|
13
|
-
|
|
57
|
+
example: VALIDATION_INVALID_PARAMS
|
|
58
|
+
description: 错误码(ErrorCode | string)
|
|
14
59
|
message:
|
|
15
60
|
type: string
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
description:
|
|
61
|
+
example: 请求参数无效
|
|
62
|
+
description: 错误消息(用户可读)
|
|
63
|
+
data:
|
|
64
|
+
type: object
|
|
65
|
+
additionalProperties: true
|
|
66
|
+
description: 错误详情(验证错误时使用 ApiErrorDetail[],其他情况使用 unknown,放在 data 字段中)
|
|
67
|
+
timestamp:
|
|
68
|
+
type: integer
|
|
69
|
+
format: int64
|
|
70
|
+
example: 1702300000000
|
|
71
|
+
description: 响应时间戳(Unix 毫秒时间戳,number)
|
|
72
|
+
path:
|
|
73
|
+
type: string
|
|
74
|
+
example: /api/user/pages/resolve
|
|
75
|
+
description: 请求路径
|
|
76
|
+
requestId:
|
|
77
|
+
type: string
|
|
78
|
+
example: uuid-string
|
|
79
|
+
description: 请求 ID(可选)
|
|
27
80
|
traceId:
|
|
28
81
|
type: string
|
|
29
|
-
|
|
82
|
+
example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
|
|
83
|
+
description: 链路追踪 ID(可选,用于分布式追踪)
|
|
84
|
+
|
|
85
|
+
ErrorDetail:
|
|
86
|
+
type: object
|
|
87
|
+
required: [message]
|
|
88
|
+
description: 错误详情(ApiErrorDetail,与 types/src/common/api.ts 保持一致)
|
|
89
|
+
properties:
|
|
90
|
+
field:
|
|
91
|
+
type: string
|
|
92
|
+
description: 字段路径(可选)
|
|
93
|
+
message:
|
|
94
|
+
type: string
|
|
95
|
+
description: 错误消息(必填)
|
|
96
|
+
code:
|
|
97
|
+
type: string
|
|
98
|
+
description: 错误码(可选)
|
|
30
99
|
|
|
31
100
|
# ============================================================================
|
|
32
101
|
# 页面相关
|
|
33
102
|
# ============================================================================
|
|
34
103
|
|
|
35
104
|
PageResponse:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
data:
|
|
40
|
-
type: object
|
|
41
|
-
required: [pageId, version, meta]
|
|
105
|
+
allOf:
|
|
106
|
+
- $ref: '#/SuccessResponse'
|
|
107
|
+
- type: object
|
|
42
108
|
properties:
|
|
43
|
-
|
|
44
|
-
type: string
|
|
45
|
-
description: 页面 ID
|
|
46
|
-
version:
|
|
47
|
-
type: string
|
|
48
|
-
description: 页面版本
|
|
49
|
-
meta:
|
|
109
|
+
data:
|
|
50
110
|
type: object
|
|
111
|
+
required: [pageId, version, meta]
|
|
51
112
|
properties:
|
|
52
|
-
|
|
113
|
+
pageId:
|
|
53
114
|
type: string
|
|
54
|
-
description:
|
|
55
|
-
|
|
115
|
+
description: 页面 ID
|
|
116
|
+
version:
|
|
56
117
|
type: string
|
|
57
|
-
description:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
prefetchData:
|
|
71
|
-
type: boolean
|
|
72
|
-
default: true
|
|
73
|
-
description: 是否预取数据
|
|
74
|
-
includeManifests:
|
|
75
|
-
type: boolean
|
|
76
|
-
default: true
|
|
77
|
-
description: 是否包含资源清单
|
|
78
|
-
locale:
|
|
79
|
-
type: string
|
|
80
|
-
description: 语言环境
|
|
81
|
-
|
|
82
|
-
ResolveContext:
|
|
83
|
-
type: object
|
|
84
|
-
description: 页面解析上下文
|
|
85
|
-
properties:
|
|
86
|
-
userId:
|
|
87
|
-
type: string
|
|
88
|
-
description: 用户 ID
|
|
89
|
-
sessionId:
|
|
90
|
-
type: string
|
|
91
|
-
description: 会话 ID
|
|
92
|
-
deviceId:
|
|
93
|
-
type: string
|
|
94
|
-
description: 设备 ID
|
|
95
|
-
deviceType:
|
|
96
|
-
type: string
|
|
97
|
-
enum: [mobile, tablet, desktop]
|
|
98
|
-
description: 设备类型
|
|
99
|
-
channel:
|
|
100
|
-
type: string
|
|
101
|
-
description: 渠道标识
|
|
102
|
-
urlParams:
|
|
103
|
-
type: object
|
|
104
|
-
additionalProperties:
|
|
105
|
-
type: string
|
|
106
|
-
description: URL 参数
|
|
107
|
-
routeParams:
|
|
108
|
-
type: object
|
|
109
|
-
additionalProperties:
|
|
110
|
-
type: string
|
|
111
|
-
description: 路由参数
|
|
112
|
-
customData:
|
|
113
|
-
type: object
|
|
114
|
-
additionalProperties: true
|
|
115
|
-
description: 自定义上下文数据
|
|
118
|
+
description: 页面版本
|
|
119
|
+
meta:
|
|
120
|
+
type: object
|
|
121
|
+
properties:
|
|
122
|
+
title:
|
|
123
|
+
type: string
|
|
124
|
+
description: 页面标题
|
|
125
|
+
description:
|
|
126
|
+
type: string
|
|
127
|
+
description: 页面描述
|
|
128
|
+
integrity:
|
|
129
|
+
type: string
|
|
130
|
+
description: 完整性哈希
|
|
116
131
|
|
|
117
132
|
ResolvePageResponse:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
data:
|
|
122
|
-
type: object
|
|
123
|
-
required: [pageId, pageVersionId, schema]
|
|
133
|
+
allOf:
|
|
134
|
+
- $ref: '#/SuccessResponse'
|
|
135
|
+
- type: object
|
|
124
136
|
properties:
|
|
125
|
-
|
|
126
|
-
type: string
|
|
127
|
-
description: 页面 ID
|
|
128
|
-
pageVersionId:
|
|
129
|
-
type: string
|
|
130
|
-
description: 页面版本 ID(不可变)
|
|
131
|
-
schemaVersion:
|
|
132
|
-
type: string
|
|
133
|
-
description: Schema 版本
|
|
134
|
-
schema:
|
|
135
|
-
type: object
|
|
136
|
-
description: 解析后的页面 Schema
|
|
137
|
-
manifests:
|
|
138
|
-
$ref: '#/ResourceManifests'
|
|
139
|
-
prefetchedData:
|
|
137
|
+
data:
|
|
140
138
|
type: object
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
required: [pageId, resolvedVersionId, cdnBase, snapshotUrl, manifestUrl, ops, etag, cacheTtlSeconds]
|
|
140
|
+
properties:
|
|
141
|
+
pageId:
|
|
142
|
+
type: string
|
|
143
|
+
description: 页面 ID(UniqueId)
|
|
144
|
+
resolvedVersionId:
|
|
145
|
+
type: string
|
|
146
|
+
description: 解析后的页面版本 ID(考虑灰度/回滚后的实际版本,UniqueId)
|
|
147
|
+
cdnBase:
|
|
148
|
+
type: string
|
|
149
|
+
format: uri
|
|
150
|
+
description: CDN 基础地址
|
|
151
|
+
snapshotUrl:
|
|
152
|
+
type: string
|
|
153
|
+
format: uri
|
|
154
|
+
description: snapshot.json 的完整 URL
|
|
155
|
+
manifestUrl:
|
|
156
|
+
type: string
|
|
157
|
+
format: uri
|
|
158
|
+
description: manifest.json 的完整 URL
|
|
159
|
+
ops:
|
|
160
|
+
$ref: '#/OpsConfig'
|
|
161
|
+
description: 运维配置(killSwitch、blockedComponents、flags)
|
|
162
|
+
etag:
|
|
163
|
+
type: string
|
|
164
|
+
description: 内容哈希(用于缓存验证)
|
|
165
|
+
cacheTtlSeconds:
|
|
166
|
+
type: integer
|
|
167
|
+
minimum: 0
|
|
168
|
+
maximum: 300
|
|
169
|
+
default: 30
|
|
170
|
+
description: 缓存 TTL(秒),建议 10~30 秒
|
|
171
|
+
rolloutMatch:
|
|
172
|
+
type: object
|
|
173
|
+
description: 灰度匹配信息(可选,用于调试)
|
|
174
|
+
properties:
|
|
175
|
+
strategyId:
|
|
176
|
+
type: string
|
|
177
|
+
description: 匹配的策略 ID
|
|
178
|
+
strategyName:
|
|
179
|
+
type: string
|
|
180
|
+
description: 匹配的策略名称
|
|
181
|
+
isDefault:
|
|
182
|
+
type: boolean
|
|
183
|
+
description: 是否使用默认版本
|
|
184
|
+
snapshot:
|
|
185
|
+
type: object
|
|
186
|
+
description: 完整快照(仅当 includeSnapshot=1 时返回,CDN 失败保底使用)
|
|
187
|
+
properties:
|
|
188
|
+
page:
|
|
189
|
+
type: object
|
|
190
|
+
description: 页面 Schema(PageSnapshotPage)
|
|
191
|
+
properties:
|
|
192
|
+
schemaVersion:
|
|
193
|
+
type: string
|
|
194
|
+
pageId:
|
|
195
|
+
type: string
|
|
196
|
+
pageVersion:
|
|
197
|
+
type: string
|
|
198
|
+
pattern: '^\d+\.\d+\.\d+$'
|
|
199
|
+
title:
|
|
200
|
+
type: string
|
|
201
|
+
initialState:
|
|
202
|
+
type: object
|
|
203
|
+
additionalProperties: true
|
|
204
|
+
bindings:
|
|
205
|
+
type: array
|
|
206
|
+
items:
|
|
207
|
+
type: object
|
|
208
|
+
root:
|
|
209
|
+
type: object
|
|
210
|
+
config:
|
|
211
|
+
type: object
|
|
212
|
+
manifest:
|
|
213
|
+
type: object
|
|
214
|
+
description: 组件锁定清单(PageSnapshotManifest)
|
|
215
|
+
properties:
|
|
216
|
+
components:
|
|
217
|
+
type: array
|
|
218
|
+
items:
|
|
219
|
+
type: object
|
|
220
|
+
properties:
|
|
221
|
+
name:
|
|
222
|
+
type: string
|
|
223
|
+
version:
|
|
224
|
+
type: string
|
|
225
|
+
pattern: '^\d+\.\d+\.\d+$'
|
|
226
|
+
integrity:
|
|
227
|
+
type: string
|
|
228
|
+
pattern: '^sha(256|384|512)-'
|
|
229
|
+
assetsUrl:
|
|
230
|
+
type: string
|
|
231
|
+
format: uri
|
|
232
|
+
entrypoints:
|
|
233
|
+
type: object
|
|
234
|
+
properties:
|
|
235
|
+
js:
|
|
236
|
+
type: string
|
|
237
|
+
css:
|
|
238
|
+
type: string
|
|
239
|
+
chunks:
|
|
240
|
+
type: array
|
|
241
|
+
items:
|
|
242
|
+
type: string
|
|
243
|
+
runtime:
|
|
244
|
+
type: object
|
|
245
|
+
properties:
|
|
246
|
+
version:
|
|
247
|
+
type: string
|
|
248
|
+
pattern: '^\d+\.\d+\.\d+$'
|
|
249
|
+
minVersion:
|
|
250
|
+
type: string
|
|
251
|
+
pattern: '^\d+\.\d+\.\d+$'
|
|
252
|
+
definitionsDigest:
|
|
253
|
+
type: object
|
|
254
|
+
description: 绑定的 Definition 版本摘要(DefinitionsDigest)
|
|
255
|
+
properties:
|
|
256
|
+
actions:
|
|
257
|
+
type: array
|
|
258
|
+
items:
|
|
259
|
+
type: object
|
|
260
|
+
properties:
|
|
261
|
+
id:
|
|
262
|
+
type: string
|
|
263
|
+
name:
|
|
264
|
+
type: string
|
|
265
|
+
versionId:
|
|
266
|
+
type: string
|
|
267
|
+
hash:
|
|
268
|
+
type: string
|
|
269
|
+
queries:
|
|
270
|
+
type: array
|
|
271
|
+
items:
|
|
272
|
+
type: object
|
|
273
|
+
properties:
|
|
274
|
+
id:
|
|
275
|
+
type: string
|
|
276
|
+
name:
|
|
277
|
+
type: string
|
|
278
|
+
versionId:
|
|
279
|
+
type: string
|
|
280
|
+
hash:
|
|
281
|
+
type: string
|
|
282
|
+
meta:
|
|
283
|
+
type: object
|
|
284
|
+
description: 元数据(PageSnapshotMeta)
|
|
285
|
+
properties:
|
|
286
|
+
pageId:
|
|
287
|
+
type: string
|
|
288
|
+
pageVersionId:
|
|
289
|
+
type: string
|
|
290
|
+
publishId:
|
|
291
|
+
type: string
|
|
292
|
+
schemaVersion:
|
|
293
|
+
type: string
|
|
294
|
+
createdAt:
|
|
295
|
+
type: string
|
|
296
|
+
format: date-time
|
|
297
|
+
createdBy:
|
|
298
|
+
type: string
|
|
299
|
+
contentHash:
|
|
300
|
+
type: string
|
|
301
|
+
bindings:
|
|
302
|
+
type: object
|
|
303
|
+
properties:
|
|
304
|
+
componentVersions:
|
|
305
|
+
type: array
|
|
306
|
+
items:
|
|
307
|
+
type: string
|
|
308
|
+
definitionVersions:
|
|
309
|
+
type: array
|
|
310
|
+
items:
|
|
311
|
+
type: string
|
|
312
|
+
runtimeVersion:
|
|
313
|
+
type: string
|
|
314
|
+
pattern: '^\d+\.\d+\.\d+$'
|
|
315
|
+
env:
|
|
316
|
+
type: string
|
|
317
|
+
enum: [preview, staging, prod]
|
|
145
318
|
|
|
146
319
|
ResourceManifests:
|
|
147
320
|
type: object
|
|
@@ -224,20 +397,31 @@ QueryManifest:
|
|
|
224
397
|
|
|
225
398
|
OpsConfig:
|
|
226
399
|
type: object
|
|
227
|
-
description:
|
|
400
|
+
description: 运维配置(运行时下发)
|
|
401
|
+
required: [killSwitch, blockedComponents, flags]
|
|
228
402
|
properties:
|
|
229
403
|
killSwitch:
|
|
230
|
-
type: boolean
|
|
231
|
-
description: Kill Switch 是否启用
|
|
232
|
-
fallbackUrl:
|
|
233
|
-
type: string
|
|
234
|
-
format: uri
|
|
235
|
-
description: 降级跳转 URL
|
|
236
|
-
blockedComponents:
|
|
237
404
|
type: array
|
|
238
405
|
items:
|
|
239
406
|
type: string
|
|
407
|
+
description: Kill Switch 列表(被阻断的 actionType/componentType)
|
|
408
|
+
blockedComponents:
|
|
409
|
+
type: array
|
|
410
|
+
items:
|
|
411
|
+
type: object
|
|
412
|
+
properties:
|
|
413
|
+
componentName:
|
|
414
|
+
type: string
|
|
415
|
+
componentVersion:
|
|
416
|
+
type: string
|
|
417
|
+
reason:
|
|
418
|
+
type: string
|
|
240
419
|
description: 被阻断的组件列表
|
|
420
|
+
flags:
|
|
421
|
+
type: object
|
|
422
|
+
additionalProperties:
|
|
423
|
+
type: boolean
|
|
424
|
+
description: 功能开关(Feature Flags)
|
|
241
425
|
|
|
242
426
|
# ============================================================================
|
|
243
427
|
# Action Gateway 动作相关
|
|
@@ -245,113 +429,104 @@ OpsConfig:
|
|
|
245
429
|
|
|
246
430
|
ExecuteActionRequest:
|
|
247
431
|
type: object
|
|
248
|
-
required: [actionType, params]
|
|
432
|
+
required: [actionType, params, context]
|
|
433
|
+
description: 动作执行请求(ActionExecuteRequest)
|
|
249
434
|
properties:
|
|
250
435
|
actionType:
|
|
251
436
|
type: string
|
|
252
437
|
enum: [claim, signin, lottery, reserve, bind, task_complete, vote, share, form_submit, navigate, setState, showToast, refreshData, custom]
|
|
253
|
-
description:
|
|
438
|
+
description: 动作类型(ActionType | string)
|
|
254
439
|
actionDefinitionVersionId:
|
|
255
440
|
type: string
|
|
256
|
-
description: 动作定义版本 ID
|
|
441
|
+
description: 动作定义版本 ID(可选,不提供则使用最新稳定版,UniqueId)
|
|
257
442
|
params:
|
|
258
443
|
type: object
|
|
259
444
|
additionalProperties: true
|
|
260
|
-
description:
|
|
445
|
+
description: 动作参数(Record<string, JsonValue>)
|
|
261
446
|
context:
|
|
262
447
|
$ref: '#/ActionContext'
|
|
448
|
+
description: 客户端上下文(ActionClientContext,必填)
|
|
263
449
|
idempotencyKey:
|
|
264
450
|
type: string
|
|
265
451
|
minLength: 16
|
|
266
452
|
maxLength: 128
|
|
267
|
-
description:
|
|
268
|
-
options:
|
|
269
|
-
type: object
|
|
270
|
-
properties:
|
|
271
|
-
timeout:
|
|
272
|
-
type: integer
|
|
273
|
-
minimum: 1000
|
|
274
|
-
maximum: 30000
|
|
275
|
-
default: 10000
|
|
276
|
-
description: 执行超时(毫秒)
|
|
277
|
-
skipRisk:
|
|
278
|
-
type: boolean
|
|
279
|
-
default: false
|
|
280
|
-
description: 是否跳过风控(需特殊权限)
|
|
453
|
+
description: 幂等键(部分策略需要客户端提供,防重复提交)
|
|
281
454
|
|
|
282
455
|
ActionContext:
|
|
283
456
|
type: object
|
|
284
|
-
description:
|
|
457
|
+
description: 动作执行上下文(ActionClientContext,问题追溯必须字段)
|
|
285
458
|
required: [pageVersionId]
|
|
286
459
|
properties:
|
|
287
460
|
pageVersionId:
|
|
288
461
|
type: string
|
|
289
|
-
description: 页面版本 ID
|
|
462
|
+
description: 页面版本 ID(不可变,UniqueId)
|
|
290
463
|
componentVersionId:
|
|
291
464
|
type: string
|
|
292
|
-
description:
|
|
293
|
-
|
|
294
|
-
type: string
|
|
295
|
-
description: 动作实例 ID
|
|
296
|
-
traceId:
|
|
465
|
+
description: 组件版本 ID(UniqueId)
|
|
466
|
+
componentInstanceId:
|
|
297
467
|
type: string
|
|
298
|
-
description:
|
|
299
|
-
|
|
468
|
+
description: 组件实例 ID(UniqueId)
|
|
469
|
+
triggerEvent:
|
|
300
470
|
type: string
|
|
301
|
-
description:
|
|
471
|
+
description: 触发事件名
|
|
302
472
|
deviceId:
|
|
303
473
|
type: string
|
|
304
474
|
description: 设备 ID
|
|
305
475
|
channel:
|
|
306
476
|
type: string
|
|
307
477
|
description: 渠道标识
|
|
308
|
-
|
|
309
|
-
type: string
|
|
310
|
-
description: 会话 ID
|
|
311
|
-
eventName:
|
|
312
|
-
type: string
|
|
313
|
-
description: 触发事件名
|
|
314
|
-
timestamp:
|
|
478
|
+
clientTimestamp:
|
|
315
479
|
type: string
|
|
316
480
|
format: date-time
|
|
317
|
-
description:
|
|
318
|
-
|
|
481
|
+
description: 客户端时间戳(ISODateTime)
|
|
482
|
+
extra:
|
|
319
483
|
type: object
|
|
320
484
|
additionalProperties: true
|
|
321
|
-
description:
|
|
485
|
+
description: 扩展数据(Record<string, JsonValue>)
|
|
322
486
|
|
|
323
487
|
ExecuteActionResponse:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
success:
|
|
328
|
-
type: boolean
|
|
329
|
-
description: 是否成功
|
|
330
|
-
data:
|
|
331
|
-
type: object
|
|
332
|
-
properties:
|
|
333
|
-
actionId:
|
|
334
|
-
type: string
|
|
335
|
-
description: 动作执行 ID
|
|
336
|
-
result:
|
|
337
|
-
description: 执行结果
|
|
338
|
-
effects:
|
|
339
|
-
type: array
|
|
340
|
-
items:
|
|
341
|
-
$ref: '#/ActionEffect'
|
|
342
|
-
description: 副作用列表
|
|
343
|
-
meta:
|
|
344
|
-
type: object
|
|
488
|
+
allOf:
|
|
489
|
+
- $ref: '#/SuccessResponse'
|
|
490
|
+
- type: object
|
|
345
491
|
properties:
|
|
346
|
-
|
|
347
|
-
type:
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
492
|
+
data:
|
|
493
|
+
type: object
|
|
494
|
+
properties:
|
|
495
|
+
actionId:
|
|
496
|
+
type: string
|
|
497
|
+
description: 动作执行 ID(UniqueId,用于审计追溯)
|
|
498
|
+
result:
|
|
499
|
+
description: 执行结果(泛型 T)
|
|
500
|
+
effects:
|
|
501
|
+
type: array
|
|
502
|
+
items:
|
|
503
|
+
$ref: '#/ActionEffect'
|
|
504
|
+
description: 副作用列表
|
|
505
|
+
errorCode:
|
|
506
|
+
type: string
|
|
507
|
+
description: 错误码(失败时)
|
|
508
|
+
errorMessage:
|
|
509
|
+
type: string
|
|
510
|
+
description: 错误消息(失败时,用户可见)
|
|
511
|
+
errorDetails:
|
|
512
|
+
type: object
|
|
513
|
+
additionalProperties: true
|
|
514
|
+
description: 错误详情(失败时,调试用)
|
|
515
|
+
requestId:
|
|
516
|
+
type: string
|
|
517
|
+
description: 请求 ID
|
|
518
|
+
traceId:
|
|
519
|
+
type: string
|
|
520
|
+
description: 链路追踪 ID
|
|
521
|
+
duration:
|
|
522
|
+
type: integer
|
|
523
|
+
description: 执行耗时(毫秒)
|
|
524
|
+
retryable:
|
|
525
|
+
type: boolean
|
|
526
|
+
description: 是否可重试
|
|
527
|
+
retryAfter:
|
|
528
|
+
type: integer
|
|
529
|
+
description: 建议重试延迟(毫秒)
|
|
355
530
|
|
|
356
531
|
ActionEffect:
|
|
357
532
|
type: object
|
|
@@ -458,84 +633,82 @@ ActionDefinitionResponse:
|
|
|
458
633
|
QueryDataRequest:
|
|
459
634
|
type: object
|
|
460
635
|
required: [queryVersionId]
|
|
636
|
+
description: 数据查询请求(DataQueryRequest)
|
|
461
637
|
properties:
|
|
462
638
|
queryVersionId:
|
|
463
639
|
type: string
|
|
464
|
-
description: 查询定义版本 ID
|
|
640
|
+
description: 查询定义版本 ID(UniqueId)
|
|
465
641
|
params:
|
|
466
642
|
type: object
|
|
467
643
|
additionalProperties: true
|
|
468
|
-
description:
|
|
469
|
-
|
|
470
|
-
$ref: '#/QueryContext'
|
|
471
|
-
options:
|
|
644
|
+
description: 查询参数(Record<string, JsonValue>)
|
|
645
|
+
cacheControl:
|
|
472
646
|
type: object
|
|
647
|
+
description: 缓存策略覆盖
|
|
473
648
|
properties:
|
|
474
|
-
|
|
475
|
-
type: integer
|
|
476
|
-
minimum: 1000
|
|
477
|
-
maximum: 60000
|
|
478
|
-
default: 30000
|
|
479
|
-
description: 查询超时(毫秒)
|
|
480
|
-
cache:
|
|
649
|
+
noCache:
|
|
481
650
|
type: boolean
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
651
|
+
description: 是否跳过缓存
|
|
652
|
+
forceRefresh:
|
|
653
|
+
type: boolean
|
|
654
|
+
description: 强制刷新缓存
|
|
655
|
+
context:
|
|
656
|
+
$ref: '#/QueryContext'
|
|
657
|
+
description: 客户端上下文(可选)
|
|
487
658
|
|
|
488
659
|
QueryContext:
|
|
489
660
|
type: object
|
|
661
|
+
description: 数据查询上下文(DataQueryRequest.context)
|
|
490
662
|
properties:
|
|
491
663
|
pageVersionId:
|
|
492
664
|
type: string
|
|
493
|
-
description: 页面版本 ID
|
|
494
|
-
|
|
495
|
-
type: string
|
|
496
|
-
description: 用户 ID
|
|
497
|
-
sessionId:
|
|
498
|
-
type: string
|
|
499
|
-
description: 会话 ID
|
|
500
|
-
traceId:
|
|
665
|
+
description: 页面版本 ID(UniqueId)
|
|
666
|
+
componentVersionId:
|
|
501
667
|
type: string
|
|
502
|
-
description:
|
|
668
|
+
description: 组件版本 ID(UniqueId,可选)
|
|
503
669
|
|
|
504
670
|
QueryDataResponse:
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
success:
|
|
509
|
-
type: boolean
|
|
510
|
-
data:
|
|
511
|
-
description: 查询结果数据
|
|
512
|
-
meta:
|
|
513
|
-
type: object
|
|
671
|
+
allOf:
|
|
672
|
+
- $ref: '#/SuccessResponse'
|
|
673
|
+
- type: object
|
|
514
674
|
properties:
|
|
515
|
-
|
|
675
|
+
data:
|
|
676
|
+
description: 查询结果数据(泛型 T)
|
|
677
|
+
# 错误信息(失败时)
|
|
678
|
+
errorCode:
|
|
679
|
+
type: string
|
|
680
|
+
description: 错误码(失败时)
|
|
681
|
+
errorMessage:
|
|
682
|
+
type: string
|
|
683
|
+
description: 错误消息(失败时)
|
|
684
|
+
# 缓存信息
|
|
685
|
+
fromCache:
|
|
516
686
|
type: boolean
|
|
517
687
|
description: 是否来自缓存
|
|
518
688
|
cachedAt:
|
|
519
689
|
type: string
|
|
520
690
|
format: date-time
|
|
521
|
-
description:
|
|
522
|
-
|
|
691
|
+
description: 缓存时间戳(ISODateTime)
|
|
692
|
+
age:
|
|
523
693
|
type: integer
|
|
524
|
-
description:
|
|
694
|
+
description: 数据新鲜度(秒)
|
|
695
|
+
# 追踪信息
|
|
696
|
+
requestId:
|
|
697
|
+
type: string
|
|
698
|
+
description: 请求 ID
|
|
525
699
|
traceId:
|
|
526
700
|
type: string
|
|
527
|
-
description:
|
|
528
|
-
|
|
529
|
-
type:
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
type: boolean
|
|
701
|
+
description: 链路追踪 ID
|
|
702
|
+
duration:
|
|
703
|
+
type: integer
|
|
704
|
+
description: 查询耗时(毫秒)
|
|
705
|
+
# 降级信息
|
|
706
|
+
degraded:
|
|
707
|
+
type: boolean
|
|
708
|
+
description: 是否为降级数据
|
|
709
|
+
degradedReason:
|
|
710
|
+
type: string
|
|
711
|
+
description: 降级原因
|
|
539
712
|
|
|
540
713
|
QueryDefinitionResponse:
|
|
541
714
|
type: object
|
|
@@ -795,35 +968,123 @@ PublicActivityInfo:
|
|
|
795
968
|
|
|
796
969
|
UserActivityState:
|
|
797
970
|
type: object
|
|
798
|
-
required: [activityId, userId]
|
|
971
|
+
required: [activityId, userId, activityType, canParticipate, typeState]
|
|
972
|
+
description: 用户活动状态(UserActivityState,根据 types/src/activity/index.ts)
|
|
799
973
|
properties:
|
|
800
974
|
activityId:
|
|
801
975
|
type: string
|
|
802
|
-
description: 活动 ID
|
|
976
|
+
description: 活动 ID(UniqueId)
|
|
803
977
|
userId:
|
|
804
978
|
type: string
|
|
805
979
|
description: 用户 ID
|
|
806
|
-
|
|
980
|
+
activityType:
|
|
981
|
+
type: string
|
|
982
|
+
enum: [claim, signin, lottery, reserve, task, vote, share, bind, custom]
|
|
983
|
+
description: 活动类型(ActivityType)
|
|
984
|
+
canParticipate:
|
|
807
985
|
type: boolean
|
|
808
|
-
description:
|
|
809
|
-
|
|
986
|
+
description: 是否可参与
|
|
987
|
+
notParticipateReason:
|
|
810
988
|
type: string
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
remainingChances:
|
|
814
|
-
type: integer
|
|
815
|
-
description: 剩余抽奖次数
|
|
816
|
-
totalRewards:
|
|
989
|
+
description: 不可参与原因
|
|
990
|
+
remainingCount:
|
|
817
991
|
type: integer
|
|
818
|
-
description:
|
|
819
|
-
|
|
992
|
+
description: 剩余参与次数
|
|
993
|
+
typeState:
|
|
820
994
|
type: object
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
995
|
+
description: 类型特定状态(ClaimState | SigninState | LotteryState)
|
|
996
|
+
oneOf:
|
|
997
|
+
- type: object
|
|
998
|
+
required: [type, claimed]
|
|
999
|
+
properties:
|
|
1000
|
+
type:
|
|
1001
|
+
type: string
|
|
1002
|
+
enum: [claim]
|
|
1003
|
+
claimed:
|
|
1004
|
+
type: boolean
|
|
1005
|
+
claimedAt:
|
|
1006
|
+
type: string
|
|
1007
|
+
format: date-time
|
|
1008
|
+
claimedPrizeId:
|
|
1009
|
+
type: string
|
|
1010
|
+
availablePrizes:
|
|
1011
|
+
type: array
|
|
1012
|
+
items:
|
|
1013
|
+
type: object
|
|
1014
|
+
properties:
|
|
1015
|
+
prizeId:
|
|
1016
|
+
type: string
|
|
1017
|
+
name:
|
|
1018
|
+
type: string
|
|
1019
|
+
stock:
|
|
1020
|
+
type: integer
|
|
1021
|
+
- type: object
|
|
1022
|
+
required: [type, signedToday, consecutiveDays, totalDays, cycleRecords, makeupAvailable]
|
|
1023
|
+
properties:
|
|
1024
|
+
type:
|
|
1025
|
+
type: string
|
|
1026
|
+
enum: [signin]
|
|
1027
|
+
signedToday:
|
|
1028
|
+
type: boolean
|
|
1029
|
+
todaySignedAt:
|
|
1030
|
+
type: string
|
|
1031
|
+
format: date-time
|
|
1032
|
+
consecutiveDays:
|
|
1033
|
+
type: integer
|
|
1034
|
+
totalDays:
|
|
1035
|
+
type: integer
|
|
1036
|
+
cycleRecords:
|
|
1037
|
+
type: array
|
|
1038
|
+
items:
|
|
1039
|
+
type: object
|
|
1040
|
+
properties:
|
|
1041
|
+
dayKey:
|
|
1042
|
+
type: string
|
|
1043
|
+
signed:
|
|
1044
|
+
type: boolean
|
|
1045
|
+
isMakeup:
|
|
1046
|
+
type: boolean
|
|
1047
|
+
makeupAvailable:
|
|
1048
|
+
type: integer
|
|
1049
|
+
nextReward:
|
|
1050
|
+
type: object
|
|
1051
|
+
properties:
|
|
1052
|
+
type:
|
|
1053
|
+
type: string
|
|
1054
|
+
enum: [consecutive, cumulative]
|
|
1055
|
+
daysNeeded:
|
|
1056
|
+
type: integer
|
|
1057
|
+
reward:
|
|
1058
|
+
type: object
|
|
1059
|
+
additionalProperties: true
|
|
1060
|
+
- type: object
|
|
1061
|
+
required: [type, freeDrawsRemaining, todayDrawCount, totalDrawCount]
|
|
1062
|
+
properties:
|
|
1063
|
+
type:
|
|
1064
|
+
type: string
|
|
1065
|
+
enum: [lottery]
|
|
1066
|
+
freeDrawsRemaining:
|
|
1067
|
+
type: integer
|
|
1068
|
+
todayDrawCount:
|
|
1069
|
+
type: integer
|
|
1070
|
+
totalDrawCount:
|
|
1071
|
+
type: integer
|
|
1072
|
+
pityProgress:
|
|
1073
|
+
type: object
|
|
1074
|
+
properties:
|
|
1075
|
+
current:
|
|
1076
|
+
type: integer
|
|
1077
|
+
target:
|
|
1078
|
+
type: integer
|
|
1079
|
+
resources:
|
|
1080
|
+
type: array
|
|
1081
|
+
items:
|
|
1082
|
+
type: object
|
|
1083
|
+
properties:
|
|
1084
|
+
type:
|
|
1085
|
+
type: string
|
|
1086
|
+
amount:
|
|
1087
|
+
type: integer
|
|
827
1088
|
|
|
828
1089
|
SigninCalendar:
|
|
829
1090
|
type: object
|