@rainyun/cli 0.0.0-stage → 1.0.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.
Files changed (68) hide show
  1. package/README.md +132 -2
  2. package/bin/postinstall.mjs +13 -0
  3. package/bin/rainyun-cli.mjs +13 -0
  4. package/catalog/human-names.json +340 -0
  5. package/catalog/list.openapi.json +354 -0
  6. package/catalog/openapi.json +34531 -0
  7. package/catalog/product-commands.json +332 -0
  8. package/catalog/public.openapi.json +1895 -0
  9. package/docs/AGENT_GUIDE.md +64 -0
  10. package/docs/install.md +44 -0
  11. package/docs/product-lists.md +48 -0
  12. package/docs/rgp.md +77 -0
  13. package/docs/terminal-exec.md +111 -0
  14. package/examples/public-panel.json +1 -0
  15. package/examples/public-rcs-price.json +1 -0
  16. package/examples/rca-terminal-input.json +1 -0
  17. package/examples/rcs-get.json +1 -0
  18. package/examples/rcs-list.json +1 -0
  19. package/examples/rcs-reboot.json +1 -0
  20. package/examples/terminal-controls.ndjson +3 -0
  21. package/examples/terminal-input.json +1 -0
  22. package/node_modules/ws/LICENSE +20 -0
  23. package/node_modules/ws/README.md +539 -0
  24. package/node_modules/ws/browser.js +8 -0
  25. package/node_modules/ws/index.js +22 -0
  26. package/node_modules/ws/lib/buffer-util.js +142 -0
  27. package/node_modules/ws/lib/constants.js +19 -0
  28. package/node_modules/ws/lib/event-target.js +292 -0
  29. package/node_modules/ws/lib/extension.js +203 -0
  30. package/node_modules/ws/lib/limiter.js +55 -0
  31. package/node_modules/ws/lib/permessage-deflate.js +530 -0
  32. package/node_modules/ws/lib/receiver.js +751 -0
  33. package/node_modules/ws/lib/sender.js +610 -0
  34. package/node_modules/ws/lib/stream.js +161 -0
  35. package/node_modules/ws/lib/subprotocol.js +62 -0
  36. package/node_modules/ws/lib/validation.js +152 -0
  37. package/node_modules/ws/lib/websocket-server.js +565 -0
  38. package/node_modules/ws/lib/websocket.js +1471 -0
  39. package/node_modules/ws/package.json +74 -0
  40. package/node_modules/ws/wrapper.mjs +21 -0
  41. package/package.json +29 -4
  42. package/skills/rainyun-cli/SKILL.md +46 -0
  43. package/src/api/catalog.mjs +230 -0
  44. package/src/api/http.mjs +222 -0
  45. package/src/api/request.mjs +178 -0
  46. package/src/api/titles.mjs +9 -0
  47. package/src/auth/commands.mjs +192 -0
  48. package/src/auth/store.mjs +162 -0
  49. package/src/cli.mjs +154 -0
  50. package/src/commands/dispatch.mjs +128 -0
  51. package/src/commands/fields.mjs +77 -0
  52. package/src/commands/products.mjs +209 -0
  53. package/src/commands/rgs.mjs +44 -0
  54. package/src/json.mjs +81 -0
  55. package/src/output/business.mjs +188 -0
  56. package/src/output/discovery.mjs +197 -0
  57. package/src/output/examples.mjs +71 -0
  58. package/src/output/format.mjs +164 -0
  59. package/src/output/help.json +181 -0
  60. package/src/output/help.mjs +334 -0
  61. package/src/rgp/commands.mjs +251 -0
  62. package/src/rgp/input.mjs +144 -0
  63. package/src/rgp/operations.json +625 -0
  64. package/src/rgp/result.mjs +103 -0
  65. package/src/rgp/transfer.mjs +213 -0
  66. package/src/terminal/commands.mjs +155 -0
  67. package/src/terminal/session.mjs +233 -0
  68. package/src/terminal/target.mjs +155 -0
