@@ -6,17 +6,26 @@ export interface INotificationService {
66 * Sends a notification about a newly created app
77 * @param {string } title - The full title of the app
88 * @param {string } description - The shortened description of the app
9+ * @param {number } appId - The ID of the newly created app
10+ * @param {number } totalApps - The total count of apps
911 * @returns {Promise<boolean> } - Whether the notification was sent successfully
1012 */
11- sendAppCreationNotification ( title : string , description : string ) : Promise < boolean >
13+ sendAppCreationNotification ( title : string , description : string , appId : number , totalApps : number ) : Promise < boolean >
1214
1315 /**
1416 * Sends a notification about a newly created template
1517 * @param {string } title - The full title of the template
1618 * @param {string } description - The shortened description of the template
19+ * @param {number } templateId - The ID of the newly created template
20+ * @param {number } totalTemplates - The total count of templates
1721 * @returns {Promise<boolean> } - Whether the notification was sent successfully
1822 */
19- sendTemplateCreationNotification ( title : string , description : string ) : Promise < boolean >
23+ sendTemplateCreationNotification (
24+ title : string ,
25+ description : string ,
26+ templateId : number ,
27+ totalTemplates : number ,
28+ ) : Promise < boolean >
2029
2130 /**
2231 * Sends a notification about a newly registered user
@@ -57,21 +66,35 @@ export class TelegramNotificationService implements INotificationService {
5766 * Sends a notification about a newly created app
5867 * @param {string } title - The full title of the app
5968 * @param {string } description - The shortened description of the app
69+ * @param {number } appId - The ID of the newly created app
70+ * @param {number } totalApps - The total count of apps
6071 * @returns {Promise<boolean> } - Whether the notification was sent successfully
6172 */
62- async sendAppCreationNotification ( title : string , description : string ) : Promise < boolean > {
63- const message = `🆕 New App Created!\n\n📱 *${ title } *\n\n${ description } `
73+ async sendAppCreationNotification (
74+ title : string ,
75+ description : string ,
76+ appId : number ,
77+ totalApps : number ,
78+ ) : Promise < boolean > {
79+ const message = `🆕 New App Created!\n\n📱 *${ title } * (ID: ${ appId } )\n\n${ description } \n\n📊 Total Apps: *${ totalApps } *`
6480 return this . sendTelegramMessage ( message )
6581 }
6682
6783 /**
6884 * Sends a notification about a newly created template
6985 * @param {string } title - The full title of the template
7086 * @param {string } description - The shortened description of the template
87+ * @param {number } templateId - The ID of the newly created template
88+ * @param {number } totalTemplates - The total count of templates
7189 * @returns {Promise<boolean> } - Whether the notification was sent successfully
7290 */
73- async sendTemplateCreationNotification ( title : string , description : string ) : Promise < boolean > {
74- const message = `🆕 New Template Created!\n\n📋 *${ title } *\n\n${ description } `
91+ async sendTemplateCreationNotification (
92+ title : string ,
93+ description : string ,
94+ templateId : number ,
95+ totalTemplates : number ,
96+ ) : Promise < boolean > {
97+ const message = `🆕 New Template Created!\n\n📋 *${ title } * (ID: ${ templateId } )\n\n${ description } \n\n📊 Total Templates: *${ totalTemplates } *`
7598 return this . sendTelegramMessage ( message )
7699 }
77100
@@ -151,12 +174,24 @@ export function createNotificationService(): INotificationService {
151174 // If no configuration is available, use a mock service that logs to console
152175 console . warn ( 'Telegram notification service not configured. Using console logging instead.' )
153176 return {
154- async sendAppCreationNotification ( title : string , description : string ) : Promise < boolean > {
155- console . log ( `[NOTIFICATION] New App Created: ${ title } - ${ description } ` )
177+ async sendAppCreationNotification (
178+ title : string ,
179+ description : string ,
180+ appId : number ,
181+ totalApps : number ,
182+ ) : Promise < boolean > {
183+ console . log ( `[NOTIFICATION] New App Created: ${ title } (ID: ${ appId } ) - ${ description } - Total Apps: ${ totalApps } ` )
156184 return true
157185 } ,
158- async sendTemplateCreationNotification ( title : string , description : string ) : Promise < boolean > {
159- console . log ( `[NOTIFICATION] New Template Created: ${ title } - ${ description } ` )
186+ async sendTemplateCreationNotification (
187+ title : string ,
188+ description : string ,
189+ templateId : number ,
190+ totalTemplates : number ,
191+ ) : Promise < boolean > {
192+ console . log (
193+ `[NOTIFICATION] New Template Created: ${ title } (ID: ${ templateId } ) - ${ description } - Total Templates: ${ totalTemplates } ` ,
194+ )
160195 return true
161196 } ,
162197 async sendUserRegistrationNotification ( address : string , totalUsers : number ) : Promise < boolean > {
0 commit comments