feat(cloudflare): register move and batch member API routes

This commit is contained in:
ryan
2026-09-26 15:08:32 +08:00
parent 079fa7ee53
commit b1626d068f
6 changed files with 923 additions and 3 deletions
+218 -1
View File
@@ -6362,6 +6362,190 @@ const docTemplate = `{
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/batch-move": {
"post": {
"security": [
{
"SessionCookie": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openflare-cloudflare"
],
"summary": "批量移动 Cloudflare 指向成员",
"parameters": [
{
"type": "integer",
"description": "原分组 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "批量移动参数",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cloudflare.MemberBatchMoveInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/batch-remove": {
"post": {
"security": [
{
"SessionCookie": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openflare-cloudflare"
],
"summary": "批量移出 Cloudflare 指向成员",
"parameters": [
{
"type": "integer",
"description": "分组 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "批量移出参数",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cloudflare.MemberBatchRemoveInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/{memberId}/move": {
"post": {
"security": [
{
"SessionCookie": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openflare-cloudflare"
],
"summary": "移动 Cloudflare 指向成员到其他分组",
"parameters": [
{
"type": "integer",
"description": "原分组 ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "成员 ID",
"name": "memberId",
"in": "path",
"required": true
},
{
"description": "目标分组参数",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cloudflare.MemberMoveInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Any"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cloudflare.MemberItem"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/{memberId}/remove": {
"post": {
"security": [
@@ -14260,7 +14444,7 @@ const docTemplate = `{
}
},
"400": {
"description": "用户名或密码错误、帐号已禁用等",
"description": "用户名或密码错误",
"schema": {
"$ref": "#/definitions/response.Any"
}
@@ -15139,6 +15323,31 @@ const docTemplate = `{
}
}
},
"cloudflare.MemberBatchMoveInput": {
"type": "object",
"properties": {
"member_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"target_group_id": {
"type": "integer"
}
}
},
"cloudflare.MemberBatchRemoveInput": {
"type": "object",
"properties": {
"member_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"cloudflare.MemberCreateInput": {
"type": "object",
"properties": {
@@ -15185,6 +15394,14 @@ const docTemplate = `{
}
}
},
"cloudflare.MemberMoveInput": {
"type": "object",
"properties": {
"target_group_id": {
"type": "integer"
}
}
},
"cloudflare.MemberUpdateInput": {
"type": "object",
"properties": {
+218 -1
View File
@@ -6355,6 +6355,190 @@
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/batch-move": {
"post": {
"security": [
{
"SessionCookie": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openflare-cloudflare"
],
"summary": "批量移动 Cloudflare 指向成员",
"parameters": [
{
"type": "integer",
"description": "原分组 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "批量移动参数",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cloudflare.MemberBatchMoveInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/batch-remove": {
"post": {
"security": [
{
"SessionCookie": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openflare-cloudflare"
],
"summary": "批量移出 Cloudflare 指向成员",
"parameters": [
{
"type": "integer",
"description": "分组 ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "批量移出参数",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cloudflare.MemberBatchRemoveInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/{memberId}/move": {
"post": {
"security": [
{
"SessionCookie": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openflare-cloudflare"
],
"summary": "移动 Cloudflare 指向成员到其他分组",
"parameters": [
{
"type": "integer",
"description": "原分组 ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "成员 ID",
"name": "memberId",
"in": "path",
"required": true
},
{
"description": "目标分组参数",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cloudflare.MemberMoveInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Any"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cloudflare.MemberItem"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
},
"/api/v1/d/cloudflare/groups/{id}/members/{memberId}/remove": {
"post": {
"security": [
@@ -14253,7 +14437,7 @@
}
},
"400": {
"description": "用户名或密码错误、帐号已禁用等",
"description": "用户名或密码错误",
"schema": {
"$ref": "#/definitions/response.Any"
}
@@ -15132,6 +15316,31 @@
}
}
},
"cloudflare.MemberBatchMoveInput": {
"type": "object",
"properties": {
"member_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"target_group_id": {
"type": "integer"
}
}
},
"cloudflare.MemberBatchRemoveInput": {
"type": "object",
"properties": {
"member_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"cloudflare.MemberCreateInput": {
"type": "object",
"properties": {
@@ -15178,6 +15387,14 @@
}
}
},
"cloudflare.MemberMoveInput": {
"type": "object",
"properties": {
"target_group_id": {
"type": "integer"
}
}
},
"cloudflare.MemberUpdateInput": {
"type": "object",
"properties": {
+136 -1
View File
@@ -354,6 +354,22 @@ definitions:
updated_at:
type: string
type: object
cloudflare.MemberBatchMoveInput:
properties:
member_ids:
items:
type: integer
type: array
target_group_id:
type: integer
type: object
cloudflare.MemberBatchRemoveInput:
properties:
member_ids:
items:
type: integer
type: array
type: object
cloudflare.MemberCreateInput:
properties:
proxied:
@@ -384,6 +400,11 @@ definitions:
zone_id:
type: integer
type: object
cloudflare.MemberMoveInput:
properties:
target_group_id:
type: integer
type: object
cloudflare.MemberUpdateInput:
properties:
proxied:
@@ -8135,6 +8156,52 @@ paths:
summary: 添加 Cloudflare 指向成员
tags:
- openflare-cloudflare
/api/v1/d/cloudflare/groups/{id}/members/{memberId}/move:
post:
consumes:
- application/json
parameters:
- description: 原分组 ID
in: path
name: id
required: true
type: integer
- description: 成员 ID
in: path
name: memberId
required: true
type: integer
- description: 目标分组参数
in: body
name: body
required: true
schema:
$ref: '#/definitions/cloudflare.MemberMoveInput'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Any'
- properties:
data:
$ref: '#/definitions/cloudflare.MemberItem'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.Any'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.Any'
security:
- SessionCookie: []
summary: 移动 Cloudflare 指向成员到其他分组
tags:
- openflare-cloudflare
/api/v1/d/cloudflare/groups/{id}/members/{memberId}/remove:
post:
parameters:
@@ -8228,6 +8295,74 @@ paths:
summary: 更新 Cloudflare 指向成员
tags:
- openflare-cloudflare
/api/v1/d/cloudflare/groups/{id}/members/batch-move:
post:
consumes:
- application/json
parameters:
- description: 原分组 ID
in: path
name: id
required: true
type: integer
- description: 批量移动参数
in: body
name: body
required: true
schema:
$ref: '#/definitions/cloudflare.MemberBatchMoveInput'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Any'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.Any'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.Any'
security:
- SessionCookie: []
summary: 批量移动 Cloudflare 指向成员
tags:
- openflare-cloudflare
/api/v1/d/cloudflare/groups/{id}/members/batch-remove:
post:
consumes:
- application/json
parameters:
- description: 分组 ID
in: path
name: id
required: true
type: integer
- description: 批量移出参数
in: body
name: body
required: true
schema:
$ref: '#/definitions/cloudflare.MemberBatchRemoveInput'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Any'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.Any'
security:
- SessionCookie: []
summary: 批量移出 Cloudflare 指向成员
tags:
- openflare-cloudflare
/api/v1/d/cloudflare/groups/{id}/sync:
post:
parameters:
@@ -12869,7 +13004,7 @@ paths:
$ref: '#/definitions/oauth.BasicUserInfo'
type: object
"400":
description: 用户名或密码错误、帐号已禁用等
description: 用户名或密码错误
schema:
$ref: '#/definitions/response.Any'
"500":