@djvlc/openapi-admin-client 1.4.0 → 1.6.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 +4328 -3566
- package/dist/index.d.ts +4328 -3566
- package/dist/index.js +16760 -4793
- package/dist/index.mjs +16702 -4436
- package/openapi/dist/admin-api.yaml +3168 -0
- package/openapi/src/components/parameters/_index.yaml +54 -0
- package/openapi/src/components/responses/_index.yaml +65 -0
- package/openapi/src/components/schemas/_index.yaml +1165 -0
- package/openapi/src/openapi.yaml +135 -0
- package/openapi/src/paths/activities.yaml +214 -0
- package/openapi/src/paths/audit.yaml +159 -0
- package/openapi/src/paths/components.yaml +88 -0
- package/openapi/src/paths/definitions.yaml +356 -0
- package/openapi/src/paths/drafts.yaml +71 -0
- package/openapi/src/paths/operations.yaml +99 -0
- package/openapi/src/paths/pages.yaml +126 -0
- package/openapi/src/paths/rollout.yaml +166 -0
- package/openapi/src/paths/versions.yaml +110 -0
- package/package.json +8 -7
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Rollout 灰度发布 API
|
|
2
|
+
|
|
3
|
+
rollout:
|
|
4
|
+
get:
|
|
5
|
+
tags:
|
|
6
|
+
- Rollout
|
|
7
|
+
summary: 获取页面灰度配置
|
|
8
|
+
operationId: getRolloutConfig
|
|
9
|
+
parameters:
|
|
10
|
+
- name: pageId
|
|
11
|
+
in: path
|
|
12
|
+
required: true
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
responses:
|
|
16
|
+
'200':
|
|
17
|
+
description: 成功
|
|
18
|
+
content:
|
|
19
|
+
application/json:
|
|
20
|
+
schema:
|
|
21
|
+
type: object
|
|
22
|
+
properties:
|
|
23
|
+
success:
|
|
24
|
+
type: boolean
|
|
25
|
+
data:
|
|
26
|
+
$ref: '../components/schemas/_index.yaml#/RolloutConfig'
|
|
27
|
+
'404':
|
|
28
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
29
|
+
|
|
30
|
+
put:
|
|
31
|
+
tags:
|
|
32
|
+
- Rollout
|
|
33
|
+
summary: 更新页面灰度配置
|
|
34
|
+
operationId: updateRolloutConfig
|
|
35
|
+
parameters:
|
|
36
|
+
- name: pageId
|
|
37
|
+
in: path
|
|
38
|
+
required: true
|
|
39
|
+
schema:
|
|
40
|
+
type: string
|
|
41
|
+
requestBody:
|
|
42
|
+
required: true
|
|
43
|
+
content:
|
|
44
|
+
application/json:
|
|
45
|
+
schema:
|
|
46
|
+
$ref: '../components/schemas/_index.yaml#/UpdateRolloutRequest'
|
|
47
|
+
responses:
|
|
48
|
+
'200':
|
|
49
|
+
description: 更新成功
|
|
50
|
+
content:
|
|
51
|
+
application/json:
|
|
52
|
+
schema:
|
|
53
|
+
type: object
|
|
54
|
+
properties:
|
|
55
|
+
success:
|
|
56
|
+
type: boolean
|
|
57
|
+
data:
|
|
58
|
+
$ref: '../components/schemas/_index.yaml#/RolloutConfig'
|
|
59
|
+
'400':
|
|
60
|
+
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
61
|
+
'404':
|
|
62
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
63
|
+
|
|
64
|
+
delete:
|
|
65
|
+
tags:
|
|
66
|
+
- Rollout
|
|
67
|
+
summary: 删除页面灰度配置(使用默认版本)
|
|
68
|
+
operationId: deleteRolloutConfig
|
|
69
|
+
parameters:
|
|
70
|
+
- name: pageId
|
|
71
|
+
in: path
|
|
72
|
+
required: true
|
|
73
|
+
schema:
|
|
74
|
+
type: string
|
|
75
|
+
responses:
|
|
76
|
+
'204':
|
|
77
|
+
description: 删除成功
|
|
78
|
+
'404':
|
|
79
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
80
|
+
|
|
81
|
+
rolloutStrategies:
|
|
82
|
+
post:
|
|
83
|
+
tags:
|
|
84
|
+
- Rollout
|
|
85
|
+
summary: 添加灰度策略
|
|
86
|
+
operationId: addRolloutStrategy
|
|
87
|
+
parameters:
|
|
88
|
+
- name: pageId
|
|
89
|
+
in: path
|
|
90
|
+
required: true
|
|
91
|
+
schema:
|
|
92
|
+
type: string
|
|
93
|
+
requestBody:
|
|
94
|
+
required: true
|
|
95
|
+
content:
|
|
96
|
+
application/json:
|
|
97
|
+
schema:
|
|
98
|
+
$ref: '../components/schemas/_index.yaml#/AddRolloutStrategyRequest'
|
|
99
|
+
responses:
|
|
100
|
+
'201':
|
|
101
|
+
description: 添加成功
|
|
102
|
+
content:
|
|
103
|
+
application/json:
|
|
104
|
+
schema:
|
|
105
|
+
type: object
|
|
106
|
+
properties:
|
|
107
|
+
success:
|
|
108
|
+
type: boolean
|
|
109
|
+
data:
|
|
110
|
+
$ref: '../components/schemas/_index.yaml#/RolloutStrategy'
|
|
111
|
+
|
|
112
|
+
rolloutStrategyById:
|
|
113
|
+
put:
|
|
114
|
+
tags:
|
|
115
|
+
- Rollout
|
|
116
|
+
summary: 更新灰度策略
|
|
117
|
+
operationId: updateRolloutStrategy
|
|
118
|
+
parameters:
|
|
119
|
+
- name: pageId
|
|
120
|
+
in: path
|
|
121
|
+
required: true
|
|
122
|
+
schema:
|
|
123
|
+
type: string
|
|
124
|
+
- name: strategyId
|
|
125
|
+
in: path
|
|
126
|
+
required: true
|
|
127
|
+
schema:
|
|
128
|
+
type: string
|
|
129
|
+
requestBody:
|
|
130
|
+
required: true
|
|
131
|
+
content:
|
|
132
|
+
application/json:
|
|
133
|
+
schema:
|
|
134
|
+
$ref: '../components/schemas/_index.yaml#/UpdateRolloutStrategyRequest'
|
|
135
|
+
responses:
|
|
136
|
+
'200':
|
|
137
|
+
description: 更新成功
|
|
138
|
+
content:
|
|
139
|
+
application/json:
|
|
140
|
+
schema:
|
|
141
|
+
type: object
|
|
142
|
+
properties:
|
|
143
|
+
success:
|
|
144
|
+
type: boolean
|
|
145
|
+
data:
|
|
146
|
+
$ref: '../components/schemas/_index.yaml#/RolloutStrategy'
|
|
147
|
+
|
|
148
|
+
delete:
|
|
149
|
+
tags:
|
|
150
|
+
- Rollout
|
|
151
|
+
summary: 删除灰度策略
|
|
152
|
+
operationId: deleteRolloutStrategy
|
|
153
|
+
parameters:
|
|
154
|
+
- name: pageId
|
|
155
|
+
in: path
|
|
156
|
+
required: true
|
|
157
|
+
schema:
|
|
158
|
+
type: string
|
|
159
|
+
- name: strategyId
|
|
160
|
+
in: path
|
|
161
|
+
required: true
|
|
162
|
+
schema:
|
|
163
|
+
type: string
|
|
164
|
+
responses:
|
|
165
|
+
'204':
|
|
166
|
+
description: 删除成功
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# 版本管理相关路径
|
|
2
|
+
|
|
3
|
+
versions:
|
|
4
|
+
get:
|
|
5
|
+
tags: [Versions]
|
|
6
|
+
operationId: listVersions
|
|
7
|
+
summary: 获取版本列表
|
|
8
|
+
description: 获取指定页面的所有版本
|
|
9
|
+
parameters:
|
|
10
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
11
|
+
- $ref: '../components/parameters/_index.yaml#/PageParam'
|
|
12
|
+
- $ref: '../components/parameters/_index.yaml#/LimitParam'
|
|
13
|
+
responses:
|
|
14
|
+
'200':
|
|
15
|
+
description: 成功
|
|
16
|
+
content:
|
|
17
|
+
application/json:
|
|
18
|
+
schema:
|
|
19
|
+
$ref: '../components/schemas/_index.yaml#/VersionListResponse'
|
|
20
|
+
'401':
|
|
21
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
22
|
+
'404':
|
|
23
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
24
|
+
'500':
|
|
25
|
+
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
26
|
+
|
|
27
|
+
versions/{versionId}:
|
|
28
|
+
get:
|
|
29
|
+
tags: [Versions]
|
|
30
|
+
operationId: getVersion
|
|
31
|
+
summary: 获取版本详情
|
|
32
|
+
description: 获取指定版本的完整内容
|
|
33
|
+
parameters:
|
|
34
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
35
|
+
- $ref: '../components/parameters/_index.yaml#/VersionIdPath'
|
|
36
|
+
responses:
|
|
37
|
+
'200':
|
|
38
|
+
description: 成功
|
|
39
|
+
content:
|
|
40
|
+
application/json:
|
|
41
|
+
schema:
|
|
42
|
+
$ref: '../components/schemas/_index.yaml#/VersionResponse'
|
|
43
|
+
'401':
|
|
44
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
45
|
+
'404':
|
|
46
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
47
|
+
'500':
|
|
48
|
+
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
49
|
+
|
|
50
|
+
publish:
|
|
51
|
+
post:
|
|
52
|
+
tags: [Versions]
|
|
53
|
+
operationId: publishVersion
|
|
54
|
+
summary: 发布版本
|
|
55
|
+
description: 将当前草稿发布为新版本
|
|
56
|
+
parameters:
|
|
57
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
58
|
+
requestBody:
|
|
59
|
+
required: true
|
|
60
|
+
content:
|
|
61
|
+
application/json:
|
|
62
|
+
schema:
|
|
63
|
+
$ref: '../components/schemas/_index.yaml#/PublishRequest'
|
|
64
|
+
responses:
|
|
65
|
+
'201':
|
|
66
|
+
description: 发布成功
|
|
67
|
+
content:
|
|
68
|
+
application/json:
|
|
69
|
+
schema:
|
|
70
|
+
$ref: '../components/schemas/_index.yaml#/PublishResponse'
|
|
71
|
+
'400':
|
|
72
|
+
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
73
|
+
'401':
|
|
74
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
75
|
+
'404':
|
|
76
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
77
|
+
'409':
|
|
78
|
+
$ref: '../components/responses/_index.yaml#/Conflict'
|
|
79
|
+
'500':
|
|
80
|
+
$ref: '../components/responses/_index.yaml#/InternalError'
|
|
81
|
+
|
|
82
|
+
rollback:
|
|
83
|
+
post:
|
|
84
|
+
tags: [Versions]
|
|
85
|
+
operationId: rollbackVersion
|
|
86
|
+
summary: 回滚版本
|
|
87
|
+
description: 回滚到指定的历史版本
|
|
88
|
+
parameters:
|
|
89
|
+
- $ref: '../components/parameters/_index.yaml#/PageIdPath'
|
|
90
|
+
requestBody:
|
|
91
|
+
required: true
|
|
92
|
+
content:
|
|
93
|
+
application/json:
|
|
94
|
+
schema:
|
|
95
|
+
$ref: '../components/schemas/_index.yaml#/RollbackRequest'
|
|
96
|
+
responses:
|
|
97
|
+
'200':
|
|
98
|
+
description: 回滚成功
|
|
99
|
+
content:
|
|
100
|
+
application/json:
|
|
101
|
+
schema:
|
|
102
|
+
$ref: '../components/schemas/_index.yaml#/PublishResponse'
|
|
103
|
+
'400':
|
|
104
|
+
$ref: '../components/responses/_index.yaml#/BadRequest'
|
|
105
|
+
'401':
|
|
106
|
+
$ref: '../components/responses/_index.yaml#/Unauthorized'
|
|
107
|
+
'404':
|
|
108
|
+
$ref: '../components/responses/_index.yaml#/NotFound'
|
|
109
|
+
'500':
|
|
110
|
+
$ref: '../components/responses/_index.yaml#/InternalError'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djvlc/openapi-admin-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "DJV Low-code Platform - Admin API 客户端(自动生成)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -13,19 +13,20 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"openapi"
|
|
17
18
|
],
|
|
18
19
|
"sideEffects": false,
|
|
19
20
|
"scripts": {
|
|
20
|
-
"clean": "rimraf src/gen dist",
|
|
21
|
-
"gen": "node ../../tools/openapi/generate-clients.js admin",
|
|
22
21
|
"build": "tsup --config tsup.config.ts",
|
|
22
|
+
"clean": "rimraf src/generated dist",
|
|
23
23
|
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
24
|
-
"lint": "eslint src/ --ext .ts --ignore-pattern src/
|
|
25
|
-
"typecheck": "tsc --noEmit"
|
|
24
|
+
"lint": "eslint src/ --ext .ts --ignore-pattern src/generated/",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"generate": "openapi-generator-cli generate -i openapi/admin-api.yaml -g typescript-fetch -o src/generated --additional-properties=supportsES6=true,typescriptThreePlus=true"
|
|
26
27
|
},
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@djvlc/openapi-client-core": "1.
|
|
29
|
+
"@djvlc/openapi-client-core": "1.2.0"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/node": "^20.0.0",
|