通知システム 概要
Speakeasy の通知システムは Bell サービスが担当し、4つのチャネルを通じてメッセージを配信します。
通知チャネル
Section titled “通知チャネル”| チャネル | 説明 | 対象 |
|---|---|---|
| BOX | アプリ内通知 | 店舗スタッフ |
| PUSH | Web Push 通知 | 店舗 / 顧客 |
| LINE | LINE Bot メッセージ | 店舗スタッフ |
| メール通知 | 店舗 / 顧客 |
通知アーキテクチャ
Section titled “通知アーキテクチャ”チャットメッセージ通知
Section titled “チャットメッセージ通知”顧客からのメッセージ受信時、店舗に対して通知を送信します。
通知ペイロード
Section titled “通知ペイロード”interface NotificationPayload { readonly type: string; // 通知種別 (chat_message, system_alert) readonly recipientId: string; // 受信者 ID (shopId or userId) readonly recipientType: string; // "shop" or "customer" readonly shopId: string; // 店舗 ID readonly title: string; // タイトル readonly body: string; // 本文 readonly url?: string; // リンク先 readonly senderId?: string; // 送信者 ID}通知カテゴリ
Section titled “通知カテゴリ”通知はカテゴリごとに有効/無効を設定できます。
| カテゴリ | 説明 |
|---|---|
chat_message | チャットの新着メッセージ |
system_alert | システムアラート |
broadcast | 一括配信完了通知 |
カテゴリの適用
Section titled “カテゴリの適用”各通知チャネル(PUSH デバイス、EMAIL アドレス、LINE アカウント)ごとに、カテゴリの有効/無効を個別に設定できます。
// デバイスごとのカテゴリ設定{ chat_message: true, // 新着メッセージ通知: 有効 system_alert: false, // システムアラート: 無効}カテゴリが設定されていない場合は デフォルトで有効 として扱われます。
notification-queue
Section titled “notification-queue”| 項目 | 値 |
|---|---|
| バッチサイズ | 10 |
| タイムアウト | 1秒 |
| リトライ | 3回 |
| DLQ | なし(3回リトライ後に破棄) |
push-notifications
Section titled “push-notifications”| 項目 | 値 |
|---|---|
| バッチサイズ | 10 |
| タイムアウト | 1秒 |
| リトライ | 3回 |
| DLQ | push-notifications-dlq |
- プッシュ通知 - VAPID + Web Push
- LINE通知 - LINE Bot API
- メール通知 - Resend API
- 店舗通知設定 - チャネル設定
- Bell RPC メソッド - 通知関連 RPC
- Bell キュー・Cron 処理 - キュー処理の詳細