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:
@@ -2531,6 +2531,39 @@ definitions:
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
weixin.QRPollRequest:
|
||||
properties:
|
||||
baseUrl:
|
||||
type: string
|
||||
qr_code:
|
||||
type: string
|
||||
routeTag:
|
||||
type: string
|
||||
type: object
|
||||
weixin.QRPollResponse:
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
status:
|
||||
description: wait, scaned, confirmed, expired
|
||||
type: string
|
||||
type: object
|
||||
weixin.QRStartRequest:
|
||||
properties:
|
||||
baseUrl:
|
||||
type: string
|
||||
routeTag:
|
||||
type: string
|
||||
type: object
|
||||
weixin.QRStartResponse:
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
qr_code:
|
||||
type: string
|
||||
qr_code_url:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
title: Memoh API
|
||||
@@ -6072,6 +6105,75 @@ paths:
|
||||
summary: Update bot channel status
|
||||
tags:
|
||||
- bots
|
||||
/bots/{id}/channel/weixin/qr/poll:
|
||||
post:
|
||||
description: Long-poll the QR code scan status. On confirmed, auto-saves credentials.
|
||||
parameters:
|
||||
- description: Bot ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: QR code to poll
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/weixin.QRPollRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/weixin.QRPollResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Poll WeChat QR login status
|
||||
tags:
|
||||
- bots
|
||||
/bots/{id}/channel/weixin/qr/start:
|
||||
post:
|
||||
description: Fetch a QR code from WeChat for scanning
|
||||
parameters:
|
||||
- description: Bot ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Optional base URL override
|
||||
in: body
|
||||
name: payload
|
||||
schema:
|
||||
$ref: '#/definitions/weixin.QRStartRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/weixin.QRStartResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Start WeChat QR login
|
||||
tags:
|
||||
- bots
|
||||
/bots/{id}/checks:
|
||||
get:
|
||||
description: Evaluate bot attached resource checks in runtime
|
||||
|
||||
Reference in New Issue
Block a user