@@ -10,6 +10,7 @@ import {
1010import { MAX_UINT256 , WAD } from "@gearbox-protocol/sdk" ;
1111import { type Hex , isHex } from "viem" ;
1212import { z } from "zod/v4" ;
13+ import { NotificationsConfig } from "./notifications.js" ;
1314
1415export const CommonSchema = z . object ( {
1516 ...ProvidersSchema . shape ,
@@ -399,55 +400,9 @@ export const CommonSchema = z.object({
399400 } ) ,
400401
401402 /**
402- * Telegram bot token used to send notifications
403+ * Notifications, global and per-curator
403404 */
404- telegramBotToken : z
405- . string ( )
406- . transform ( CensoredString . transform )
407- . optional ( )
408- . register ( zommandRegistry , {
409- flags : "--telegram-bot-token <token>" ,
410- description : "Telegram bot token used to send notifications" ,
411- env : "TELEGRAM_BOT_TOKEN" ,
412- } ) ,
413- /**
414- * Telegram channel where bot will post critical notifications
415- */
416- telegramAlertsChannel : z
417- . string ( )
418- . startsWith ( "-" )
419- . optional ( )
420- . register ( zommandRegistry , {
421- flags : "--telegram-alerts-channel <channel>" ,
422- description :
423- "Telegram channel where bot will post critical notifications" ,
424- env : "TELEGRAM_ALERTS_CHANNEL" ,
425- } ) ,
426- /**
427- * Telegram channel where bot will post non-critical notifications
428- */
429- telegramNotificationsChannel : z
430- . string ( )
431- . startsWith ( "-" )
432- . optional ( )
433- . register ( zommandRegistry , {
434- flags : "--telegram-notifications-channel <channel>" ,
435- description :
436- "Telegram channel where bot will post non-critical notifications" ,
437- env : "TELEGRAM_NOTIFICATIONS_CHANNEL" ,
438- } ) ,
439- /**
440- * Notification cooldown in minutes
441- */
442- notificationCooldown : z . coerce
443- . number ( )
444- . nonnegative ( )
445- . default ( 4 * 60 )
446- . register ( zommandRegistry , {
447- flags : "--notification-cooldown <cooldown>" ,
448- description : "Notification cooldown in minutes" ,
449- env : "NOTIFICATION_COOLDOWN" ,
450- } ) ,
405+ ...NotificationsConfig . shape ,
451406} ) ;
452407
453408export type CommonSchema = z . infer < typeof CommonSchema > ;
0 commit comments