@@ -0,0 +1,1895 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "雨云公共接口补充快照",
5
+ "version": "2026-11-18",
6
+ "description": "依据本地后端路由、控制器与服务逐项人工核对。公共 JSON API;不包含网页登录、协议回调或 SSE。面板配置仅声明有限的 Referer 请求头。与 API Key 快照合并使用。"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://api.v2.rainyun.com"
11
+ }
12
+ ],
13
+ "paths": {
14
+ "/news": {
15
+ "get": {
16
+ "operationId": "public_news",
17
+ "summary": "查询论坛公告",
18
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
19
+ "tags": [
20
+ "公共"
21
+ ],
22
+ "security": [],
23
+ "x-public": true,
24
+ "x-api-key-enabled": false,
25
+ "x-source-route": "routers/controllers/home.go:22",
26
+ "x-api-key-scopes": [],
27
+ "parameters": [],
28
+ "responses": {
29
+ "200": {
30
+ "description": "HTTP 与业务 code 均成功才视为成功。",
31
+ "content": {
32
+ "application/json": {
33
+ "schema": {
34
+ "$ref": "#/components/schemas/PublicResponse"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "/app_config": {
43
+ "get": {
44
+ "operationId": "public_site_config",
45
+ "summary": "查询公开站点配置",
46
+ "description": "返回 agent_id=0 的公开站点配置。此路由不加载用户身份。",
47
+ "tags": [
48
+ "公共"
49
+ ],
50
+ "security": [],
51
+ "x-public": true,
52
+ "x-api-key-enabled": false,
53
+ "x-source-route": "routers/controllers/home.go:41",
54
+ "x-api-key-scopes": [],
55
+ "parameters": [],
56
+ "responses": {
57
+ "200": {
58
+ "description": "HTTP 与业务 code 均成功才视为成功。",
59
+ "content": {
60
+ "application/json": {
61
+ "schema": {
62
+ "$ref": "#/components/schemas/PublicResponse"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ },
70
+ "/status": {
71
+ "get": {
72
+ "operationId": "public_status",
73
+ "summary": "查询节点网络状态",
74
+ "description": "返回未隐藏节点的状态、分页结果及正在进行的服务事件;options 支持 Product 筛选。",
75
+ "tags": [
76
+ "公共"
77
+ ],
78
+ "security": [],
79
+ "x-public": true,
80
+ "x-api-key-enabled": false,
81
+ "x-source-route": "routers/controllers/home.go:62;services/api/node/status.go:34、85",
82
+ "x-api-key-scopes": [],
83
+ "parameters": [
84
+ {
85
+ "name": "options",
86
+ "in": "query",
87
+ "required": true,
88
+ "description": "分页、筛选和排序条件的 JSON 字符串;CLI 也接受对象并只序列化一次。建议 page=1、perPage=20。",
89
+ "schema": {
90
+ "type": "string"
91
+ },
92
+ "x-json-content-schema": {
93
+ "$ref": "#/components/schemas/PaginationOptions"
94
+ }
95
+ }
96
+ ],
97
+ "responses": {
98
+ "200": {
99
+ "description": "HTTP 与业务 code 均成功才视为成功。",
100
+ "content": {
101
+ "application/json": {
102
+ "schema": {
103
+ "$ref": "#/components/schemas/PublicResponse"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "/discourse": {
112
+ "get": {
113
+ "operationId": "public_discourse",
114
+ "summary": "查询论坛公开数据",
115
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
116
+ "tags": [
117
+ "公共"
118
+ ],
119
+ "security": [],
120
+ "x-public": true,
121
+ "x-api-key-enabled": false,
122
+ "x-source-route": "routers/init.go:82;services/discourse/topic.go:108",
123
+ "x-api-key-scopes": [],
124
+ "parameters": [
125
+ {
126
+ "name": "paths",
127
+ "in": "query",
128
+ "required": true,
129
+ "description": "论坛站内相对路径的标准 Base64 编码;不能是外站绝对 URL。",
130
+ "schema": {
131
+ "type": "string"
132
+ }
133
+ }
134
+ ],
135
+ "responses": {
136
+ "200": {
137
+ "description": "HTTP 与业务 code 均成功才视为成功。",
138
+ "content": {
139
+ "application/json": {
140
+ "schema": {
141
+ "$ref": "#/components/schemas/PublicResponse"
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ },
149
+ "/short_params": {
150
+ "get": {
151
+ "operationId": "public_short_params_get",
152
+ "summary": "读取分享参数",
153
+ "description": "返回 data 字符串,内容是存储的 Base64 编码参数。",
154
+ "tags": [
155
+ "公共"
156
+ ],
157
+ "security": [],
158
+ "x-public": true,
159
+ "x-api-key-enabled": false,
160
+ "x-source-route": "routers/controllers/user.go:367",
161
+ "x-api-key-scopes": [],
162
+ "parameters": [
163
+ {
164
+ "name": "name",
165
+ "in": "query",
166
+ "required": true,
167
+ "description": "短参数名称。",
168
+ "schema": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 10
172
+ }
173
+ }
174
+ ],
175
+ "responses": {
176
+ "200": {
177
+ "description": "HTTP 与业务 code 均成功才视为成功。",
178
+ "content": {
179
+ "application/json": {
180
+ "schema": {
181
+ "$ref": "#/components/schemas/PublicResponse"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "post": {
189
+ "operationId": "public_short_params_create",
190
+ "summary": "创建分享参数",
191
+ "description": "公开写操作。action 仅支持 plan_share;params 传原文,后端会编码成 Base64。Name 是可选 JSON 字段(注意大写),未传则生成名称;存在按 IP 的频率限制。返回 data 为短参数名称。",
192
+ "tags": [
193
+ "公共"
194
+ ],
195
+ "security": [],
196
+ "x-public": true,
197
+ "x-api-key-enabled": false,
198
+ "x-source-route": "routers/init.go:130;routers/controllers/user.go:351;services/user/setting.go:573",
199
+ "x-api-key-scopes": [],
200
+ "parameters": [],
201
+ "responses": {
202
+ "200": {
203
+ "description": "HTTP 与业务 code 均成功才视为成功。",
204
+ "content": {
205
+ "application/json": {
206
+ "schema": {
207
+ "$ref": "#/components/schemas/PublicResponse"
208
+ }
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "requestBody": {
214
+ "required": true,
215
+ "content": {
216
+ "application/json": {
217
+ "schema": {
218
+ "type": "object",
219
+ "required": [
220
+ "action",
221
+ "params"
222
+ ],
223
+ "properties": {
224
+ "Name": {
225
+ "type": "string",
226
+ "minLength": 3,
227
+ "maxLength": 6,
228
+ "description": "可选自定义名称;不提供时自动生成。"
229
+ },
230
+ "action": {
231
+ "type": "string",
232
+ "enum": [
233
+ "plan_share"
234
+ ]
235
+ },
236
+ "params": {
237
+ "type": "string",
238
+ "minLength": 1,
239
+ "maxLength": 2000
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ },
248
+ "/user/vip/top": {
249
+ "get": {
250
+ "operationId": "public_vip_top",
251
+ "summary": "查询公开排行榜",
252
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
253
+ "tags": [
254
+ "公共"
255
+ ],
256
+ "security": [],
257
+ "x-public": true,
258
+ "x-api-key-enabled": false,
259
+ "x-source-route": "routers/init.go:154;routers/controllers/user_vip.go:47",
260
+ "x-api-key-scopes": [],
261
+ "parameters": [],
262
+ "responses": {
263
+ "200": {
264
+ "description": "HTTP 与业务 code 均成功才视为成功。",
265
+ "content": {
266
+ "application/json": {
267
+ "schema": {
268
+ "$ref": "#/components/schemas/PublicResponse"
269
+ }
270
+ }
271
+ }
272
+ }
273
+ }
274
+ }
275
+ },
276
+ "/product/rcs/plans": {
277
+ "get": {
278
+ "operationId": "public_rcs_plans",
279
+ "summary": "查询云服务器套餐",
280
+ "description": "返回套餐列表;不接受私有实例列表的 options 分页参数。",
281
+ "tags": [
282
+ "公共"
283
+ ],
284
+ "security": [],
285
+ "x-public": true,
286
+ "x-api-key-enabled": false,
287
+ "x-source-route": "routers/controllers/product_rcs.go:23;services/product/rcs/plans.go:16",
288
+ "x-api-key-scopes": [],
289
+ "parameters": [
290
+ {
291
+ "name": "is_rgpu",
292
+ "in": "query",
293
+ "required": false,
294
+ "description": "true 查询 GPU 套餐,默认 false。",
295
+ "schema": {
296
+ "type": "boolean"
297
+ }
298
+ }
299
+ ],
300
+ "responses": {
301
+ "200": {
302
+ "description": "HTTP 与业务 code 均成功才视为成功。",
303
+ "content": {
304
+ "application/json": {
305
+ "schema": {
306
+ "$ref": "#/components/schemas/PublicResponse"
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ },
314
+ "/product/rgs/plans": {
315
+ "get": {
316
+ "operationId": "public_rgs_plans",
317
+ "summary": "查询游戏云套餐",
318
+ "description": "返回套餐列表;不接受私有实例列表的 options 分页参数。",
319
+ "tags": [
320
+ "公共"
321
+ ],
322
+ "security": [],
323
+ "x-public": true,
324
+ "x-api-key-enabled": false,
325
+ "x-source-route": "routers/controllers/product_rgs.go:38;services/product/rgs/plans.go:17",
326
+ "x-api-key-scopes": [],
327
+ "parameters": [],
328
+ "responses": {
329
+ "200": {
330
+ "description": "HTTP 与业务 code 均成功才视为成功。",
331
+ "content": {
332
+ "application/json": {
333
+ "schema": {
334
+ "$ref": "#/components/schemas/PublicResponse"
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
341
+ },
342
+ "/product/ros/plans": {
343
+ "get": {
344
+ "operationId": "public_ros_plans",
345
+ "summary": "查询对象存储套餐",
346
+ "description": "返回套餐列表;不接受私有实例列表的 options 分页参数。",
347
+ "tags": [
348
+ "公共"
349
+ ],
350
+ "security": [],
351
+ "x-public": true,
352
+ "x-api-key-enabled": false,
353
+ "x-source-route": "routers/controllers/product_ros.go:265;services/product/ros/plans.go:11",
354
+ "x-api-key-scopes": [],
355
+ "parameters": [],
356
+ "responses": {
357
+ "200": {
358
+ "description": "HTTP 与业务 code 均成功才视为成功。",
359
+ "content": {
360
+ "application/json": {
361
+ "schema": {
362
+ "$ref": "#/components/schemas/PublicResponse"
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
369
+ },
370
+ "/product/rbm/models": {
371
+ "get": {
372
+ "operationId": "public_rbm_models",
373
+ "summary": "查询裸金属机型套餐",
374
+ "description": "返回公开机型套餐列表。",
375
+ "tags": [
376
+ "公共"
377
+ ],
378
+ "security": [],
379
+ "x-public": true,
380
+ "x-api-key-enabled": false,
381
+ "x-source-route": "routers/controllers/product_rbm.go:326",
382
+ "x-api-key-scopes": [],
383
+ "parameters": [],
384
+ "responses": {
385
+ "200": {
386
+ "description": "HTTP 与业务 code 均成功才视为成功。",
387
+ "content": {
388
+ "application/json": {
389
+ "schema": {
390
+ "$ref": "#/components/schemas/PublicResponse"
391
+ }
392
+ }
393
+ }
394
+ }
395
+ }
396
+ }
397
+ },
398
+ "/product/rcs/os-templates": {
399
+ "get": {
400
+ "operationId": "public_rcs_os_templates",
401
+ "summary": "查询云服务器操作系统模板",
402
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
403
+ "tags": [
404
+ "公共"
405
+ ],
406
+ "security": [],
407
+ "x-public": true,
408
+ "x-api-key-enabled": false,
409
+ "x-source-route": "routers/controllers/product_rcs.go:37",
410
+ "x-api-key-scopes": [],
411
+ "parameters": [],
412
+ "responses": {
413
+ "200": {
414
+ "description": "HTTP 与业务 code 均成功才视为成功。",
415
+ "content": {
416
+ "application/json": {
417
+ "schema": {
418
+ "$ref": "#/components/schemas/PublicResponse"
419
+ }
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ },
426
+ "/product/rbm/os-templates": {
427
+ "get": {
428
+ "operationId": "public_rbm_os_templates",
429
+ "summary": "查询裸金属操作系统模板",
430
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
431
+ "tags": [
432
+ "公共"
433
+ ],
434
+ "security": [],
435
+ "x-public": true,
436
+ "x-api-key-enabled": false,
437
+ "x-source-route": "routers/controllers/product_rbm.go:320",
438
+ "x-api-key-scopes": [],
439
+ "parameters": [],
440
+ "responses": {
441
+ "200": {
442
+ "description": "HTTP 与业务 code 均成功才视为成功。",
443
+ "content": {
444
+ "application/json": {
445
+ "schema": {
446
+ "$ref": "#/components/schemas/PublicResponse"
447
+ }
448
+ }
449
+ }
450
+ }
451
+ }
452
+ }
453
+ },
454
+ "/product/rgs/os-templates": {
455
+ "get": {
456
+ "operationId": "public_rgs_os_templates",
457
+ "summary": "查询游戏云操作系统模板",
458
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
459
+ "tags": [
460
+ "公共"
461
+ ],
462
+ "security": [],
463
+ "x-public": true,
464
+ "x-api-key-enabled": false,
465
+ "x-source-route": "routers/controllers/product_rgs.go:518",
466
+ "x-api-key-scopes": [],
467
+ "parameters": [],
468
+ "responses": {
469
+ "200": {
470
+ "description": "HTTP 与业务 code 均成功才视为成功。",
471
+ "content": {
472
+ "application/json": {
473
+ "schema": {
474
+ "$ref": "#/components/schemas/PublicResponse"
475
+ }
476
+ }
477
+ }
478
+ }
479
+ }
480
+ }
481
+ },
482
+ "/product/rcs/discount-percent": {
483
+ "get": {
484
+ "operationId": "public_rcs_discount_percent",
485
+ "summary": "查询云服务器时长折扣",
486
+ "description": "返回折扣分组映射;组内键为月数、值为折扣系数。实际折扣以服务端结果为准。",
487
+ "tags": [
488
+ "公共"
489
+ ],
490
+ "security": [],
491
+ "x-public": true,
492
+ "x-api-key-enabled": false,
493
+ "x-source-route": "services/product/rcs/utils.go:26;routers/init.go:434-463",
494
+ "x-api-key-scopes": [],
495
+ "parameters": [
496
+ {
497
+ "name": "type",
498
+ "in": "query",
499
+ "required": true,
500
+ "description": "购买或续费场景。",
501
+ "schema": {
502
+ "type": "string",
503
+ "enum": [
504
+ "create",
505
+ "renew"
506
+ ]
507
+ }
508
+ }
509
+ ],
510
+ "responses": {
511
+ "200": {
512
+ "description": "HTTP 与业务 code 均成功才视为成功。",
513
+ "content": {
514
+ "application/json": {
515
+ "schema": {
516
+ "$ref": "#/components/schemas/PublicResponse"
517
+ }
518
+ }
519
+ }
520
+ }
521
+ }
522
+ }
523
+ },
524
+ "/product/rbm/discount-percent": {
525
+ "get": {
526
+ "operationId": "public_rbm_discount_percent",
527
+ "summary": "查询裸金属时长折扣",
528
+ "description": "返回折扣分组映射;组内键为月数、值为折扣系数。实际折扣以服务端结果为准。",
529
+ "tags": [
530
+ "公共"
531
+ ],
532
+ "security": [],
533
+ "x-public": true,
534
+ "x-api-key-enabled": false,
535
+ "x-source-route": "services/product/rbm/utils.go:19;routers/init.go:434-463",
536
+ "x-api-key-scopes": [],
537
+ "parameters": [
538
+ {
539
+ "name": "type",
540
+ "in": "query",
541
+ "required": true,
542
+ "description": "购买或续费场景。",
543
+ "schema": {
544
+ "type": "string",
545
+ "enum": [
546
+ "create",
547
+ "renew"
548
+ ]
549
+ }
550
+ }
551
+ ],
552
+ "responses": {
553
+ "200": {
554
+ "description": "HTTP 与业务 code 均成功才视为成功。",
555
+ "content": {
556
+ "application/json": {
557
+ "schema": {
558
+ "$ref": "#/components/schemas/PublicResponse"
559
+ }
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ },
566
+ "/product/rgs/discount-percent": {
567
+ "get": {
568
+ "operationId": "public_rgs_discount_percent",
569
+ "summary": "查询游戏云时长折扣",
570
+ "description": "返回折扣分组映射;组内键为月数、值为折扣系数。实际折扣以服务端结果为准。",
571
+ "tags": [
572
+ "公共"
573
+ ],
574
+ "security": [],
575
+ "x-public": true,
576
+ "x-api-key-enabled": false,
577
+ "x-source-route": "services/product/rgs/utils.go:25;routers/init.go:434-463",
578
+ "x-api-key-scopes": [],
579
+ "parameters": [
580
+ {
581
+ "name": "type",
582
+ "in": "query",
583
+ "required": true,
584
+ "description": "购买或续费场景。",
585
+ "schema": {
586
+ "type": "string",
587
+ "enum": [
588
+ "create",
589
+ "renew"
590
+ ]
591
+ }
592
+ }
593
+ ],
594
+ "responses": {
595
+ "200": {
596
+ "description": "HTTP 与业务 code 均成功才视为成功。",
597
+ "content": {
598
+ "application/json": {
599
+ "schema": {
600
+ "$ref": "#/components/schemas/PublicResponse"
601
+ }
602
+ }
603
+ }
604
+ }
605
+ }
606
+ }
607
+ },
608
+ "/product/ros/discount-percent": {
609
+ "get": {
610
+ "operationId": "public_ros_discount_percent",
611
+ "summary": "查询对象存储时长折扣",
612
+ "description": "返回折扣分组映射;组内键为月数、值为折扣系数。实际折扣以服务端结果为准。",
613
+ "tags": [
614
+ "公共"
615
+ ],
616
+ "security": [],
617
+ "x-public": true,
618
+ "x-api-key-enabled": false,
619
+ "x-source-route": "services/product/ros/utils.go:23;routers/init.go:434-463",
620
+ "x-api-key-scopes": [],
621
+ "parameters": [
622
+ {
623
+ "name": "type",
624
+ "in": "query",
625
+ "required": true,
626
+ "description": "购买或续费场景。",
627
+ "schema": {
628
+ "type": "string",
629
+ "enum": [
630
+ "create",
631
+ "renew"
632
+ ]
633
+ }
634
+ }
635
+ ],
636
+ "responses": {
637
+ "200": {
638
+ "description": "HTTP 与业务 code 均成功才视为成功。",
639
+ "content": {
640
+ "application/json": {
641
+ "schema": {
642
+ "$ref": "#/components/schemas/PublicResponse"
643
+ }
644
+ }
645
+ }
646
+ }
647
+ }
648
+ }
649
+ },
650
+ "/product/rcs/price": {
651
+ "get": {
652
+ "description": "创建或试用传 plan_id;续费、公网 IP 和云盘报价传 product_id;升级还须传 dest_plan。购买或续费按 duration 指定月数。\n\n新版 API Key 所需 Scope(全部满足):rcs:pricing:read。\n\n默认匿名报价,仅支持 create、try 场景,不能使用账号优惠券。需要续费、升级等账号场景,或希望应用会员、代理关系及优惠券定价时,显式加 --authenticated;仍需本接口登记的 API Key 权限。匿名报价不保证等于你的实际下单价。",
653
+ "summary": "计算云服务器报价",
654
+ "tags": [
655
+ "rcs"
656
+ ],
657
+ "operationId": "get_product_rcs_price_85b84a78",
658
+ "x-api-key-enabled": true,
659
+ "x-api-key-scopes": [
660
+ "rcs:pricing:read"
661
+ ],
662
+ "x-api-key-scope-mode": "all",
663
+ "x-source-route": "routers/init.go:442;services/product/rcs/utils.go:85;services/product/common.go:499",
664
+ "parameters": [
665
+ {
666
+ "description": "计价场景",
667
+ "in": "query",
668
+ "name": "scene",
669
+ "required": true,
670
+ "schema": {
671
+ "enum": [
672
+ "create",
673
+ "renew",
674
+ "upgrade",
675
+ "eip",
676
+ "try",
677
+ "edisk"
678
+ ],
679
+ "type": "string"
680
+ }
681
+ },
682
+ {
683
+ "description": "创建或试用的套餐 ID",
684
+ "in": "query",
685
+ "name": "plan_id",
686
+ "schema": {
687
+ "type": "integer"
688
+ }
689
+ },
690
+ {
691
+ "description": "已有实例 ID",
692
+ "in": "query",
693
+ "name": "product_id",
694
+ "schema": {
695
+ "type": "integer"
696
+ }
697
+ },
698
+ {
699
+ "description": "购买或续费的月数",
700
+ "in": "query",
701
+ "name": "duration",
702
+ "schema": {
703
+ "enum": [
704
+ 1,
705
+ 3,
706
+ 6,
707
+ 12
708
+ ],
709
+ "type": "integer"
710
+ }
711
+ },
712
+ {
713
+ "description": "升级目标套餐 ID",
714
+ "in": "query",
715
+ "name": "dest_plan",
716
+ "schema": {
717
+ "type": "integer"
718
+ }
719
+ },
720
+ {
721
+ "description": "创建时选择的磁盘类型",
722
+ "in": "query",
723
+ "name": "disk_type",
724
+ "schema": {
725
+ "type": "string"
726
+ }
727
+ },
728
+ {
729
+ "description": "额外系统盘容量(GB)",
730
+ "in": "query",
731
+ "name": "add_disk_size",
732
+ "schema": {
733
+ "type": "integer"
734
+ }
735
+ },
736
+ {
737
+ "description": "独立 IP 数量",
738
+ "in": "query",
739
+ "name": "with_eip_num",
740
+ "schema": {
741
+ "type": "integer"
742
+ }
743
+ },
744
+ {
745
+ "description": "独立 IP 特性",
746
+ "in": "query",
747
+ "name": "with_eip_flags",
748
+ "schema": {
749
+ "type": "string"
750
+ }
751
+ },
752
+ {
753
+ "description": "参与报价的优惠券 ID",
754
+ "in": "query",
755
+ "name": "with_coupon_id",
756
+ "schema": {
757
+ "type": "integer"
758
+ }
759
+ },
760
+ {
761
+ "description": "查询原价,忽略优惠券和折扣",
762
+ "in": "query",
763
+ "name": "is_old",
764
+ "schema": {
765
+ "type": "boolean"
766
+ }
767
+ },
768
+ {
769
+ "description": "计算时忽略代理定价",
770
+ "in": "query",
771
+ "name": "ignore_agent",
772
+ "schema": {
773
+ "type": "boolean"
774
+ }
775
+ },
776
+ {
777
+ "description": "团购报价使用的折扣",
778
+ "in": "query",
779
+ "name": "group_discount",
780
+ "schema": {
781
+ "type": "number"
782
+ }
783
+ }
784
+ ],
785
+ "responses": {
786
+ "200": {
787
+ "description": "成功",
788
+ "content": {
789
+ "application/json": {
790
+ "schema": {
791
+ "allOf": [
792
+ {
793
+ "$ref": "#/components/schemas/app.ResponseData"
794
+ },
795
+ {
796
+ "properties": {
797
+ "data": {
798
+ "$ref": "#/components/schemas/controllers.rcsPriceData"
799
+ }
800
+ },
801
+ "type": "object"
802
+ }
803
+ ]
804
+ }
805
+ }
806
+ }
807
+ },
808
+ "400": {
809
+ "$ref": "#/components/responses/BadRequest"
810
+ },
811
+ "403": {
812
+ "$ref": "#/components/responses/Forbidden"
813
+ },
814
+ "500": {
815
+ "$ref": "#/components/responses/ServerError"
816
+ }
817
+ },
818
+ "security": [],
819
+ "x-public": true
820
+ }
821
+ },
822
+ "/product/rbm/price": {
823
+ "get": {
824
+ "summary": "计算裸金属价格",
825
+ "tags": [
826
+ "rbm"
827
+ ],
828
+ "operationId": "get_product_rbm_price_21406566",
829
+ "x-api-key-enabled": true,
830
+ "x-api-key-scopes": [
831
+ "rbm:pricing:read"
832
+ ],
833
+ "x-api-key-scope-mode": "all",
834
+ "x-source-route": "routers/init.go:447;services/product/rbm/utils.go:62;services/product/common.go:499",
835
+ "description": "新版 API Key 所需 Scope(全部满足):rbm:pricing:read。\n\n默认匿名报价,仅支持 create、try 场景,不能使用账号优惠券。需要续费、升级等账号场景,或希望应用会员、代理关系及优惠券定价时,显式加 --authenticated;仍需本接口登记的 API Key 权限。匿名报价不保证等于你的实际下单价。",
836
+ "parameters": [
837
+ {
838
+ "description": "计价场景",
839
+ "in": "query",
840
+ "name": "scene",
841
+ "required": true,
842
+ "schema": {
843
+ "enum": [
844
+ "create",
845
+ "renew",
846
+ "eip",
847
+ "try"
848
+ ],
849
+ "type": "string"
850
+ }
851
+ },
852
+ {
853
+ "description": "购买或试用的套餐 ID",
854
+ "in": "query",
855
+ "name": "plan_id",
856
+ "schema": {
857
+ "type": "integer"
858
+ }
859
+ },
860
+ {
861
+ "description": "已有实例的 ID",
862
+ "in": "query",
863
+ "name": "product_id",
864
+ "schema": {
865
+ "type": "integer"
866
+ }
867
+ },
868
+ {
869
+ "description": "购买或续费的月数",
870
+ "in": "query",
871
+ "name": "duration",
872
+ "schema": {
873
+ "enum": [
874
+ 1,
875
+ 3,
876
+ 6,
877
+ 12
878
+ ],
879
+ "type": "integer"
880
+ }
881
+ },
882
+ {
883
+ "description": "报价时使用的优惠券 ID",
884
+ "in": "query",
885
+ "name": "with_coupon_id",
886
+ "schema": {
887
+ "type": "integer"
888
+ }
889
+ },
890
+ {
891
+ "description": "额外购买的公网 IP 数量",
892
+ "in": "query",
893
+ "name": "with_eip_num",
894
+ "schema": {
895
+ "type": "integer"
896
+ }
897
+ },
898
+ {
899
+ "description": "公网 IP 特性",
900
+ "in": "query",
901
+ "name": "with_eip_flags",
902
+ "schema": {
903
+ "type": "string"
904
+ }
905
+ },
906
+ {
907
+ "description": "按原价报价,忽略优惠券和折扣",
908
+ "in": "query",
909
+ "name": "is_old",
910
+ "schema": {
911
+ "type": "boolean"
912
+ }
913
+ },
914
+ {
915
+ "description": "是否忽略代理定价",
916
+ "in": "query",
917
+ "name": "ignore_agent",
918
+ "schema": {
919
+ "type": "boolean"
920
+ }
921
+ },
922
+ {
923
+ "description": "团购折扣",
924
+ "in": "query",
925
+ "name": "group_discount",
926
+ "schema": {
927
+ "type": "number"
928
+ }
929
+ }
930
+ ],
931
+ "responses": {
932
+ "200": {
933
+ "description": "data.price 是最终报价,data.detail 是价格明细",
934
+ "content": {
935
+ "application/json": {
936
+ "schema": {
937
+ "allOf": [
938
+ {
939
+ "$ref": "#/components/schemas/app.ResponseData"
940
+ },
941
+ {
942
+ "properties": {
943
+ "data": {
944
+ "$ref": "#/components/schemas/controllers.rcsPriceData"
945
+ }
946
+ },
947
+ "type": "object"
948
+ }
949
+ ]
950
+ }
951
+ }
952
+ }
953
+ },
954
+ "400": {
955
+ "$ref": "#/components/responses/BadRequest"
956
+ },
957
+ "403": {
958
+ "$ref": "#/components/responses/Forbidden"
959
+ },
960
+ "500": {
961
+ "$ref": "#/components/responses/ServerError"
962
+ }
963
+ },
964
+ "security": [],
965
+ "x-public": true
966
+ }
967
+ },
968
+ "/product/rgs/price": {
969
+ "get": {
970
+ "description": "创建和试用报价传 plan_id 和 config;升级传 product_id、dest_plan 和 config;续费或公网 IP 报价使用 product_id。config 是 URL 编码的 JSON 字符串。\n\n新版 API Key 所需 Scope(全部满足):rgs:pricing:read。\n\n默认匿名报价,仅支持 create、try 场景,不能使用账号优惠券。需要续费、升级等账号场景,或希望应用会员、代理关系及优惠券定价时,显式加 --authenticated;仍需本接口登记的 API Key 权限。匿名报价不保证等于你的实际下单价。",
971
+ "summary": "计算游戏云报价",
972
+ "tags": [
973
+ "rgs"
974
+ ],
975
+ "operationId": "get_product_rgs_price_9f5dc1f3",
976
+ "x-api-key-enabled": true,
977
+ "x-api-key-scopes": [
978
+ "rgs:pricing:read"
979
+ ],
980
+ "x-api-key-scope-mode": "all",
981
+ "x-source-route": "routers/init.go:450;services/product/rgs/utils.go:73;services/product/common.go:499",
982
+ "parameters": [
983
+ {
984
+ "description": "报价场景",
985
+ "in": "query",
986
+ "name": "scene",
987
+ "required": true,
988
+ "schema": {
989
+ "enum": [
990
+ "create",
991
+ "renew",
992
+ "upgrade",
993
+ "eip",
994
+ "try"
995
+ ],
996
+ "type": "string"
997
+ }
998
+ },
999
+ {
1000
+ "description": "资源配置的 JSON 字符串,包含 cpu(核)、memory(GB)、net_in、net_out(Mbps)、base_disk、data_disk(GB)、allocation、database、backup",
1001
+ "in": "query",
1002
+ "name": "config",
1003
+ "schema": {
1004
+ "type": "string"
1005
+ }
1006
+ },
1007
+ {
1008
+ "description": "创建报价的计费方式",
1009
+ "in": "query",
1010
+ "name": "pay_mode",
1011
+ "schema": {
1012
+ "enum": [
1013
+ "day",
1014
+ "month"
1015
+ ],
1016
+ "type": "string"
1017
+ }
1018
+ },
1019
+ {
1020
+ "description": "购买的套餐 ID",
1021
+ "in": "query",
1022
+ "name": "plan_id",
1023
+ "schema": {
1024
+ "type": "integer"
1025
+ }
1026
+ },
1027
+ {
1028
+ "description": "已持有的游戏云实例 ID",
1029
+ "in": "query",
1030
+ "name": "product_id",
1031
+ "schema": {
1032
+ "type": "integer"
1033
+ }
1034
+ },
1035
+ {
1036
+ "description": "升级目标套餐 ID",
1037
+ "in": "query",
1038
+ "name": "dest_plan",
1039
+ "schema": {
1040
+ "type": "integer"
1041
+ }
1042
+ },
1043
+ {
1044
+ "description": "计价时长,月付可选 1、3、6、12",
1045
+ "in": "query",
1046
+ "name": "duration",
1047
+ "schema": {
1048
+ "type": "integer"
1049
+ }
1050
+ },
1051
+ {
1052
+ "description": "独立 IP 数量",
1053
+ "in": "query",
1054
+ "name": "with_eip_num",
1055
+ "schema": {
1056
+ "type": "integer"
1057
+ }
1058
+ },
1059
+ {
1060
+ "description": "独立 IP 特性",
1061
+ "in": "query",
1062
+ "name": "with_eip_flags",
1063
+ "schema": {
1064
+ "type": "string"
1065
+ }
1066
+ },
1067
+ {
1068
+ "description": "优惠券 ID",
1069
+ "in": "query",
1070
+ "name": "with_coupon_id",
1071
+ "schema": {
1072
+ "type": "integer"
1073
+ }
1074
+ },
1075
+ {
1076
+ "description": "计算未打折的原价",
1077
+ "in": "query",
1078
+ "name": "is_old",
1079
+ "schema": {
1080
+ "type": "boolean"
1081
+ }
1082
+ },
1083
+ {
1084
+ "description": "忽略代理定价",
1085
+ "in": "query",
1086
+ "name": "ignore_agent",
1087
+ "schema": {
1088
+ "type": "boolean"
1089
+ }
1090
+ },
1091
+ {
1092
+ "description": "团购报价的折扣",
1093
+ "in": "query",
1094
+ "name": "group_discount",
1095
+ "schema": {
1096
+ "type": "number"
1097
+ }
1098
+ }
1099
+ ],
1100
+ "responses": {
1101
+ "200": {
1102
+ "description": "成功",
1103
+ "content": {
1104
+ "application/json": {
1105
+ "schema": {
1106
+ "allOf": [
1107
+ {
1108
+ "$ref": "#/components/schemas/app.ResponseData"
1109
+ },
1110
+ {
1111
+ "properties": {
1112
+ "data": {
1113
+ "$ref": "#/components/schemas/controllers.rcsPriceData"
1114
+ }
1115
+ },
1116
+ "type": "object"
1117
+ }
1118
+ ]
1119
+ }
1120
+ }
1121
+ }
1122
+ },
1123
+ "400": {
1124
+ "$ref": "#/components/responses/BadRequest"
1125
+ },
1126
+ "403": {
1127
+ "$ref": "#/components/responses/Forbidden"
1128
+ },
1129
+ "500": {
1130
+ "$ref": "#/components/responses/ServerError"
1131
+ }
1132
+ },
1133
+ "security": [],
1134
+ "x-public": true
1135
+ }
1136
+ },
1137
+ "/product/ros/price": {
1138
+ "get": {
1139
+ "description": "购买时传 plan_id 和 duration,续费时传 product_id 和 duration,变更套餐时传 product_id 和 dest_plan。\n\n新版 API Key 所需 Scope(全部满足):ros:pricing:read。\n\n默认匿名报价,仅支持 create 场景,不能使用账号优惠券。需要续费、升级等账号场景,或希望应用会员、代理关系及优惠券定价时,显式加 --authenticated;仍需本接口登记的 API Key 权限。匿名报价不保证等于你的实际下单价。",
1140
+ "summary": "计算对象存储报价",
1141
+ "tags": [
1142
+ "ros"
1143
+ ],
1144
+ "operationId": "get_product_ros_price_04508044",
1145
+ "x-api-key-enabled": true,
1146
+ "x-api-key-scopes": [
1147
+ "ros:pricing:read"
1148
+ ],
1149
+ "x-api-key-scope-mode": "all",
1150
+ "x-source-route": "routers/init.go:458;services/product/ros/utils.go:65;services/product/common.go:499",
1151
+ "parameters": [
1152
+ {
1153
+ "description": "计价场景,购买、续费或变更套餐",
1154
+ "in": "query",
1155
+ "name": "scene",
1156
+ "required": true,
1157
+ "schema": {
1158
+ "enum": [
1159
+ "create",
1160
+ "renew",
1161
+ "upgrade"
1162
+ ],
1163
+ "type": "string"
1164
+ }
1165
+ },
1166
+ {
1167
+ "description": "购买的套餐 ID",
1168
+ "in": "query",
1169
+ "name": "plan_id",
1170
+ "schema": {
1171
+ "type": "integer"
1172
+ }
1173
+ },
1174
+ {
1175
+ "description": "续费或变更套餐的实例 ID",
1176
+ "in": "query",
1177
+ "name": "product_id",
1178
+ "schema": {
1179
+ "type": "integer"
1180
+ }
1181
+ },
1182
+ {
1183
+ "description": "购买或续费的月数",
1184
+ "in": "query",
1185
+ "name": "duration",
1186
+ "schema": {
1187
+ "enum": [
1188
+ 1,
1189
+ 3,
1190
+ 6,
1191
+ 12
1192
+ ],
1193
+ "type": "integer"
1194
+ }
1195
+ },
1196
+ {
1197
+ "description": "变更后的套餐 ID",
1198
+ "in": "query",
1199
+ "name": "dest_plan",
1200
+ "schema": {
1201
+ "type": "integer"
1202
+ }
1203
+ },
1204
+ {
1205
+ "description": "参与报价的优惠券 ID",
1206
+ "in": "query",
1207
+ "name": "with_coupon_id",
1208
+ "schema": {
1209
+ "type": "integer"
1210
+ }
1211
+ },
1212
+ {
1213
+ "description": "查询原价,忽略优惠券和时长折扣",
1214
+ "in": "query",
1215
+ "name": "is_old",
1216
+ "schema": {
1217
+ "type": "boolean"
1218
+ }
1219
+ },
1220
+ {
1221
+ "description": "报价时忽略代理定价",
1222
+ "in": "query",
1223
+ "name": "ignore_agent",
1224
+ "schema": {
1225
+ "type": "boolean"
1226
+ }
1227
+ },
1228
+ {
1229
+ "description": "购买报价使用的团购折扣",
1230
+ "in": "query",
1231
+ "name": "group_discount",
1232
+ "schema": {
1233
+ "type": "number"
1234
+ }
1235
+ }
1236
+ ],
1237
+ "responses": {
1238
+ "200": {
1239
+ "description": "成功",
1240
+ "content": {
1241
+ "application/json": {
1242
+ "schema": {
1243
+ "allOf": [
1244
+ {
1245
+ "$ref": "#/components/schemas/app.ResponseData"
1246
+ },
1247
+ {
1248
+ "properties": {
1249
+ "data": {
1250
+ "$ref": "#/components/schemas/controllers.rcsPriceData"
1251
+ }
1252
+ },
1253
+ "type": "object"
1254
+ }
1255
+ ]
1256
+ }
1257
+ }
1258
+ }
1259
+ },
1260
+ "400": {
1261
+ "$ref": "#/components/responses/BadRequest"
1262
+ },
1263
+ "403": {
1264
+ "$ref": "#/components/responses/Forbidden"
1265
+ },
1266
+ "500": {
1267
+ "$ref": "#/components/responses/ServerError"
1268
+ }
1269
+ },
1270
+ "security": [],
1271
+ "x-public": true
1272
+ }
1273
+ },
1274
+ "/product/rgs/egg": {
1275
+ "get": {
1276
+ "operationId": "public_rgs_eggs",
1277
+ "summary": "查询游戏模板",
1278
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
1279
+ "tags": [
1280
+ "公共"
1281
+ ],
1282
+ "security": [],
1283
+ "x-public": true,
1284
+ "x-api-key-enabled": false,
1285
+ "x-source-route": "routers/controllers/product_rgs_mcsm.go;services/product/rgs/list.go:65",
1286
+ "x-api-key-scopes": [],
1287
+ "parameters": [],
1288
+ "responses": {
1289
+ "200": {
1290
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1291
+ "content": {
1292
+ "application/json": {
1293
+ "schema": {
1294
+ "$ref": "#/components/schemas/PublicResponse"
1295
+ }
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ }
1301
+ },
1302
+ "/product/rgs/egg_type": {
1303
+ "get": {
1304
+ "operationId": "public_rgs_egg_types",
1305
+ "summary": "查询游戏模板分类",
1306
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
1307
+ "tags": [
1308
+ "公共"
1309
+ ],
1310
+ "security": [],
1311
+ "x-public": true,
1312
+ "x-api-key-enabled": false,
1313
+ "x-source-route": "routers/controllers/product_rgs_mcsm.go;services/product/rgs/list.go:78",
1314
+ "x-api-key-scopes": [],
1315
+ "parameters": [],
1316
+ "responses": {
1317
+ "200": {
1318
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1319
+ "content": {
1320
+ "application/json": {
1321
+ "schema": {
1322
+ "$ref": "#/components/schemas/PublicResponse"
1323
+ }
1324
+ }
1325
+ }
1326
+ }
1327
+ }
1328
+ }
1329
+ },
1330
+ "/product/rgs/egg_server": {
1331
+ "get": {
1332
+ "operationId": "public_rgs_egg_servers",
1333
+ "summary": "查询游戏服务端类型",
1334
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
1335
+ "tags": [
1336
+ "公共"
1337
+ ],
1338
+ "security": [],
1339
+ "x-public": true,
1340
+ "x-api-key-enabled": false,
1341
+ "x-source-route": "routers/controllers/product_rgs_mcsm.go;services/product/rgs/list.go:84",
1342
+ "x-api-key-scopes": [],
1343
+ "parameters": [],
1344
+ "responses": {
1345
+ "200": {
1346
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1347
+ "content": {
1348
+ "application/json": {
1349
+ "schema": {
1350
+ "$ref": "#/components/schemas/PublicResponse"
1351
+ }
1352
+ }
1353
+ }
1354
+ }
1355
+ }
1356
+ }
1357
+ },
1358
+ "/product/fast-install-app": {
1359
+ "get": {
1360
+ "operationId": "public_fast_install_apps",
1361
+ "summary": "查询可快速安装的应用",
1362
+ "description": "这里只查询应用目录,不会安装软件。使用实际路由 /product/fast-install-app;旧 Swagger 注释中的 /fast-install-app 缺少前缀。",
1363
+ "tags": [
1364
+ "公共"
1365
+ ],
1366
+ "security": [],
1367
+ "x-public": true,
1368
+ "x-api-key-enabled": false,
1369
+ "x-source-route": "routers/init.go:465;routers/controllers/product.go:186;services/product/fast_install_app.go:22",
1370
+ "x-api-key-scopes": [],
1371
+ "parameters": [
1372
+ {
1373
+ "name": "product_type",
1374
+ "in": "query",
1375
+ "required": true,
1376
+ "description": "产品类型。",
1377
+ "schema": {
1378
+ "type": "string",
1379
+ "enum": [
1380
+ "rcs",
1381
+ "rgs"
1382
+ ]
1383
+ }
1384
+ },
1385
+ {
1386
+ "name": "os_name",
1387
+ "in": "query",
1388
+ "required": false,
1389
+ "description": "操作系统名称,用于匹配应用的系统要求。",
1390
+ "schema": {
1391
+ "type": "string"
1392
+ }
1393
+ }
1394
+ ],
1395
+ "responses": {
1396
+ "200": {
1397
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1398
+ "content": {
1399
+ "application/json": {
1400
+ "schema": {
1401
+ "$ref": "#/components/schemas/PublicResponse"
1402
+ }
1403
+ }
1404
+ }
1405
+ }
1406
+ }
1407
+ }
1408
+ },
1409
+ "/product/mcpack": {
1410
+ "get": {
1411
+ "operationId": "public_mcpack_list",
1412
+ "summary": "查询 Minecraft 整合包",
1413
+ "description": "返回 TotalRecords 与 Records。服务端默认 page=1、perPage=20,perPage 最大 100。options 可筛选/排序 chinese_name、recent_installs、order、update_date。",
1414
+ "tags": [
1415
+ "公共"
1416
+ ],
1417
+ "security": [],
1418
+ "x-public": true,
1419
+ "x-api-key-enabled": false,
1420
+ "x-source-route": "routers/init.go:466;services/mcpack/list.go:16",
1421
+ "x-api-key-scopes": [],
1422
+ "parameters": [
1423
+ {
1424
+ "name": "source",
1425
+ "in": "query",
1426
+ "required": false,
1427
+ "description": "来源;可使用 cn、modrinth、curseforge,其他来源按数据库筛选。",
1428
+ "schema": {
1429
+ "type": "string"
1430
+ }
1431
+ },
1432
+ {
1433
+ "name": "loader",
1434
+ "in": "query",
1435
+ "required": false,
1436
+ "description": "加载器筛选。",
1437
+ "schema": {
1438
+ "type": "string"
1439
+ }
1440
+ },
1441
+ {
1442
+ "name": "versions",
1443
+ "in": "query",
1444
+ "required": false,
1445
+ "description": "按一个或多个 Minecraft 版本筛选;使用重复查询键传递。",
1446
+ "schema": {
1447
+ "type": "array",
1448
+ "items": {
1449
+ "type": "string"
1450
+ }
1451
+ },
1452
+ "style": "form",
1453
+ "explode": true
1454
+ },
1455
+ {
1456
+ "name": "name",
1457
+ "in": "query",
1458
+ "required": false,
1459
+ "description": "名称关键词。",
1460
+ "schema": {
1461
+ "type": "string"
1462
+ }
1463
+ },
1464
+ {
1465
+ "name": "category",
1466
+ "in": "query",
1467
+ "required": false,
1468
+ "description": "分类。",
1469
+ "schema": {
1470
+ "type": "string"
1471
+ }
1472
+ },
1473
+ {
1474
+ "name": "options",
1475
+ "in": "query",
1476
+ "required": false,
1477
+ "description": "分页、筛选和排序条件的 JSON 字符串;CLI 也接受对象并只序列化一次。建议 page=1、perPage=20。",
1478
+ "schema": {
1479
+ "type": "string"
1480
+ },
1481
+ "x-json-content-schema": {
1482
+ "$ref": "#/components/schemas/PaginationOptions"
1483
+ }
1484
+ }
1485
+ ],
1486
+ "responses": {
1487
+ "200": {
1488
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1489
+ "content": {
1490
+ "application/json": {
1491
+ "schema": {
1492
+ "$ref": "#/components/schemas/PublicResponse"
1493
+ }
1494
+ }
1495
+ }
1496
+ }
1497
+ }
1498
+ }
1499
+ },
1500
+ "/product/mcpack/detail": {
1501
+ "get": {
1502
+ "operationId": "public_mcpack_detail",
1503
+ "summary": "查询 Minecraft 整合包详情",
1504
+ "description": "返回项目链接及版本列表。后端对外隐藏 download_url;不要把该接口描述为直接下载整合包文件。",
1505
+ "tags": [
1506
+ "公共"
1507
+ ],
1508
+ "security": [],
1509
+ "x-public": true,
1510
+ "x-api-key-enabled": false,
1511
+ "x-source-route": "routers/init.go:467;services/mcpack/detail.go:23",
1512
+ "x-api-key-scopes": [],
1513
+ "parameters": [
1514
+ {
1515
+ "name": "source",
1516
+ "in": "query",
1517
+ "required": true,
1518
+ "description": "整合包来源。",
1519
+ "schema": {
1520
+ "type": "string"
1521
+ }
1522
+ },
1523
+ {
1524
+ "name": "pack_id",
1525
+ "in": "query",
1526
+ "required": true,
1527
+ "description": "整合包 ID。",
1528
+ "schema": {
1529
+ "type": "string"
1530
+ }
1531
+ },
1532
+ {
1533
+ "name": "version_id",
1534
+ "in": "query",
1535
+ "required": false,
1536
+ "description": "版本 ID。",
1537
+ "schema": {
1538
+ "type": "string"
1539
+ }
1540
+ },
1541
+ {
1542
+ "name": "loader",
1543
+ "in": "query",
1544
+ "required": false,
1545
+ "description": "加载器。",
1546
+ "schema": {
1547
+ "type": "string"
1548
+ }
1549
+ },
1550
+ {
1551
+ "name": "game_version",
1552
+ "in": "query",
1553
+ "required": false,
1554
+ "description": "游戏版本。",
1555
+ "schema": {
1556
+ "type": "string"
1557
+ }
1558
+ }
1559
+ ],
1560
+ "responses": {
1561
+ "200": {
1562
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1563
+ "content": {
1564
+ "application/json": {
1565
+ "schema": {
1566
+ "$ref": "#/components/schemas/PublicResponse"
1567
+ }
1568
+ }
1569
+ }
1570
+ }
1571
+ }
1572
+ }
1573
+ },
1574
+ "/product/zones": {
1575
+ "get": {
1576
+ "operationId": "public_zones",
1577
+ "summary": "查询可用区",
1578
+ "description": "按 product、region、machine 查询可用区名称数组。字段没有 binding required,但不提供筛选条件可能返回空列表。",
1579
+ "tags": [
1580
+ "公共"
1581
+ ],
1582
+ "security": [],
1583
+ "x-public": true,
1584
+ "x-api-key-enabled": false,
1585
+ "x-source-route": "routers/init.go:469;routers/controllers/product.go:232;services/product/list.go:76",
1586
+ "x-api-key-scopes": [],
1587
+ "parameters": [
1588
+ {
1589
+ "name": "product",
1590
+ "in": "query",
1591
+ "required": false,
1592
+ "description": "产品类型。",
1593
+ "schema": {
1594
+ "type": "string"
1595
+ }
1596
+ },
1597
+ {
1598
+ "name": "region",
1599
+ "in": "query",
1600
+ "required": false,
1601
+ "description": "区域标识。",
1602
+ "schema": {
1603
+ "type": "string"
1604
+ }
1605
+ },
1606
+ {
1607
+ "name": "machine",
1608
+ "in": "query",
1609
+ "required": false,
1610
+ "description": "机型标识。",
1611
+ "schema": {
1612
+ "type": "string"
1613
+ }
1614
+ }
1615
+ ],
1616
+ "responses": {
1617
+ "200": {
1618
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1619
+ "content": {
1620
+ "application/json": {
1621
+ "schema": {
1622
+ "$ref": "#/components/schemas/PublicResponse"
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+ }
1628
+ }
1629
+ },
1630
+ "/product/panel_config": {
1631
+ "get": {
1632
+ "operationId": "public_panel_config",
1633
+ "summary": "查询公开面板配置",
1634
+ "description": "匿名请求按 Referer 匹配公开面板配置;未提供或未匹配域名时成功返回 data=null,不返回平台默认配置。本接口不接受 JSON 请求体;旧 Swagger 的更新配置请求体标注不适用于这个 GET。",
1635
+ "tags": [
1636
+ "公共"
1637
+ ],
1638
+ "security": [],
1639
+ "x-public": true,
1640
+ "x-api-key-enabled": false,
1641
+ "x-source-route": "routers/init.go:468;routers/controllers/product.go:158;services/product/panel_user.go:197",
1642
+ "x-api-key-scopes": [],
1643
+ "parameters": [
1644
+ {
1645
+ "name": "Referer",
1646
+ "in": "header",
1647
+ "required": false,
1648
+ "description": "面板来源站点,例如 https://panel.example.com/。后端据此匹配已配置的面板域名。",
1649
+ "schema": {
1650
+ "type": "string"
1651
+ }
1652
+ }
1653
+ ],
1654
+ "responses": {
1655
+ "200": {
1656
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1657
+ "content": {
1658
+ "application/json": {
1659
+ "schema": {
1660
+ "$ref": "#/components/schemas/PublicResponse"
1661
+ }
1662
+ }
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
+ },
1668
+ "/product/playmp/competitions/{id}/public": {
1669
+ "get": {
1670
+ "operationId": "public_playmp_competition",
1671
+ "summary": "查询公开比赛详情",
1672
+ "description": "返回比赛公开资料及公开玩家信息;不存在的比赛返回错误,draft、dropped、waiting 状态不公开。虽然原用户文档按 playmp 标签隐藏,本接口实际允许匿名 JSON 查询,因此本次收录。",
1673
+ "tags": [
1674
+ "公共"
1675
+ ],
1676
+ "security": [],
1677
+ "x-public": true,
1678
+ "x-api-key-enabled": false,
1679
+ "x-source-route": "routers/init.go:487;routers/controllers/product_playmp.go:441;services/product/playmp/competition.go:848;models/productM/playmp_competition.go:173",
1680
+ "x-api-key-scopes": [],
1681
+ "parameters": [
1682
+ {
1683
+ "name": "id",
1684
+ "in": "path",
1685
+ "required": true,
1686
+ "description": "比赛 MongoDB ObjectID,24 位十六进制字符串;不是整数。",
1687
+ "schema": {
1688
+ "type": "string",
1689
+ "pattern": "^[0-9a-fA-F]{24}$"
1690
+ }
1691
+ }
1692
+ ],
1693
+ "responses": {
1694
+ "200": {
1695
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1696
+ "content": {
1697
+ "application/json": {
1698
+ "schema": {
1699
+ "$ref": "#/components/schemas/PublicResponse"
1700
+ }
1701
+ }
1702
+ }
1703
+ }
1704
+ }
1705
+ }
1706
+ },
1707
+ "/product/buy_group/list": {
1708
+ "get": {
1709
+ "operationId": "public_buy_groups",
1710
+ "summary": "查询公开团购列表",
1711
+ "description": "仅查询未结束的公开团购。options 支持 UID 筛选;不支持匿名加入、发起或确认团购。",
1712
+ "tags": [
1713
+ "公共"
1714
+ ],
1715
+ "security": [],
1716
+ "x-public": true,
1717
+ "x-api-key-enabled": false,
1718
+ "x-source-route": "routers/init.go:475;routers/controllers/product.go:245;services/product/buy_group/buy_group.go:31",
1719
+ "x-api-key-scopes": [],
1720
+ "parameters": [
1721
+ {
1722
+ "name": "product_type",
1723
+ "in": "query",
1724
+ "required": true,
1725
+ "description": "产品类型。",
1726
+ "schema": {
1727
+ "type": "string"
1728
+ }
1729
+ },
1730
+ {
1731
+ "name": "options",
1732
+ "in": "query",
1733
+ "required": true,
1734
+ "description": "分页、筛选和排序条件的 JSON 字符串;CLI 也接受对象并只序列化一次。建议 page=1、perPage=20。",
1735
+ "schema": {
1736
+ "type": "string"
1737
+ },
1738
+ "x-json-content-schema": {
1739
+ "$ref": "#/components/schemas/PaginationOptions"
1740
+ }
1741
+ }
1742
+ ],
1743
+ "responses": {
1744
+ "200": {
1745
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1746
+ "content": {
1747
+ "application/json": {
1748
+ "schema": {
1749
+ "$ref": "#/components/schemas/PublicResponse"
1750
+ }
1751
+ }
1752
+ }
1753
+ }
1754
+ }
1755
+ }
1756
+ },
1757
+ "/product/buy_group/discount": {
1758
+ "get": {
1759
+ "operationId": "public_buy_group_discount",
1760
+ "summary": "查询团购折扣配置",
1761
+ "description": "实际路由为 GET,且无需 product_type 参数。旧控制器注释误标 POST。返回公开团购折扣映射。",
1762
+ "tags": [
1763
+ "公共"
1764
+ ],
1765
+ "security": [],
1766
+ "x-public": true,
1767
+ "x-api-key-enabled": false,
1768
+ "x-source-route": "routers/init.go:476;routers/controllers/product.go:323",
1769
+ "x-api-key-scopes": [],
1770
+ "parameters": [],
1771
+ "responses": {
1772
+ "200": {
1773
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1774
+ "content": {
1775
+ "application/json": {
1776
+ "schema": {
1777
+ "$ref": "#/components/schemas/PublicResponse"
1778
+ }
1779
+ }
1780
+ }
1781
+ }
1782
+ }
1783
+ }
1784
+ },
1785
+ "/product/buy_group/{gid}": {
1786
+ "get": {
1787
+ "operationId": "public_buy_group_detail",
1788
+ "summary": "查询公开团购详情",
1789
+ "description": "无需登录或 API Key。CLI 默认匿名请求,不读取或发送凭证。",
1790
+ "tags": [
1791
+ "公共"
1792
+ ],
1793
+ "security": [],
1794
+ "x-public": true,
1795
+ "x-api-key-enabled": false,
1796
+ "x-source-route": "routers/init.go:477;routers/controllers/product.go:258;services/product/buy_group/buy_group.go:60",
1797
+ "x-api-key-scopes": [],
1798
+ "parameters": [
1799
+ {
1800
+ "name": "gid",
1801
+ "in": "path",
1802
+ "required": true,
1803
+ "description": "团购 ID。",
1804
+ "schema": {
1805
+ "type": "integer",
1806
+ "minimum": 1
1807
+ }
1808
+ }
1809
+ ],
1810
+ "responses": {
1811
+ "200": {
1812
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1813
+ "content": {
1814
+ "application/json": {
1815
+ "schema": {
1816
+ "$ref": "#/components/schemas/PublicResponse"
1817
+ }
1818
+ }
1819
+ }
1820
+ }
1821
+ }
1822
+ }
1823
+ },
1824
+ "/upload_image": {
1825
+ "post": {
1826
+ "operationId": "public_upload_image",
1827
+ "summary": "上传公共图片",
1828
+ "description": "公开写操作。使用 --file image=本地路径 上传 multipart 图片,返回 data 图片地址。请使用真正的 JPEG 图片:后端以 .jpg 和 image/jpeg 保存原始字节,后端和 CLI 均不转码。后端按 IP 限流。",
1829
+ "tags": [
1830
+ "公共"
1831
+ ],
1832
+ "security": [],
1833
+ "x-public": true,
1834
+ "x-api-key-enabled": false,
1835
+ "x-source-route": "routers/init.go:133;routers/controllers/workorder.go:340",
1836
+ "x-api-key-scopes": [],
1837
+ "parameters": [],
1838
+ "responses": {
1839
+ "200": {
1840
+ "description": "HTTP 与业务 code 均成功才视为成功。",
1841
+ "content": {
1842
+ "application/json": {
1843
+ "schema": {
1844
+ "$ref": "#/components/schemas/PublicResponse"
1845
+ }
1846
+ }
1847
+ }
1848
+ }
1849
+ },
1850
+ "requestBody": {
1851
+ "required": true,
1852
+ "content": {
1853
+ "multipart/form-data": {
1854
+ "schema": {
1855
+ "type": "object",
1856
+ "required": [
1857
+ "image"
1858
+ ],
1859
+ "properties": {
1860
+ "image": {
1861
+ "type": "string",
1862
+ "format": "binary"
1863
+ }
1864
+ }
1865
+ }
1866
+ }
1867
+ }
1868
+ }
1869
+ }
1870
+ }
1871
+ },
1872
+ "components": {
1873
+ "schemas": {
1874
+ "PublicResponse": {
1875
+ "type": "object",
1876
+ "required": [
1877
+ "code"
1878
+ ],
1879
+ "properties": {
1880
+ "code": {
1881
+ "type": "integer",
1882
+ "description": "业务成功码为 200;HTTP 200 不保证业务成功。"
1883
+ },
1884
+ "data": {
1885
+ "description": "保留服务端原始结果;可为对象、数组、字符串、数字或 null。"
1886
+ },
1887
+ "message": {
1888
+ "type": "string"
1889
+ }
1890
+ },
1891
+ "additionalProperties": true
1892
+ }
1893
+ }
1894
+ }
1895
+ }