@@ -183,6 +183,12 @@ export class Controller {
183
183
throw new ServerError ( 400 , "Invalid contact provided by adapter" ) ;
184
184
}
185
185
186
+ infoLogger (
187
+ "createContact" ,
188
+ `Contact with id ${ contact . id } created` ,
189
+ apiKey
190
+ ) ;
191
+
186
192
const sanitizedContact : Contact = sanitizeContact ( contact , locale ) ;
187
193
188
194
if ( this . adapter . getToken && req . providerConfig ) {
@@ -253,6 +259,12 @@ export class Controller {
253
259
throw new ServerError ( 400 , "Invalid contact provided by adapter" ) ;
254
260
}
255
261
262
+ infoLogger (
263
+ "createContact" ,
264
+ `Contact with id ${ contact . id } updated` ,
265
+ apiKey
266
+ ) ;
267
+
256
268
const sanitizedContact : Contact = sanitizeContact ( contact , locale ) ;
257
269
258
270
if ( this . adapter . getToken && req . providerConfig ) {
@@ -320,6 +332,12 @@ export class Controller {
320
332
}
321
333
res . status ( 200 ) . send ( ) ;
322
334
335
+ infoLogger (
336
+ "createContact" ,
337
+ `Contact with id ${ contactId } deleted` ,
338
+ apiKey
339
+ ) ;
340
+
323
341
if ( this . contactCache ) {
324
342
const contacts = await this . contactCache . get ( apiKey ) ;
325
343
if ( Array . isArray ( contacts ) ) {
@@ -597,6 +615,12 @@ export class Controller {
597
615
req . body
598
616
) ;
599
617
618
+ infoLogger (
619
+ "handleCallEvent" ,
620
+ `CallEvent with refId ${ integrationCallEventRef } created!` ,
621
+ providerConfig . apiKey
622
+ ) ;
623
+
600
624
infoLogger ( "handleCallEvent" , `END` , providerConfig . apiKey ) ;
601
625
res . status ( 200 ) . send ( integrationCallEventRef ) ;
602
626
} catch ( error ) {
@@ -647,6 +671,14 @@ export class Controller {
647
671
const entitiesWithCallLogReferences =
648
672
await this . adapter . createCallLogsForEntities ( providerConfig , req . body ) ;
649
673
674
+ entitiesWithCallLogReferences . forEach ( ( { id, logId } ) =>
675
+ infoLogger (
676
+ "createCallLogForEntities" ,
677
+ `CallEvent with logId ${ logId } created for id ${ id } ` ,
678
+ providerConfig ?. apiKey
679
+ )
680
+ ) ;
681
+
650
682
infoLogger ( "createCallLogForEntities" , `END` , providerConfig ?. apiKey ) ;
651
683
res . status ( 200 ) . send ( entitiesWithCallLogReferences ) ;
652
684
} catch ( error ) {
0 commit comments