mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
WeChat Web QR Code Integration (#1961)
This commit is contained in:
@@ -62,4 +62,22 @@ export async function patchAppConfig(
|
||||
})
|
||||
}
|
||||
|
||||
// WeChat QR login flow API
|
||||
|
||||
export interface WeixinFlowResponse {
|
||||
flow_id: string
|
||||
status: "wait" | "scaned" | "confirmed" | "expired" | "error"
|
||||
qr_data_uri?: string
|
||||
account_id?: string
|
||||
error?: string
|
||||
}
|
||||
|
||||
export async function startWeixinFlow(): Promise<WeixinFlowResponse> {
|
||||
return request<WeixinFlowResponse>("/api/weixin/flows", { method: "POST" })
|
||||
}
|
||||
|
||||
export async function pollWeixinFlow(flowID: string): Promise<WeixinFlowResponse> {
|
||||
return request<WeixinFlowResponse>(`/api/weixin/flows/${encodeURIComponent(flowID)}`)
|
||||
}
|
||||
|
||||
export type { ChannelsCatalogResponse, ConfigActionResponse }
|
||||
|
||||
Reference in New Issue
Block a user