Files
非法操作 70ba852ecc feat: cli tool support create trigger plugins (#485)
* feat: cli tool support create trigger plugins

* fix(trigger): update placeholder comment in SubscriptionConstructor for webhook registration

---------

Co-authored-by: Harry <xh001x@hotmail.com>
2025-11-05 15:45:58 +08:00

132 lines
4.7 KiB
YAML

identity:
name: "{{ .PluginName }}"
author: "{{ .Author }}"
label:
en_US: "{{ .PluginName }}"
zh_Hans: "{{ .PluginName }}"
pt_BR: "{{ .PluginName }}"
ja_JP: "{{ .PluginName }}"
description:
en_US: "{{ .PluginDescription }}"
zh_Hans: "{{ .PluginDescription }}"
pt_BR: "{{ .PluginDescription }}"
ja_JP: "{{ .PluginDescription }}"
icon: "icon.svg"
subscription_schema:
- name: "webhook_secret"
type: "secret-input"
required: false
label:
en_US: "Webhook Secret"
zh_Hans: "Webhook 密钥"
pt_BR: "Segredo do Webhook"
ja_JP: "Webhookシークレット"
help:
en_US: "Optional shared secret used to validate inbound webhook signatures."
zh_Hans: "用于验证 Webhook 签名的可选共享密钥。"
pt_BR: "Segredo compartilhado opcional usado para validar assinaturas de webhook."
ja_JP: "受信Webhookの署名を検証するためのオプションの共有シークレットです。"
subscription_constructor:
parameters:
- name: "events"
type: "checkbox"
multiple: true
required: true
default: ["{{ .PluginName }}_event"]
options:
- value: "{{ .PluginName }}_event"
label:
en_US: "{{ .PluginName | SnakeToCamel }} Event"
zh_Hans: "{{ .PluginName }} 事件"
pt_BR: "Evento {{ .PluginName | SnakeToCamel }}"
ja_JP: "{{ .PluginName }} イベント"
label:
en_US: "Events to Subscribe"
zh_Hans: "订阅的事件"
pt_BR: "Eventos para inscrever"
ja_JP: "購読するイベント"
help:
en_US: "Select which trigger events should be delivered to this subscription."
zh_Hans: "选择哪些触发事件应该推送到这个订阅。"
pt_BR: "Selecione quais eventos de gatilho devem ser entregues para esta inscrição."
ja_JP: "このサブスクリプションに配信するトリガーイベントを選択します。"
credentials_schema:
api_key:
type: "secret-input"
required: false
label:
en_US: "API Key"
zh_Hans: "API 密钥"
pt_BR: "Chave de API"
ja_JP: "APIキー"
placeholder:
en_US: "Paste your service API key"
zh_Hans: "粘贴您的服务 API 密钥"
pt_BR: "Cole sua chave de API do serviço"
ja_JP: "サービスのAPIキーを貼り付けてください"
help:
en_US: "Used to authenticate requests to the third-party service."
zh_Hans: "用于向第三方服务发起请求时进行身份验证。"
pt_BR: "Usado para autenticar solicitações ao serviço de terceiros."
ja_JP: "サードパーティサービスへのリクエストを認証するために使用します。"
#########################################################################################
# If you want to support OAuth, you can uncomment the following code.
#########################################################################################
# oauth_schema:
# client_schema:
# - name: "client_id"
# type: "secret-input"
# required: true
# label:
# en_US: "Client ID"
# zh_Hans: "Client ID"
# ja_JP: "クライアントID"
# placeholder:
# en_US: "Enter the OAuth Client ID"
# zh_Hans: "请输入 OAuth Client ID"
# ja_JP: "OAuth クライアントIDを入力してください"
# help:
# en_US: "The OAuth Client ID."
# zh_Hans: "在第三方获取 Client ID。"
# ja_JP: "OAuth で取得したクライアントID。"
# - name: "client_secret"
# type: "secret-input"
# required: true
# label:
# en_US: "Client Secret"
# zh_Hans: "Client Secret"
# ja_JP: "クライアントシークレット"
# placeholder:
# en_US: "Enter the OAuth Client Secret"
# zh_Hans: "请输入 OAuth Client Secret"
# ja_JP: "OAuth クライアントシークレットを入力してください"
# help:
# en_US: "The OAuth Client Secret generated together with the Client ID."
# zh_Hans: "与 Client ID 一同生成的 OAuth Client Secret。"
# ja_JP: "クライアントIDと併せて発行された OAuth クライアントシークレット。"
# credentials_schema:
# - name: "access_token"
# type: "secret-input"
# label:
# en_US: "Access Token"
# zh_Hans: "访问令牌"
# ja_JP: "アクセストークン"
# - name: "refresh_token"
# type: "secret-input"
# label:
# en_US: "Refresh Token"
# zh_Hans: "刷新令牌"
# ja_JP: "リフレッシュトークン"
events:
- events/{{ .PluginName }}_event.yaml
extra:
python:
source: provider/{{ .PluginName }}.py