@djvlc/openapi-admin-client 1.6.10 → 1.6.11
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 +2640 -3207
- package/dist/index.d.ts +2640 -3207
- package/dist/index.js +2113 -2462
- package/dist/index.mjs +1942 -2241
- package/openapi/dist/admin-api.yaml +2240 -1997
- package/openapi/src/components/responses/_index.yaml +31 -6
- package/openapi/src/components/schemas/_index.yaml +489 -111
- package/openapi/src/openapi.yaml +19 -7
- package/openapi/src/paths/pages.yaml +346 -5
- package/package.json +2 -2
package/openapi/src/openapi.yaml
CHANGED
|
@@ -75,12 +75,24 @@ paths:
|
|
|
75
75
|
$ref: './paths/pages.yaml#/update'
|
|
76
76
|
/pages/{pageId}/delete:
|
|
77
77
|
$ref: './paths/pages.yaml#/delete'
|
|
78
|
+
/pages/{pageId}/duplicate:
|
|
79
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1duplicate'
|
|
80
|
+
/pages/{pageId}/preview:
|
|
81
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1preview'
|
|
82
|
+
/pages/{pageId}/stats:
|
|
83
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1stats'
|
|
84
|
+
/pages/{pageId}/archive:
|
|
85
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1archive'
|
|
86
|
+
/pages/{pageId}/restore:
|
|
87
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1restore'
|
|
88
|
+
/pages/batch/delete:
|
|
89
|
+
$ref: './paths/pages.yaml#/pages~1batch~1delete'
|
|
78
90
|
|
|
79
91
|
# 草稿管理
|
|
80
92
|
/pages/{pageId}/draft:
|
|
81
|
-
$ref: './paths/
|
|
82
|
-
/pages/{pageId}/
|
|
83
|
-
$ref: './paths/
|
|
93
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1draft'
|
|
94
|
+
/pages/{pageId}/schema:
|
|
95
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1schema'
|
|
84
96
|
/pages/{pageId}/draft/discard:
|
|
85
97
|
$ref: './paths/drafts.yaml#/discard'
|
|
86
98
|
|
|
@@ -89,14 +101,14 @@ paths:
|
|
|
89
101
|
$ref: './paths/versions.yaml#/versions'
|
|
90
102
|
/pages/{pageId}/versions/{versionId}:
|
|
91
103
|
$ref: './paths/versions.yaml#/versions~1{versionId}'
|
|
104
|
+
/pages/{pageId}/versions/{versionId1}/compare/{versionId2}:
|
|
105
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1versions~1{versionId1}~1compare~1{versionId2}'
|
|
92
106
|
/pages/{pageId}/publish:
|
|
93
|
-
$ref: './paths/
|
|
107
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1publish'
|
|
94
108
|
/pages/{pageId}/rollback:
|
|
95
|
-
$ref: './paths/
|
|
109
|
+
$ref: './paths/pages.yaml#/pages~1{pageId}~1rollback'
|
|
96
110
|
|
|
97
111
|
# 预览管理
|
|
98
|
-
/pages/{pageId}/preview:
|
|
99
|
-
$ref: './paths/preview.yaml#/preview'
|
|
100
112
|
/pages/{pageId}/preview/tokens:
|
|
101
113
|
$ref: './paths/preview.yaml#/previewList'
|
|
102
114
|
/preview/tokens/{token}:
|
|
@@ -133,15 +133,356 @@ delete:
|
|
|
133
133
|
content:
|
|
134
134
|
application/json:
|
|
135
135
|
schema:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
allOf:
|
|
137
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
138
|
+
- type: object
|
|
139
|
+
properties:
|
|
140
|
+
data:
|
|
141
|
+
type: object
|
|
142
|
+
properties:
|
|
143
|
+
success:
|
|
144
|
+
type: boolean
|
|
145
|
+
'401':
|
|
146
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
147
|
+
'404':
|
|
148
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
149
|
+
'500':
|
|
150
|
+
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
151
|
+
|
|
152
|
+
pages/batch/delete:
|
|
153
|
+
post:
|
|
154
|
+
tags: [Pages]
|
|
155
|
+
operationId: batchDeletePages
|
|
156
|
+
summary: 批量删除页面
|
|
157
|
+
description: 批量软删除页面(可恢复)
|
|
158
|
+
requestBody:
|
|
159
|
+
required: true
|
|
160
|
+
content:
|
|
161
|
+
application/json:
|
|
162
|
+
schema:
|
|
163
|
+
type: object
|
|
164
|
+
required: [uids]
|
|
165
|
+
properties:
|
|
166
|
+
uids:
|
|
167
|
+
type: array
|
|
168
|
+
items:
|
|
141
169
|
type: string
|
|
170
|
+
minItems: 1
|
|
171
|
+
maxItems: 100
|
|
172
|
+
description: 页面 UID 列表(最多 100 个)
|
|
173
|
+
responses:
|
|
174
|
+
'200':
|
|
175
|
+
description: 批量删除成功
|
|
176
|
+
content:
|
|
177
|
+
application/json:
|
|
178
|
+
schema:
|
|
179
|
+
allOf:
|
|
180
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
181
|
+
- type: object
|
|
182
|
+
properties:
|
|
183
|
+
data:
|
|
184
|
+
type: object
|
|
185
|
+
properties:
|
|
186
|
+
deletedCount:
|
|
187
|
+
type: integer
|
|
188
|
+
description: 成功删除的数量
|
|
189
|
+
'400':
|
|
190
|
+
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
191
|
+
'401':
|
|
192
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
193
|
+
'500':
|
|
194
|
+
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
195
|
+
|
|
196
|
+
# 草稿管理
|
|
197
|
+
pages/{pageId}/draft:
|
|
198
|
+
get:
|
|
199
|
+
tags: [Drafts]
|
|
200
|
+
operationId: getDraft
|
|
201
|
+
summary: 获取页面草稿
|
|
202
|
+
description: 获取页面的当前草稿(包含完整 Schema)
|
|
203
|
+
parameters:
|
|
204
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
205
|
+
responses:
|
|
206
|
+
'200':
|
|
207
|
+
description: 成功
|
|
208
|
+
content:
|
|
209
|
+
application/json:
|
|
210
|
+
schema:
|
|
211
|
+
$ref: '../components/schemas/_index.yaml#/DraftResponse'
|
|
212
|
+
'401':
|
|
213
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
214
|
+
'404':
|
|
215
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
216
|
+
|
|
217
|
+
pages/{pageId}/schema:
|
|
218
|
+
post:
|
|
219
|
+
tags: [Drafts]
|
|
220
|
+
operationId: saveDraft
|
|
221
|
+
summary: 保存页面草稿
|
|
222
|
+
description: 更新页面的 Schema(编辑器自动保存)
|
|
223
|
+
parameters:
|
|
224
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
225
|
+
requestBody:
|
|
226
|
+
required: true
|
|
227
|
+
content:
|
|
228
|
+
application/json:
|
|
229
|
+
schema:
|
|
230
|
+
$ref: '../components/schemas/_index.yaml#/SaveDraftRequest'
|
|
231
|
+
responses:
|
|
232
|
+
'200':
|
|
233
|
+
description: 保存成功
|
|
234
|
+
content:
|
|
235
|
+
application/json:
|
|
236
|
+
schema:
|
|
237
|
+
$ref: '../components/schemas/_index.yaml#/DraftResponse'
|
|
238
|
+
'400':
|
|
239
|
+
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
240
|
+
'401':
|
|
241
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
242
|
+
'404':
|
|
243
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
244
|
+
|
|
245
|
+
# 发布管理
|
|
246
|
+
pages/{pageId}/publish:
|
|
247
|
+
post:
|
|
248
|
+
tags: [Versions]
|
|
249
|
+
operationId: publishPage
|
|
250
|
+
summary: 发布页面
|
|
251
|
+
description: |
|
|
252
|
+
发布页面到指定环境,使用 Transactional Outbox 模式。
|
|
253
|
+
|
|
254
|
+
发布流程(根据设计总纲 V2):
|
|
255
|
+
1. 读取草稿
|
|
256
|
+
2. 发布期校验(Schema 校验、表达式 lint、组件 compat 校验、Definitions 绑定校验)
|
|
257
|
+
3. 生成 pageVersionId(不可变)
|
|
258
|
+
4. 写入 Command Tables(page_versions, manifests)+ Outbox
|
|
259
|
+
5. Worker 消费 Outbox,投影写入 Query Tables + CDN
|
|
260
|
+
parameters:
|
|
261
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
262
|
+
requestBody:
|
|
263
|
+
required: true
|
|
264
|
+
content:
|
|
265
|
+
application/json:
|
|
266
|
+
schema:
|
|
267
|
+
$ref: '../components/schemas/_index.yaml#/PublishRequest'
|
|
268
|
+
responses:
|
|
269
|
+
'200':
|
|
270
|
+
description: 发布成功
|
|
271
|
+
content:
|
|
272
|
+
application/json:
|
|
273
|
+
schema:
|
|
274
|
+
$ref: '../components/schemas/_index.yaml#/PublishResponse'
|
|
275
|
+
'400':
|
|
276
|
+
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
142
277
|
'401':
|
|
143
278
|
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
144
279
|
'404':
|
|
145
280
|
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
146
281
|
'500':
|
|
147
282
|
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
283
|
+
|
|
284
|
+
pages/{pageId}/rollback:
|
|
285
|
+
post:
|
|
286
|
+
tags: [Versions]
|
|
287
|
+
operationId: rollbackPage
|
|
288
|
+
summary: 回滚到指定版本
|
|
289
|
+
description: |
|
|
290
|
+
将页面回滚到指定的历史版本(秒级生效)。
|
|
291
|
+
|
|
292
|
+
回滚流程:
|
|
293
|
+
1. 验证目标版本存在
|
|
294
|
+
2. 更新 page_pointers 指向目标版本(秒级生效)
|
|
295
|
+
3. 写入 Outbox 事件
|
|
296
|
+
parameters:
|
|
297
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
298
|
+
requestBody:
|
|
299
|
+
required: true
|
|
300
|
+
content:
|
|
301
|
+
application/json:
|
|
302
|
+
schema:
|
|
303
|
+
$ref: '../components/schemas/_index.yaml#/RollbackRequest'
|
|
304
|
+
responses:
|
|
305
|
+
'200':
|
|
306
|
+
description: 回滚成功
|
|
307
|
+
content:
|
|
308
|
+
application/json:
|
|
309
|
+
schema:
|
|
310
|
+
$ref: '../components/schemas/_index.yaml#/PublishResponse'
|
|
311
|
+
'400':
|
|
312
|
+
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
313
|
+
'401':
|
|
314
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
315
|
+
'404':
|
|
316
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
317
|
+
'500':
|
|
318
|
+
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
319
|
+
|
|
320
|
+
# 其他功能
|
|
321
|
+
pages/{pageId}/duplicate:
|
|
322
|
+
post:
|
|
323
|
+
tags: [Pages]
|
|
324
|
+
operationId: duplicatePage
|
|
325
|
+
summary: 复制页面
|
|
326
|
+
description: 复制一个页面,生成新的页面副本
|
|
327
|
+
parameters:
|
|
328
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
329
|
+
responses:
|
|
330
|
+
'200':
|
|
331
|
+
description: 复制成功
|
|
332
|
+
content:
|
|
333
|
+
application/json:
|
|
334
|
+
schema:
|
|
335
|
+
$ref: '../components/schemas/_index.yaml#/PageResponse'
|
|
336
|
+
'401':
|
|
337
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
338
|
+
'404':
|
|
339
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
340
|
+
|
|
341
|
+
pages/{pageId}/preview:
|
|
342
|
+
get:
|
|
343
|
+
tags: [Preview]
|
|
344
|
+
operationId: getPreview
|
|
345
|
+
summary: 预览页面
|
|
346
|
+
description: 获取页面预览数据
|
|
347
|
+
parameters:
|
|
348
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
349
|
+
- name: device
|
|
350
|
+
in: query
|
|
351
|
+
schema:
|
|
352
|
+
type: string
|
|
353
|
+
enum: [h5, tablet, pc, responsive]
|
|
354
|
+
description: 预览设备类型
|
|
355
|
+
responses:
|
|
356
|
+
'200':
|
|
357
|
+
description: 获取成功
|
|
358
|
+
content:
|
|
359
|
+
application/json:
|
|
360
|
+
schema:
|
|
361
|
+
allOf:
|
|
362
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
363
|
+
- type: object
|
|
364
|
+
properties:
|
|
365
|
+
data:
|
|
366
|
+
type: object
|
|
367
|
+
description: 预览数据
|
|
368
|
+
'401':
|
|
369
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
370
|
+
'404':
|
|
371
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
372
|
+
|
|
373
|
+
pages/{pageId}/stats:
|
|
374
|
+
get:
|
|
375
|
+
tags: [Pages]
|
|
376
|
+
operationId: getPageStats
|
|
377
|
+
summary: 获取页面统计信息
|
|
378
|
+
description: 获取页面的访问次数、版本数量等统计数据
|
|
379
|
+
parameters:
|
|
380
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
381
|
+
responses:
|
|
382
|
+
'200':
|
|
383
|
+
description: 获取成功
|
|
384
|
+
content:
|
|
385
|
+
application/json:
|
|
386
|
+
schema:
|
|
387
|
+
allOf:
|
|
388
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
389
|
+
- type: object
|
|
390
|
+
properties:
|
|
391
|
+
data:
|
|
392
|
+
type: object
|
|
393
|
+
properties:
|
|
394
|
+
viewCount:
|
|
395
|
+
type: integer
|
|
396
|
+
versionCount:
|
|
397
|
+
type: integer
|
|
398
|
+
lastPublishedAt:
|
|
399
|
+
type: string
|
|
400
|
+
format: date-time
|
|
401
|
+
'401':
|
|
402
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
403
|
+
'404':
|
|
404
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
405
|
+
|
|
406
|
+
pages/{pageId}/archive:
|
|
407
|
+
post:
|
|
408
|
+
tags: [Pages]
|
|
409
|
+
operationId: archivePage
|
|
410
|
+
summary: 归档页面
|
|
411
|
+
description: 将页面归档,归档后页面不可编辑和发布
|
|
412
|
+
parameters:
|
|
413
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
414
|
+
responses:
|
|
415
|
+
'200':
|
|
416
|
+
description: 归档成功
|
|
417
|
+
content:
|
|
418
|
+
application/json:
|
|
419
|
+
schema:
|
|
420
|
+
$ref: '../components/schemas/_index.yaml#/PageResponse'
|
|
421
|
+
'401':
|
|
422
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
423
|
+
'404':
|
|
424
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
425
|
+
|
|
426
|
+
pages/{pageId}/restore:
|
|
427
|
+
post:
|
|
428
|
+
tags: [Pages]
|
|
429
|
+
operationId: restorePage
|
|
430
|
+
summary: 恢复归档页面
|
|
431
|
+
description: 将已归档的页面恢复为正常状态
|
|
432
|
+
parameters:
|
|
433
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
434
|
+
responses:
|
|
435
|
+
'200':
|
|
436
|
+
description: 恢复成功
|
|
437
|
+
content:
|
|
438
|
+
application/json:
|
|
439
|
+
schema:
|
|
440
|
+
$ref: '../components/schemas/_index.yaml#/PageResponse'
|
|
441
|
+
'401':
|
|
442
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
443
|
+
'404':
|
|
444
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
445
|
+
|
|
446
|
+
pages/{pageId}/versions/{versionId1}/compare/{versionId2}:
|
|
447
|
+
get:
|
|
448
|
+
tags: [Versions]
|
|
449
|
+
operationId: compareVersions
|
|
450
|
+
summary: 比较两个版本
|
|
451
|
+
description: 获取两个版本的 Schema 用于对比
|
|
452
|
+
parameters:
|
|
453
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
454
|
+
- name: versionId1
|
|
455
|
+
in: path
|
|
456
|
+
required: true
|
|
457
|
+
schema:
|
|
458
|
+
type: string
|
|
459
|
+
description: 版本1 ID
|
|
460
|
+
- name: versionId2
|
|
461
|
+
in: path
|
|
462
|
+
required: true
|
|
463
|
+
schema:
|
|
464
|
+
type: string
|
|
465
|
+
description: 版本2 ID
|
|
466
|
+
responses:
|
|
467
|
+
'200':
|
|
468
|
+
description: 查询成功
|
|
469
|
+
content:
|
|
470
|
+
application/json:
|
|
471
|
+
schema:
|
|
472
|
+
allOf:
|
|
473
|
+
- $ref: '../components/schemas/_index.yaml#/SuccessResponse'
|
|
474
|
+
- type: object
|
|
475
|
+
properties:
|
|
476
|
+
data:
|
|
477
|
+
type: object
|
|
478
|
+
properties:
|
|
479
|
+
version1:
|
|
480
|
+
type: object
|
|
481
|
+
version2:
|
|
482
|
+
type: object
|
|
483
|
+
diff:
|
|
484
|
+
type: object
|
|
485
|
+
'401':
|
|
486
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
487
|
+
'404':
|
|
488
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djvlc/openapi-admin-client",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.11",
|
|
4
4
|
"description": "DJV Low-code Platform - Admin API 客户端(自动生成)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"generate": "openapi-generator-cli generate -i openapi/admin-api.yaml -g typescript-fetch -o src/generated --additional-properties=supportsES6=true,typescriptThreePlus=true"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@djvlc/openapi-client-core": "1.2.
|
|
29
|
+
"@djvlc/openapi-client-core": "1.2.9"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^20.0.0",
|