@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.
@@ -0,0 +1,356 @@
1
+ # Definition 管理 API
2
+
3
+ # Action Definitions
4
+ actionDefinitions:
5
+ get:
6
+ tags:
7
+ - Definitions
8
+ summary: 获取 ActionDefinition 列表
9
+ operationId: listActionDefinitions
10
+ parameters:
11
+ - name: pageSize
12
+ in: query
13
+ schema:
14
+ type: integer
15
+ default: 20
16
+ - name: pageToken
17
+ in: query
18
+ schema:
19
+ type: string
20
+ - name: actionType
21
+ in: query
22
+ schema:
23
+ type: string
24
+ enum: [claim, signin, lottery, reserve, bind, task_complete, vote, share, form_submit, custom]
25
+ - name: status
26
+ in: query
27
+ schema:
28
+ type: string
29
+ enum: [draft, stable, deprecated, blocked]
30
+ responses:
31
+ '200':
32
+ description: 成功
33
+ content:
34
+ application/json:
35
+ schema:
36
+ type: object
37
+ properties:
38
+ success:
39
+ type: boolean
40
+ data:
41
+ type: array
42
+ items:
43
+ $ref: '../components/schemas/_index.yaml#/ActionDefinitionInfo'
44
+ meta:
45
+ $ref: '../components/schemas/_index.yaml#/PaginationMeta'
46
+ '401':
47
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
48
+
49
+ post:
50
+ tags:
51
+ - Definitions
52
+ summary: 创建 ActionDefinition
53
+ operationId: createActionDefinition
54
+ requestBody:
55
+ required: true
56
+ content:
57
+ application/json:
58
+ schema:
59
+ $ref: '../components/schemas/_index.yaml#/CreateActionDefinitionRequest'
60
+ responses:
61
+ '201':
62
+ description: 创建成功
63
+ content:
64
+ application/json:
65
+ schema:
66
+ type: object
67
+ properties:
68
+ success:
69
+ type: boolean
70
+ data:
71
+ $ref: '../components/schemas/_index.yaml#/ActionDefinitionInfo'
72
+ '400':
73
+ $ref: '../components/responses/_index.yaml#/BadRequest'
74
+ '401':
75
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
76
+
77
+ actionDefinitionById:
78
+ get:
79
+ tags:
80
+ - Definitions
81
+ summary: 获取 ActionDefinition 详情
82
+ operationId: getActionDefinition
83
+ parameters:
84
+ - name: definitionId
85
+ in: path
86
+ required: true
87
+ schema:
88
+ type: string
89
+ responses:
90
+ '200':
91
+ description: 成功
92
+ content:
93
+ application/json:
94
+ schema:
95
+ type: object
96
+ properties:
97
+ success:
98
+ type: boolean
99
+ data:
100
+ $ref: '../components/schemas/_index.yaml#/ActionDefinitionDetail'
101
+ '404':
102
+ $ref: '../components/responses/_index.yaml#/NotFound'
103
+
104
+ put:
105
+ tags:
106
+ - Definitions
107
+ summary: 更新 ActionDefinition
108
+ operationId: updateActionDefinition
109
+ parameters:
110
+ - name: definitionId
111
+ in: path
112
+ required: true
113
+ schema:
114
+ type: string
115
+ requestBody:
116
+ required: true
117
+ content:
118
+ application/json:
119
+ schema:
120
+ $ref: '../components/schemas/_index.yaml#/UpdateActionDefinitionRequest'
121
+ responses:
122
+ '200':
123
+ description: 更新成功
124
+ content:
125
+ application/json:
126
+ schema:
127
+ type: object
128
+ properties:
129
+ success:
130
+ type: boolean
131
+ data:
132
+ $ref: '../components/schemas/_index.yaml#/ActionDefinitionInfo'
133
+ '400':
134
+ $ref: '../components/responses/_index.yaml#/BadRequest'
135
+ '404':
136
+ $ref: '../components/responses/_index.yaml#/NotFound'
137
+
138
+ actionDefinitionVersions:
139
+ get:
140
+ tags:
141
+ - Definitions
142
+ summary: 获取 ActionDefinition 版本列表
143
+ operationId: listActionDefinitionVersions
144
+ parameters:
145
+ - name: definitionId
146
+ in: path
147
+ required: true
148
+ schema:
149
+ type: string
150
+ - name: pageSize
151
+ in: query
152
+ schema:
153
+ type: integer
154
+ default: 20
155
+ - name: pageToken
156
+ in: query
157
+ schema:
158
+ type: string
159
+ responses:
160
+ '200':
161
+ description: 成功
162
+ content:
163
+ application/json:
164
+ schema:
165
+ type: object
166
+ properties:
167
+ success:
168
+ type: boolean
169
+ data:
170
+ type: array
171
+ items:
172
+ $ref: '../components/schemas/_index.yaml#/DefinitionVersionInfo'
173
+ meta:
174
+ $ref: '../components/schemas/_index.yaml#/PaginationMeta'
175
+
176
+ post:
177
+ tags:
178
+ - Definitions
179
+ summary: 发布 ActionDefinition 新版本
180
+ operationId: publishActionDefinitionVersion
181
+ parameters:
182
+ - name: definitionId
183
+ in: path
184
+ required: true
185
+ schema:
186
+ type: string
187
+ requestBody:
188
+ required: true
189
+ content:
190
+ application/json:
191
+ schema:
192
+ $ref: '../components/schemas/_index.yaml#/PublishDefinitionVersionRequest'
193
+ responses:
194
+ '201':
195
+ description: 发布成功
196
+ content:
197
+ application/json:
198
+ schema:
199
+ type: object
200
+ properties:
201
+ success:
202
+ type: boolean
203
+ data:
204
+ $ref: '../components/schemas/_index.yaml#/DefinitionVersionInfo'
205
+
206
+ # Data Query Definitions
207
+ dataQueryDefinitions:
208
+ get:
209
+ tags:
210
+ - Definitions
211
+ summary: 获取 DataQueryDefinition 列表
212
+ operationId: listDataQueryDefinitions
213
+ parameters:
214
+ - name: pageSize
215
+ in: query
216
+ schema:
217
+ type: integer
218
+ default: 20
219
+ - name: pageToken
220
+ in: query
221
+ schema:
222
+ type: string
223
+ - name: sourceType
224
+ in: query
225
+ schema:
226
+ type: string
227
+ enum: [http, graphql, database, internal, aggregation]
228
+ - name: status
229
+ in: query
230
+ schema:
231
+ type: string
232
+ enum: [draft, stable, deprecated, blocked]
233
+ responses:
234
+ '200':
235
+ description: 成功
236
+ content:
237
+ application/json:
238
+ schema:
239
+ type: object
240
+ properties:
241
+ success:
242
+ type: boolean
243
+ data:
244
+ type: array
245
+ items:
246
+ $ref: '../components/schemas/_index.yaml#/DataQueryDefinitionInfo'
247
+ meta:
248
+ $ref: '../components/schemas/_index.yaml#/PaginationMeta'
249
+
250
+ post:
251
+ tags:
252
+ - Definitions
253
+ summary: 创建 DataQueryDefinition
254
+ operationId: createDataQueryDefinition
255
+ requestBody:
256
+ required: true
257
+ content:
258
+ application/json:
259
+ schema:
260
+ $ref: '../components/schemas/_index.yaml#/CreateDataQueryDefinitionRequest'
261
+ responses:
262
+ '201':
263
+ description: 创建成功
264
+ content:
265
+ application/json:
266
+ schema:
267
+ type: object
268
+ properties:
269
+ success:
270
+ type: boolean
271
+ data:
272
+ $ref: '../components/schemas/_index.yaml#/DataQueryDefinitionInfo'
273
+
274
+ dataQueryDefinitionById:
275
+ get:
276
+ tags:
277
+ - Definitions
278
+ summary: 获取 DataQueryDefinition 详情
279
+ operationId: getDataQueryDefinition
280
+ parameters:
281
+ - name: definitionId
282
+ in: path
283
+ required: true
284
+ schema:
285
+ type: string
286
+ responses:
287
+ '200':
288
+ description: 成功
289
+ content:
290
+ application/json:
291
+ schema:
292
+ type: object
293
+ properties:
294
+ success:
295
+ type: boolean
296
+ data:
297
+ $ref: '../components/schemas/_index.yaml#/DataQueryDefinitionDetail'
298
+ '404':
299
+ $ref: '../components/responses/_index.yaml#/NotFound'
300
+
301
+ dataQueryDefinitionVersions:
302
+ get:
303
+ tags:
304
+ - Definitions
305
+ summary: 获取 DataQueryDefinition 版本列表
306
+ operationId: listDataQueryDefinitionVersions
307
+ parameters:
308
+ - name: definitionId
309
+ in: path
310
+ required: true
311
+ schema:
312
+ type: string
313
+ responses:
314
+ '200':
315
+ description: 成功
316
+ content:
317
+ application/json:
318
+ schema:
319
+ type: object
320
+ properties:
321
+ success:
322
+ type: boolean
323
+ data:
324
+ type: array
325
+ items:
326
+ $ref: '../components/schemas/_index.yaml#/DefinitionVersionInfo'
327
+
328
+ post:
329
+ tags:
330
+ - Definitions
331
+ summary: 发布 DataQueryDefinition 新版本
332
+ operationId: publishDataQueryDefinitionVersion
333
+ parameters:
334
+ - name: definitionId
335
+ in: path
336
+ required: true
337
+ schema:
338
+ type: string
339
+ requestBody:
340
+ required: true
341
+ content:
342
+ application/json:
343
+ schema:
344
+ $ref: '../components/schemas/_index.yaml#/PublishDefinitionVersionRequest'
345
+ responses:
346
+ '201':
347
+ description: 发布成功
348
+ content:
349
+ application/json:
350
+ schema:
351
+ type: object
352
+ properties:
353
+ success:
354
+ type: boolean
355
+ data:
356
+ $ref: '../components/schemas/_index.yaml#/DefinitionVersionInfo'
@@ -0,0 +1,71 @@
1
+ # 草稿管理相关路径
2
+
3
+ draft:
4
+ get:
5
+ tags: [Drafts]
6
+ operationId: getDraft
7
+ summary: 获取页面草稿
8
+ description: 获取指定页面的当前草稿内容
9
+ parameters:
10
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
11
+ responses:
12
+ '200':
13
+ description: 成功
14
+ content:
15
+ application/json:
16
+ schema:
17
+ $ref: '../components/schemas/_index.yaml#/DraftResponse'
18
+ '401':
19
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
20
+ '404':
21
+ $ref: '../components/responses/_index.yaml#/NotFound'
22
+ '500':
23
+ $ref: '../components/responses/_index.yaml#/InternalError'
24
+
25
+ put:
26
+ tags: [Drafts]
27
+ operationId: saveDraft
28
+ summary: 保存草稿
29
+ description: 保存页面草稿,支持增量保存
30
+ parameters:
31
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
32
+ requestBody:
33
+ required: true
34
+ content:
35
+ application/json:
36
+ schema:
37
+ $ref: '../components/schemas/_index.yaml#/SaveDraftRequest'
38
+ responses:
39
+ '200':
40
+ description: 保存成功
41
+ content:
42
+ application/json:
43
+ schema:
44
+ $ref: '../components/schemas/_index.yaml#/DraftResponse'
45
+ '400':
46
+ $ref: '../components/responses/_index.yaml#/BadRequest'
47
+ '401':
48
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
49
+ '404':
50
+ $ref: '../components/responses/_index.yaml#/NotFound'
51
+ '409':
52
+ $ref: '../components/responses/_index.yaml#/Conflict'
53
+ '500':
54
+ $ref: '../components/responses/_index.yaml#/InternalError'
55
+
56
+ delete:
57
+ tags: [Drafts]
58
+ operationId: discardDraft
59
+ summary: 丢弃草稿
60
+ description: 丢弃当前草稿,恢复到最后发布的版本
61
+ parameters:
62
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
63
+ responses:
64
+ '204':
65
+ description: 丢弃成功
66
+ '401':
67
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
68
+ '404':
69
+ $ref: '../components/responses/_index.yaml#/NotFound'
70
+ '500':
71
+ $ref: '../components/responses/_index.yaml#/InternalError'
@@ -0,0 +1,99 @@
1
+ # 运维操作相关路径
2
+
3
+ killSwitch:
4
+ get:
5
+ tags: [Operations]
6
+ operationId: getKillSwitchStatus
7
+ summary: 获取 Kill Switch 状态
8
+ description: 获取全局 Kill Switch 状态
9
+ responses:
10
+ '200':
11
+ description: 成功
12
+ content:
13
+ application/json:
14
+ schema:
15
+ $ref: '../components/schemas/_index.yaml#/KillSwitchStatusResponse'
16
+ '401':
17
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
18
+ '500':
19
+ $ref: '../components/responses/_index.yaml#/InternalError'
20
+
21
+ put:
22
+ tags: [Operations]
23
+ operationId: setGlobalKillSwitch
24
+ summary: 设置全局 Kill Switch
25
+ description: 启用或禁用全局 Kill Switch(紧急停用所有页面)
26
+ requestBody:
27
+ required: true
28
+ content:
29
+ application/json:
30
+ schema:
31
+ $ref: '../components/schemas/_index.yaml#/SetKillSwitchRequest'
32
+ responses:
33
+ '200':
34
+ description: 设置成功
35
+ content:
36
+ application/json:
37
+ schema:
38
+ $ref: '../components/schemas/_index.yaml#/KillSwitchStatusResponse'
39
+ '400':
40
+ $ref: '../components/responses/_index.yaml#/BadRequest'
41
+ '401':
42
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
43
+ '403':
44
+ $ref: '../components/responses/_index.yaml#/Forbidden'
45
+ '500':
46
+ $ref: '../components/responses/_index.yaml#/InternalError'
47
+
48
+ killSwitchPage:
49
+ get:
50
+ tags: [Operations]
51
+ operationId: getPageKillSwitchStatus
52
+ summary: 获取页面 Kill Switch 状态
53
+ description: 获取指定页面的 Kill Switch 状态
54
+ parameters:
55
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
56
+ responses:
57
+ '200':
58
+ description: 成功
59
+ content:
60
+ application/json:
61
+ schema:
62
+ $ref: '../components/schemas/_index.yaml#/PageKillSwitchStatusResponse'
63
+ '401':
64
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
65
+ '404':
66
+ $ref: '../components/responses/_index.yaml#/NotFound'
67
+ '500':
68
+ $ref: '../components/responses/_index.yaml#/InternalError'
69
+
70
+ put:
71
+ tags: [Operations]
72
+ operationId: setPageKillSwitch
73
+ summary: 设置页面 Kill Switch
74
+ description: 启用或禁用指定页面的 Kill Switch
75
+ parameters:
76
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
77
+ requestBody:
78
+ required: true
79
+ content:
80
+ application/json:
81
+ schema:
82
+ $ref: '../components/schemas/_index.yaml#/SetKillSwitchRequest'
83
+ responses:
84
+ '200':
85
+ description: 设置成功
86
+ content:
87
+ application/json:
88
+ schema:
89
+ $ref: '../components/schemas/_index.yaml#/PageKillSwitchStatusResponse'
90
+ '400':
91
+ $ref: '../components/responses/_index.yaml#/BadRequest'
92
+ '401':
93
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
94
+ '403':
95
+ $ref: '../components/responses/_index.yaml#/Forbidden'
96
+ '404':
97
+ $ref: '../components/responses/_index.yaml#/NotFound'
98
+ '500':
99
+ $ref: '../components/responses/_index.yaml#/InternalError'
@@ -0,0 +1,126 @@
1
+ # 页面管理相关路径
2
+
3
+ pages:
4
+ get:
5
+ tags: [Pages]
6
+ operationId: listPages
7
+ summary: 获取页面列表
8
+ description: 分页获取所有页面的基本信息
9
+ parameters:
10
+ - $ref: '../components/parameters/_index.yaml#/PageParam'
11
+ - $ref: '../components/parameters/_index.yaml#/LimitParam'
12
+ - name: status
13
+ in: query
14
+ schema:
15
+ type: string
16
+ enum: [draft, published, archived]
17
+ description: 按状态筛选
18
+ - name: search
19
+ in: query
20
+ schema:
21
+ type: string
22
+ description: 搜索关键词
23
+ responses:
24
+ '200':
25
+ description: 成功
26
+ content:
27
+ application/json:
28
+ schema:
29
+ $ref: '../components/schemas/_index.yaml#/PageListResponse'
30
+ '401':
31
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
32
+ '500':
33
+ $ref: '../components/responses/_index.yaml#/InternalError'
34
+
35
+ post:
36
+ tags: [Pages]
37
+ operationId: createPage
38
+ summary: 创建新页面
39
+ description: 创建一个新的页面,返回页面 ID
40
+ requestBody:
41
+ required: true
42
+ content:
43
+ application/json:
44
+ schema:
45
+ $ref: '../components/schemas/_index.yaml#/CreatePageRequest'
46
+ responses:
47
+ '201':
48
+ description: 创建成功
49
+ content:
50
+ application/json:
51
+ schema:
52
+ $ref: '../components/schemas/_index.yaml#/PageResponse'
53
+ '400':
54
+ $ref: '../components/responses/_index.yaml#/BadRequest'
55
+ '401':
56
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
57
+ '500':
58
+ $ref: '../components/responses/_index.yaml#/InternalError'
59
+
60
+ pages/{pageId}:
61
+ get:
62
+ tags: [Pages]
63
+ operationId: getPage
64
+ summary: 获取页面详情
65
+ description: 获取指定页面的完整信息
66
+ parameters:
67
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
68
+ responses:
69
+ '200':
70
+ description: 成功
71
+ content:
72
+ application/json:
73
+ schema:
74
+ $ref: '../components/schemas/_index.yaml#/PageResponse'
75
+ '401':
76
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
77
+ '404':
78
+ $ref: '../components/responses/_index.yaml#/NotFound'
79
+ '500':
80
+ $ref: '../components/responses/_index.yaml#/InternalError'
81
+
82
+ put:
83
+ tags: [Pages]
84
+ operationId: updatePage
85
+ summary: 更新页面信息
86
+ description: 更新页面的元数据(不包括页面内容)
87
+ parameters:
88
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
89
+ requestBody:
90
+ required: true
91
+ content:
92
+ application/json:
93
+ schema:
94
+ $ref: '../components/schemas/_index.yaml#/UpdatePageRequest'
95
+ responses:
96
+ '200':
97
+ description: 更新成功
98
+ content:
99
+ application/json:
100
+ schema:
101
+ $ref: '../components/schemas/_index.yaml#/PageResponse'
102
+ '400':
103
+ $ref: '../components/responses/_index.yaml#/BadRequest'
104
+ '401':
105
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
106
+ '404':
107
+ $ref: '../components/responses/_index.yaml#/NotFound'
108
+ '500':
109
+ $ref: '../components/responses/_index.yaml#/InternalError'
110
+
111
+ delete:
112
+ tags: [Pages]
113
+ operationId: deletePage
114
+ summary: 删除页面
115
+ description: 软删除页面(可恢复)
116
+ parameters:
117
+ - $ref: '../components/parameters/_index.yaml#/PageIdPath'
118
+ responses:
119
+ '204':
120
+ description: 删除成功
121
+ '401':
122
+ $ref: '../components/responses/_index.yaml#/Unauthorized'
123
+ '404':
124
+ $ref: '../components/responses/_index.yaml#/NotFound'
125
+ '500':
126
+ $ref: '../components/responses/_index.yaml#/InternalError'