mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat(channel): add WeChat (weixin) adapter with QR code (#278)
* feat(channel): add WeChat (weixin) adapter with QR code * fix(channel): fix weixin block streaming * chore(channel): update weixin logo
This commit is contained in:
@@ -4940,6 +4940,111 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/channel/weixin/qr/poll": {
|
||||
"post": {
|
||||
"description": "Long-poll the QR code scan status. On confirmed, auto-saves credentials.",
|
||||
"tags": [
|
||||
"bots"
|
||||
],
|
||||
"summary": "Poll WeChat QR login status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bot ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "QR code to poll",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/weixin.QRPollRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/weixin.QRPollResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/channel/weixin/qr/start": {
|
||||
"post": {
|
||||
"description": "Fetch a QR code from WeChat for scanning",
|
||||
"tags": [
|
||||
"bots"
|
||||
],
|
||||
"summary": "Start WeChat QR login",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bot ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Optional base URL override",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/weixin.QRStartRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/weixin.QRStartResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/channel/{platform}": {
|
||||
"get": {
|
||||
"description": "Get bot channel configuration",
|
||||
@@ -12389,6 +12494,57 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weixin.QRPollRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"baseUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"qr_code": {
|
||||
"type": "string"
|
||||
},
|
||||
"routeTag": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weixin.QRPollResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "wait, scaned, confirmed, expired",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weixin.QRStartRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"baseUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"routeTag": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weixin.QRStartResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"qr_code": {
|
||||
"type": "string"
|
||||
},
|
||||
"qr_code_url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user