apiVersion: v1
kind: MessagePlatformAdapter
metadata:
  name: qqofficial
  label:
    en_US: QQ Official API
    zh_Hans: QQ 官方 API
    zh_Hant: QQ 官方 API
  description:
    en_US: QQ Official API (Webhook)
    zh_Hans: QQ 官方 API (Webhook)，需要公网地址以接收消息推送，请查看文档了解使用方式
    zh_Hant: QQ 官方 API (Webhook)，需要公網地址以接收訊息推送，請查看文件了解使用方式
  icon: qqofficial.svg
spec:
  categories:
    - china
  help_links:
    zh: https://link.langbot.app/zh/platforms/qqofficial
    en: https://link.langbot.app/en/platforms/qqofficial
    ja: https://link.langbot.app/ja/platforms/qqofficial
  config:
    - name: webhook_url
      label:
        en_US: Webhook Callback URL
        zh_Hans: Webhook 回调地址
        zh_Hant: Webhook 回調地址
      description:
        en_US: Copy this URL and paste it into your QQ Official API webhook configuration
        zh_Hans: 复制此地址并粘贴到 QQ 官方 API 的 Webhook 配置中
        zh_Hant: 複製此地址並貼到 QQ 官方 API 的 Webhook 設定中
      type: webhook-url
      required: false
      default: ""
    - name: appid
      label:
        en_US: App ID
        zh_Hans: 应用ID
        zh_Hant: 應用ID
      type: string
      required: true
      default: ""
    - name: secret
      label:
        en_US: Secret
        zh_Hans: 密钥
        zh_Hant: 密鑰
      type: string
      required: true
      default: ""
    - name: token
      label:
        en_US: Token
        zh_Hans: 令牌
        zh_Hant: 令牌
      type: string
      required: true
      default: ""
execution:
  python:
    path: ./qqofficial.py
    attr: QQOfficialAdapter
