created a new branch with alert functionality and added the compose files etc ..
This commit is contained in:
42
types/notifications.ts
Normal file
42
types/notifications.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
export type NotificationProvider = 'ntfy' | 'gotify' | 'sns';
|
||||
export type SchedulerProvider = 'schedy';
|
||||
|
||||
export interface NotificationSettings {
|
||||
provider: NotificationProvider | '';
|
||||
scheduler?: SchedulerProvider | '';
|
||||
// Ntfy
|
||||
ntfyServer?: string; // e.g., https://ntfy.sh or self-hosted
|
||||
ntfyTopic?: string;
|
||||
// Gotify
|
||||
gotifyServer?: string; // base URL
|
||||
gotifyToken?: string;
|
||||
// Amazon SNS
|
||||
snsRegion?: string;
|
||||
snsTopicArn?: string;
|
||||
snsAccessKeyId?: string;
|
||||
snsSecretAccessKey?: string;
|
||||
// Schedy
|
||||
schedyBaseUrl?: string; // e.g., http://localhost:8080
|
||||
schedyApiKey?: string;
|
||||
// Contact details
|
||||
email?: string;
|
||||
// Lead time before liquidation in days
|
||||
daysBefore?: number; // default 0
|
||||
}
|
||||
|
||||
export interface PositionNotification {
|
||||
chainId: number;
|
||||
debtAddress: string;
|
||||
nftAddress: string;
|
||||
tokenId: string; // decimal string
|
||||
// Legacy single-job fields (backward compat with already-stored values)
|
||||
jobId?: string; // scheduler job id (from schedy)
|
||||
scheduledAt?: number; // epoch seconds
|
||||
// New multi-job support
|
||||
jobs?: Array<{
|
||||
id: string;
|
||||
at: number; // epoch seconds
|
||||
label: 'lead' | 'half' | 'last';
|
||||
}>;
|
||||
enabled: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user