@djvlc/openapi-user-client 1.7.15 → 1.8.0
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 +691 -237
- package/dist/index.d.ts +691 -237
- package/dist/index.js +636 -184
- package/dist/index.mjs +609 -184
- package/openapi/dist/user-api.yaml +338 -96
- package/openapi/src/components/schemas/_index.yaml +39 -2
- package/openapi/src/openapi.yaml +10 -0
- package/openapi/src/paths/activities.yaml +101 -0
- package/openapi/src/paths/pages.yaml +90 -0
- package/package.json +2 -2
|
@@ -130,6 +130,102 @@ paths:
|
|
|
130
130
|
$ref: '#/components/responses/NotFound'
|
|
131
131
|
'503':
|
|
132
132
|
$ref: '#/components/responses/ServiceUnavailable'
|
|
133
|
+
/page/manifest:
|
|
134
|
+
get:
|
|
135
|
+
tags:
|
|
136
|
+
- Pages
|
|
137
|
+
operationId: getPageManifest
|
|
138
|
+
summary: 获取组件清单
|
|
139
|
+
description: |
|
|
140
|
+
返回页面的组件锁定清单(manifest),包含所有引用的组件版本和资源信息。
|
|
141
|
+
|
|
142
|
+
用途:
|
|
143
|
+
- Runtime 根据 manifest 预加载组件资源
|
|
144
|
+
- Editor 根据 manifest 展示组件依赖
|
|
145
|
+
parameters:
|
|
146
|
+
- name: X-Trace-Id
|
|
147
|
+
in: header
|
|
148
|
+
required: false
|
|
149
|
+
schema:
|
|
150
|
+
type: string
|
|
151
|
+
description: 链路追踪 ID(OTel,全链路透传)
|
|
152
|
+
- name: pageId
|
|
153
|
+
in: query
|
|
154
|
+
required: true
|
|
155
|
+
schema:
|
|
156
|
+
type: string
|
|
157
|
+
description: 页面 ID
|
|
158
|
+
- name: env
|
|
159
|
+
in: query
|
|
160
|
+
required: false
|
|
161
|
+
schema:
|
|
162
|
+
type: string
|
|
163
|
+
enum:
|
|
164
|
+
- prod
|
|
165
|
+
- preview
|
|
166
|
+
- staging
|
|
167
|
+
default: prod
|
|
168
|
+
description: 环境(prod/preview/staging)
|
|
169
|
+
responses:
|
|
170
|
+
'200':
|
|
171
|
+
description: 获取成功
|
|
172
|
+
content:
|
|
173
|
+
application/json:
|
|
174
|
+
schema:
|
|
175
|
+
type: object
|
|
176
|
+
properties:
|
|
177
|
+
success:
|
|
178
|
+
type: boolean
|
|
179
|
+
data:
|
|
180
|
+
$ref: '#/components/schemas/ResourceManifests'
|
|
181
|
+
'400':
|
|
182
|
+
$ref: '#/components/responses/BadRequest'
|
|
183
|
+
'404':
|
|
184
|
+
$ref: '#/components/responses/NotFound'
|
|
185
|
+
/page/config:
|
|
186
|
+
get:
|
|
187
|
+
tags:
|
|
188
|
+
- Pages
|
|
189
|
+
operationId: getPageConfig
|
|
190
|
+
summary: 获取运维配置
|
|
191
|
+
description: |
|
|
192
|
+
返回当前运维配置(killSwitch、blockedComponents、featureFlags 等)。
|
|
193
|
+
|
|
194
|
+
用途:
|
|
195
|
+
- Runtime 启动时获取全局运维配置
|
|
196
|
+
- 判断是否有组件被阻断或功能被关闭
|
|
197
|
+
parameters:
|
|
198
|
+
- name: X-Trace-Id
|
|
199
|
+
in: header
|
|
200
|
+
required: false
|
|
201
|
+
schema:
|
|
202
|
+
type: string
|
|
203
|
+
description: 链路追踪 ID(OTel,全链路透传)
|
|
204
|
+
- name: env
|
|
205
|
+
in: query
|
|
206
|
+
required: false
|
|
207
|
+
schema:
|
|
208
|
+
type: string
|
|
209
|
+
enum:
|
|
210
|
+
- prod
|
|
211
|
+
- preview
|
|
212
|
+
- staging
|
|
213
|
+
default: prod
|
|
214
|
+
description: 环境(prod/preview/staging)
|
|
215
|
+
responses:
|
|
216
|
+
'200':
|
|
217
|
+
description: 获取成功
|
|
218
|
+
content:
|
|
219
|
+
application/json:
|
|
220
|
+
schema:
|
|
221
|
+
type: object
|
|
222
|
+
properties:
|
|
223
|
+
success:
|
|
224
|
+
type: boolean
|
|
225
|
+
data:
|
|
226
|
+
$ref: '#/components/schemas/OpsConfig'
|
|
227
|
+
'503':
|
|
228
|
+
$ref: '#/components/responses/ServiceUnavailable'
|
|
133
229
|
/actions/execute:
|
|
134
230
|
post:
|
|
135
231
|
tags:
|
|
@@ -539,6 +635,104 @@ paths:
|
|
|
539
635
|
$ref: '#/components/schemas/PaginationMeta'
|
|
540
636
|
security:
|
|
541
637
|
- BearerAuth: []
|
|
638
|
+
/activities/{activityId}/status:
|
|
639
|
+
get:
|
|
640
|
+
tags:
|
|
641
|
+
- Activities
|
|
642
|
+
summary: 获取活动状态(兼容)
|
|
643
|
+
operationId: getActivityStatus
|
|
644
|
+
description: |
|
|
645
|
+
获取活动的当前状态信息,包括是否进行中、时间范围等。
|
|
646
|
+
不需要登录,可用于前端判断活动是否在有效期内。
|
|
647
|
+
parameters:
|
|
648
|
+
- name: activityId
|
|
649
|
+
in: path
|
|
650
|
+
required: true
|
|
651
|
+
schema:
|
|
652
|
+
type: string
|
|
653
|
+
responses:
|
|
654
|
+
'200':
|
|
655
|
+
description: 成功
|
|
656
|
+
content:
|
|
657
|
+
application/json:
|
|
658
|
+
schema:
|
|
659
|
+
type: object
|
|
660
|
+
properties:
|
|
661
|
+
success:
|
|
662
|
+
type: boolean
|
|
663
|
+
data:
|
|
664
|
+
$ref: '#/components/schemas/ActivityStatus'
|
|
665
|
+
'404':
|
|
666
|
+
$ref: '#/components/responses/NotFound'
|
|
667
|
+
security: []
|
|
668
|
+
/activities/{activityId}/claim/status:
|
|
669
|
+
get:
|
|
670
|
+
tags:
|
|
671
|
+
- Activities
|
|
672
|
+
summary: 获取领取状态
|
|
673
|
+
operationId: getClaimStatus
|
|
674
|
+
description: 获取用户在指定活动中的领取状态
|
|
675
|
+
parameters:
|
|
676
|
+
- name: activityId
|
|
677
|
+
in: path
|
|
678
|
+
required: true
|
|
679
|
+
schema:
|
|
680
|
+
type: string
|
|
681
|
+
- name: uid
|
|
682
|
+
in: query
|
|
683
|
+
required: true
|
|
684
|
+
schema:
|
|
685
|
+
type: string
|
|
686
|
+
description: 用户 UID
|
|
687
|
+
responses:
|
|
688
|
+
'200':
|
|
689
|
+
description: 成功
|
|
690
|
+
content:
|
|
691
|
+
application/json:
|
|
692
|
+
schema:
|
|
693
|
+
type: object
|
|
694
|
+
properties:
|
|
695
|
+
success:
|
|
696
|
+
type: boolean
|
|
697
|
+
data:
|
|
698
|
+
type: object
|
|
699
|
+
description: 领取状态数据
|
|
700
|
+
security:
|
|
701
|
+
- BearerAuth: []
|
|
702
|
+
/activities/{activityId}/signin/status:
|
|
703
|
+
get:
|
|
704
|
+
tags:
|
|
705
|
+
- Activities
|
|
706
|
+
summary: 获取签到状态
|
|
707
|
+
operationId: getSigninStatus
|
|
708
|
+
description: 获取用户在指定活动中的签到状态
|
|
709
|
+
parameters:
|
|
710
|
+
- name: activityId
|
|
711
|
+
in: path
|
|
712
|
+
required: true
|
|
713
|
+
schema:
|
|
714
|
+
type: string
|
|
715
|
+
- name: uid
|
|
716
|
+
in: query
|
|
717
|
+
required: true
|
|
718
|
+
schema:
|
|
719
|
+
type: string
|
|
720
|
+
description: 用户 UID
|
|
721
|
+
responses:
|
|
722
|
+
'200':
|
|
723
|
+
description: 成功
|
|
724
|
+
content:
|
|
725
|
+
application/json:
|
|
726
|
+
schema:
|
|
727
|
+
type: object
|
|
728
|
+
properties:
|
|
729
|
+
success:
|
|
730
|
+
type: boolean
|
|
731
|
+
data:
|
|
732
|
+
type: object
|
|
733
|
+
description: 签到状态数据
|
|
734
|
+
security:
|
|
735
|
+
- BearerAuth: []
|
|
542
736
|
/track:
|
|
543
737
|
post:
|
|
544
738
|
tags:
|
|
@@ -1049,14 +1243,22 @@ components:
|
|
|
1049
1243
|
version:
|
|
1050
1244
|
type: string
|
|
1051
1245
|
pattern: ^\d+\.\d+\.\d+$
|
|
1246
|
+
source:
|
|
1247
|
+
type: string
|
|
1248
|
+
enum:
|
|
1249
|
+
- bundled
|
|
1250
|
+
- remote
|
|
1251
|
+
description: 组件来源:bundled = 内置组件,remote = 远程组件
|
|
1052
1252
|
integrity:
|
|
1053
1253
|
type: string
|
|
1054
1254
|
pattern: ^sha(256|384|512)-
|
|
1055
1255
|
assetsUrl:
|
|
1056
1256
|
type: string
|
|
1057
1257
|
format: uri
|
|
1258
|
+
description: CDN 资源基础 URL(source 为 remote 时必填)
|
|
1058
1259
|
entrypoints:
|
|
1059
1260
|
type: object
|
|
1261
|
+
description: 入口点(source 为 remote 时必填)
|
|
1060
1262
|
properties:
|
|
1061
1263
|
js:
|
|
1062
1264
|
type: string
|
|
@@ -1189,6 +1391,108 @@ components:
|
|
|
1189
1391
|
type: string
|
|
1190
1392
|
example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
|
|
1191
1393
|
description: 链路追踪 ID(可选,用于分布式追踪)
|
|
1394
|
+
ComponentManifest:
|
|
1395
|
+
type: object
|
|
1396
|
+
required:
|
|
1397
|
+
- componentType
|
|
1398
|
+
- version
|
|
1399
|
+
- source
|
|
1400
|
+
properties:
|
|
1401
|
+
componentType:
|
|
1402
|
+
type: string
|
|
1403
|
+
description: 组件类型
|
|
1404
|
+
version:
|
|
1405
|
+
type: string
|
|
1406
|
+
description: 组件版本
|
|
1407
|
+
source:
|
|
1408
|
+
type: string
|
|
1409
|
+
enum:
|
|
1410
|
+
- bundled
|
|
1411
|
+
- remote
|
|
1412
|
+
description: 组件来源:bundled = 内置组件(随 Runtime 打包),remote = 远程组件(从 CDN 加载)
|
|
1413
|
+
entryUrl:
|
|
1414
|
+
type: string
|
|
1415
|
+
format: uri
|
|
1416
|
+
description: 组件入口 URL(source 为 remote 时必填)
|
|
1417
|
+
styleUrl:
|
|
1418
|
+
type: string
|
|
1419
|
+
format: uri
|
|
1420
|
+
description: 样式文件 URL
|
|
1421
|
+
integrity:
|
|
1422
|
+
type: string
|
|
1423
|
+
description: SRI 完整性哈希
|
|
1424
|
+
blocked:
|
|
1425
|
+
type: boolean
|
|
1426
|
+
description: 是否被阻断
|
|
1427
|
+
fallback:
|
|
1428
|
+
type: string
|
|
1429
|
+
description: 降级组件类型
|
|
1430
|
+
ActionManifest:
|
|
1431
|
+
type: object
|
|
1432
|
+
required:
|
|
1433
|
+
- actionId
|
|
1434
|
+
- actionDefinitionVersionId
|
|
1435
|
+
properties:
|
|
1436
|
+
actionId:
|
|
1437
|
+
type: string
|
|
1438
|
+
description: 动作 ID
|
|
1439
|
+
actionDefinitionVersionId:
|
|
1440
|
+
type: string
|
|
1441
|
+
description: 动作定义版本 ID
|
|
1442
|
+
actionType:
|
|
1443
|
+
type: string
|
|
1444
|
+
enum:
|
|
1445
|
+
- claim
|
|
1446
|
+
- signin
|
|
1447
|
+
- lottery
|
|
1448
|
+
- reserve
|
|
1449
|
+
- bind
|
|
1450
|
+
- task_complete
|
|
1451
|
+
- vote
|
|
1452
|
+
- share
|
|
1453
|
+
- form_submit
|
|
1454
|
+
- navigate
|
|
1455
|
+
- setState
|
|
1456
|
+
- showToast
|
|
1457
|
+
- refreshData
|
|
1458
|
+
- custom
|
|
1459
|
+
description: 动作类型
|
|
1460
|
+
builtin:
|
|
1461
|
+
type: boolean
|
|
1462
|
+
description: 是否内置动作
|
|
1463
|
+
QueryManifest:
|
|
1464
|
+
type: object
|
|
1465
|
+
required:
|
|
1466
|
+
- queryId
|
|
1467
|
+
- queryVersionId
|
|
1468
|
+
properties:
|
|
1469
|
+
queryId:
|
|
1470
|
+
type: string
|
|
1471
|
+
description: 查询 ID
|
|
1472
|
+
queryVersionId:
|
|
1473
|
+
type: string
|
|
1474
|
+
description: 查询定义版本 ID
|
|
1475
|
+
cacheTtl:
|
|
1476
|
+
type: integer
|
|
1477
|
+
description: 缓存 TTL(秒)
|
|
1478
|
+
ResourceManifests:
|
|
1479
|
+
type: object
|
|
1480
|
+
properties:
|
|
1481
|
+
components:
|
|
1482
|
+
type: array
|
|
1483
|
+
items:
|
|
1484
|
+
$ref: '#/components/schemas/ComponentManifest'
|
|
1485
|
+
description: 组件资源清单
|
|
1486
|
+
actions:
|
|
1487
|
+
type: array
|
|
1488
|
+
items:
|
|
1489
|
+
$ref: '#/components/schemas/ActionManifest'
|
|
1490
|
+
description: 动作资源清单
|
|
1491
|
+
queries:
|
|
1492
|
+
type: array
|
|
1493
|
+
items:
|
|
1494
|
+
$ref: '#/components/schemas/QueryManifest'
|
|
1495
|
+
description: 查询资源清单
|
|
1192
1496
|
ActionClientContext:
|
|
1193
1497
|
type: object
|
|
1194
1498
|
description: 动作执行上下文(ActionClientContext,问题追溯必须字段)
|
|
@@ -1940,6 +2244,40 @@ components:
|
|
|
1940
2244
|
type: string
|
|
1941
2245
|
format: date-time
|
|
1942
2246
|
description: 领取时间
|
|
2247
|
+
ActivityStatus:
|
|
2248
|
+
type: object
|
|
2249
|
+
required:
|
|
2250
|
+
- activityUid
|
|
2251
|
+
- name
|
|
2252
|
+
- type
|
|
2253
|
+
- isInProgress
|
|
2254
|
+
- startAt
|
|
2255
|
+
- endAt
|
|
2256
|
+
description: 活动状态信息(与 docs ActivityStatusVo 对齐)
|
|
2257
|
+
properties:
|
|
2258
|
+
activityUid:
|
|
2259
|
+
type: string
|
|
2260
|
+
description: 活动 UID
|
|
2261
|
+
name:
|
|
2262
|
+
type: string
|
|
2263
|
+
description: 活动名称
|
|
2264
|
+
type:
|
|
2265
|
+
type: string
|
|
2266
|
+
description: 活动类型
|
|
2267
|
+
enum:
|
|
2268
|
+
- claim
|
|
2269
|
+
- signin
|
|
2270
|
+
isInProgress:
|
|
2271
|
+
type: boolean
|
|
2272
|
+
description: 是否进行中
|
|
2273
|
+
startAt:
|
|
2274
|
+
type: string
|
|
2275
|
+
format: date-time
|
|
2276
|
+
description: 开始时间(ISODateTime)
|
|
2277
|
+
endAt:
|
|
2278
|
+
type: string
|
|
2279
|
+
format: date-time
|
|
2280
|
+
description: 结束时间(ISODateTime)
|
|
1943
2281
|
TrackRequest:
|
|
1944
2282
|
type: object
|
|
1945
2283
|
required:
|
|
@@ -2108,84 +2446,6 @@ components:
|
|
|
2108
2446
|
message:
|
|
2109
2447
|
type: string
|
|
2110
2448
|
description: 依赖服务状态
|
|
2111
|
-
ComponentManifest:
|
|
2112
|
-
type: object
|
|
2113
|
-
required:
|
|
2114
|
-
- componentType
|
|
2115
|
-
- version
|
|
2116
|
-
- entryUrl
|
|
2117
|
-
properties:
|
|
2118
|
-
componentType:
|
|
2119
|
-
type: string
|
|
2120
|
-
description: 组件类型
|
|
2121
|
-
version:
|
|
2122
|
-
type: string
|
|
2123
|
-
description: 组件版本
|
|
2124
|
-
entryUrl:
|
|
2125
|
-
type: string
|
|
2126
|
-
format: uri
|
|
2127
|
-
description: 组件入口 URL
|
|
2128
|
-
styleUrl:
|
|
2129
|
-
type: string
|
|
2130
|
-
format: uri
|
|
2131
|
-
description: 样式文件 URL
|
|
2132
|
-
integrity:
|
|
2133
|
-
type: string
|
|
2134
|
-
description: SRI 完整性哈希
|
|
2135
|
-
blocked:
|
|
2136
|
-
type: boolean
|
|
2137
|
-
description: 是否被阻断
|
|
2138
|
-
fallback:
|
|
2139
|
-
type: string
|
|
2140
|
-
description: 降级组件类型
|
|
2141
|
-
ActionManifest:
|
|
2142
|
-
type: object
|
|
2143
|
-
required:
|
|
2144
|
-
- actionId
|
|
2145
|
-
- actionDefinitionVersionId
|
|
2146
|
-
properties:
|
|
2147
|
-
actionId:
|
|
2148
|
-
type: string
|
|
2149
|
-
description: 动作 ID
|
|
2150
|
-
actionDefinitionVersionId:
|
|
2151
|
-
type: string
|
|
2152
|
-
description: 动作定义版本 ID
|
|
2153
|
-
actionType:
|
|
2154
|
-
type: string
|
|
2155
|
-
enum:
|
|
2156
|
-
- claim
|
|
2157
|
-
- signin
|
|
2158
|
-
- lottery
|
|
2159
|
-
- reserve
|
|
2160
|
-
- bind
|
|
2161
|
-
- task_complete
|
|
2162
|
-
- vote
|
|
2163
|
-
- share
|
|
2164
|
-
- form_submit
|
|
2165
|
-
- navigate
|
|
2166
|
-
- setState
|
|
2167
|
-
- showToast
|
|
2168
|
-
- refreshData
|
|
2169
|
-
- custom
|
|
2170
|
-
description: 动作类型
|
|
2171
|
-
builtin:
|
|
2172
|
-
type: boolean
|
|
2173
|
-
description: 是否内置动作
|
|
2174
|
-
QueryManifest:
|
|
2175
|
-
type: object
|
|
2176
|
-
required:
|
|
2177
|
-
- queryId
|
|
2178
|
-
- queryVersionId
|
|
2179
|
-
properties:
|
|
2180
|
-
queryId:
|
|
2181
|
-
type: string
|
|
2182
|
-
description: 查询 ID
|
|
2183
|
-
queryVersionId:
|
|
2184
|
-
type: string
|
|
2185
|
-
description: 查询定义版本 ID
|
|
2186
|
-
cacheTtl:
|
|
2187
|
-
type: integer
|
|
2188
|
-
description: 缓存 TTL(秒)
|
|
2189
2449
|
PageResponse:
|
|
2190
2450
|
allOf:
|
|
2191
2451
|
- $ref: '#/components/schemas/SuccessResponse'
|
|
@@ -2216,24 +2476,6 @@ components:
|
|
|
2216
2476
|
integrity:
|
|
2217
2477
|
type: string
|
|
2218
2478
|
description: 完整性哈希
|
|
2219
|
-
ResourceManifests:
|
|
2220
|
-
type: object
|
|
2221
|
-
properties:
|
|
2222
|
-
components:
|
|
2223
|
-
type: array
|
|
2224
|
-
items:
|
|
2225
|
-
$ref: '#/components/schemas/ComponentManifest'
|
|
2226
|
-
description: 组件资源清单
|
|
2227
|
-
actions:
|
|
2228
|
-
type: array
|
|
2229
|
-
items:
|
|
2230
|
-
$ref: '#/components/schemas/ActionManifest'
|
|
2231
|
-
description: 动作资源清单
|
|
2232
|
-
queries:
|
|
2233
|
-
type: array
|
|
2234
|
-
items:
|
|
2235
|
-
$ref: '#/components/schemas/QueryManifest'
|
|
2236
|
-
description: 查询资源清单
|
|
2237
2479
|
responses:
|
|
2238
2480
|
BadRequest:
|
|
2239
2481
|
description: 请求参数错误
|
|
@@ -215,14 +215,20 @@ ResolvePageResponse:
|
|
|
215
215
|
version:
|
|
216
216
|
type: string
|
|
217
217
|
pattern: '^\d+\.\d+\.\d+$'
|
|
218
|
+
source:
|
|
219
|
+
type: string
|
|
220
|
+
enum: [bundled, remote]
|
|
221
|
+
description: '组件来源:bundled = 内置组件,remote = 远程组件'
|
|
218
222
|
integrity:
|
|
219
223
|
type: string
|
|
220
224
|
pattern: '^sha(256|384|512)-'
|
|
221
225
|
assetsUrl:
|
|
222
226
|
type: string
|
|
223
227
|
format: uri
|
|
228
|
+
description: 'CDN 资源基础 URL(source 为 remote 时必填)'
|
|
224
229
|
entrypoints:
|
|
225
230
|
type: object
|
|
231
|
+
description: '入口点(source 为 remote 时必填)'
|
|
226
232
|
properties:
|
|
227
233
|
js:
|
|
228
234
|
type: string
|
|
@@ -329,7 +335,7 @@ ResourceManifests:
|
|
|
329
335
|
|
|
330
336
|
ComponentManifest:
|
|
331
337
|
type: object
|
|
332
|
-
required: [componentType, version,
|
|
338
|
+
required: [componentType, version, source]
|
|
333
339
|
properties:
|
|
334
340
|
componentType:
|
|
335
341
|
type: string
|
|
@@ -337,10 +343,14 @@ ComponentManifest:
|
|
|
337
343
|
version:
|
|
338
344
|
type: string
|
|
339
345
|
description: 组件版本
|
|
346
|
+
source:
|
|
347
|
+
type: string
|
|
348
|
+
enum: [bundled, remote]
|
|
349
|
+
description: '组件来源:bundled = 内置组件(随 Runtime 打包),remote = 远程组件(从 CDN 加载)'
|
|
340
350
|
entryUrl:
|
|
341
351
|
type: string
|
|
342
352
|
format: uri
|
|
343
|
-
description: 组件入口 URL
|
|
353
|
+
description: '组件入口 URL(source 为 remote 时必填)'
|
|
344
354
|
styleUrl:
|
|
345
355
|
type: string
|
|
346
356
|
format: uri
|
|
@@ -994,6 +1004,33 @@ HealthResponse:
|
|
|
994
1004
|
# Activity 用户活动相关
|
|
995
1005
|
# ============================================================================
|
|
996
1006
|
|
|
1007
|
+
ActivityStatus:
|
|
1008
|
+
type: object
|
|
1009
|
+
required: [activityUid, name, type, isInProgress, startAt, endAt]
|
|
1010
|
+
description: 活动状态信息(与 docs ActivityStatusVo 对齐)
|
|
1011
|
+
properties:
|
|
1012
|
+
activityUid:
|
|
1013
|
+
type: string
|
|
1014
|
+
description: 活动 UID
|
|
1015
|
+
name:
|
|
1016
|
+
type: string
|
|
1017
|
+
description: 活动名称
|
|
1018
|
+
type:
|
|
1019
|
+
type: string
|
|
1020
|
+
description: 活动类型
|
|
1021
|
+
enum: [claim, signin]
|
|
1022
|
+
isInProgress:
|
|
1023
|
+
type: boolean
|
|
1024
|
+
description: 是否进行中
|
|
1025
|
+
startAt:
|
|
1026
|
+
type: string
|
|
1027
|
+
format: date-time
|
|
1028
|
+
description: 开始时间(ISODateTime)
|
|
1029
|
+
endAt:
|
|
1030
|
+
type: string
|
|
1031
|
+
format: date-time
|
|
1032
|
+
description: 结束时间(ISODateTime)
|
|
1033
|
+
|
|
997
1034
|
PublicActivityInfo:
|
|
998
1035
|
type: object
|
|
999
1036
|
required: [id, name, type, status]
|
package/openapi/src/openapi.yaml
CHANGED
|
@@ -49,6 +49,10 @@ paths:
|
|
|
49
49
|
# 页面解析(根据设计总纲 V2)
|
|
50
50
|
/page/resolve:
|
|
51
51
|
$ref: './paths/pages.yaml#/resolve'
|
|
52
|
+
/page/manifest:
|
|
53
|
+
$ref: './paths/pages.yaml#/manifest'
|
|
54
|
+
/page/config:
|
|
55
|
+
$ref: './paths/pages.yaml#/config'
|
|
52
56
|
|
|
53
57
|
# Action Gateway(统一入口)
|
|
54
58
|
/actions/execute:
|
|
@@ -77,6 +81,12 @@ paths:
|
|
|
77
81
|
$ref: './paths/activities.yaml#/claimRecords'
|
|
78
82
|
/activities/{activityId}/lottery:
|
|
79
83
|
$ref: './paths/activities.yaml#/lotteryRecords'
|
|
84
|
+
/activities/{activityId}/status:
|
|
85
|
+
$ref: './paths/activities.yaml#/activityStatus'
|
|
86
|
+
/activities/{activityId}/claim/status:
|
|
87
|
+
$ref: './paths/activities.yaml#/claimStatus'
|
|
88
|
+
/activities/{activityId}/signin/status:
|
|
89
|
+
$ref: './paths/activities.yaml#/signinStatus'
|
|
80
90
|
|
|
81
91
|
# 埋点上报
|
|
82
92
|
/track:
|
|
@@ -153,6 +153,107 @@ claimRecords:
|
|
|
153
153
|
security:
|
|
154
154
|
- BearerAuth: []
|
|
155
155
|
|
|
156
|
+
activityStatus:
|
|
157
|
+
get:
|
|
158
|
+
tags:
|
|
159
|
+
- Activities
|
|
160
|
+
summary: 获取活动状态(兼容)
|
|
161
|
+
operationId: getActivityStatus
|
|
162
|
+
description: |
|
|
163
|
+
获取活动的当前状态信息,包括是否进行中、时间范围等。
|
|
164
|
+
不需要登录,可用于前端判断活动是否在有效期内。
|
|
165
|
+
parameters:
|
|
166
|
+
- name: activityId
|
|
167
|
+
in: path
|
|
168
|
+
required: true
|
|
169
|
+
schema:
|
|
170
|
+
type: string
|
|
171
|
+
responses:
|
|
172
|
+
'200':
|
|
173
|
+
description: 成功
|
|
174
|
+
content:
|
|
175
|
+
application/json:
|
|
176
|
+
schema:
|
|
177
|
+
type: object
|
|
178
|
+
properties:
|
|
179
|
+
success:
|
|
180
|
+
type: boolean
|
|
181
|
+
data:
|
|
182
|
+
$ref: '../components/schemas/_index.yaml#/ActivityStatus'
|
|
183
|
+
'404':
|
|
184
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
185
|
+
security: []
|
|
186
|
+
|
|
187
|
+
claimStatus:
|
|
188
|
+
get:
|
|
189
|
+
tags:
|
|
190
|
+
- Activities
|
|
191
|
+
summary: 获取领取状态
|
|
192
|
+
operationId: getClaimStatus
|
|
193
|
+
description: 获取用户在指定活动中的领取状态
|
|
194
|
+
parameters:
|
|
195
|
+
- name: activityId
|
|
196
|
+
in: path
|
|
197
|
+
required: true
|
|
198
|
+
schema:
|
|
199
|
+
type: string
|
|
200
|
+
- name: uid
|
|
201
|
+
in: query
|
|
202
|
+
required: true
|
|
203
|
+
schema:
|
|
204
|
+
type: string
|
|
205
|
+
description: 用户 UID
|
|
206
|
+
responses:
|
|
207
|
+
'200':
|
|
208
|
+
description: 成功
|
|
209
|
+
content:
|
|
210
|
+
application/json:
|
|
211
|
+
schema:
|
|
212
|
+
type: object
|
|
213
|
+
properties:
|
|
214
|
+
success:
|
|
215
|
+
type: boolean
|
|
216
|
+
data:
|
|
217
|
+
type: object
|
|
218
|
+
description: 领取状态数据
|
|
219
|
+
security:
|
|
220
|
+
- BearerAuth: []
|
|
221
|
+
|
|
222
|
+
signinStatus:
|
|
223
|
+
get:
|
|
224
|
+
tags:
|
|
225
|
+
- Activities
|
|
226
|
+
summary: 获取签到状态
|
|
227
|
+
operationId: getSigninStatus
|
|
228
|
+
description: 获取用户在指定活动中的签到状态
|
|
229
|
+
parameters:
|
|
230
|
+
- name: activityId
|
|
231
|
+
in: path
|
|
232
|
+
required: true
|
|
233
|
+
schema:
|
|
234
|
+
type: string
|
|
235
|
+
- name: uid
|
|
236
|
+
in: query
|
|
237
|
+
required: true
|
|
238
|
+
schema:
|
|
239
|
+
type: string
|
|
240
|
+
description: 用户 UID
|
|
241
|
+
responses:
|
|
242
|
+
'200':
|
|
243
|
+
description: 成功
|
|
244
|
+
content:
|
|
245
|
+
application/json:
|
|
246
|
+
schema:
|
|
247
|
+
type: object
|
|
248
|
+
properties:
|
|
249
|
+
success:
|
|
250
|
+
type: boolean
|
|
251
|
+
data:
|
|
252
|
+
type: object
|
|
253
|
+
description: 签到状态数据
|
|
254
|
+
security:
|
|
255
|
+
- BearerAuth: []
|
|
256
|
+
|
|
156
257
|
lotteryRecords:
|
|
157
258
|
get:
|
|
158
259
|
tags:
|