fix(core): Update dependencies and add logging for email and SMS functions

This commit is contained in:
2024-10-02 08:01:31 +02:00
parent e19a5b6195
commit a71d5f1bde
10 changed files with 461 additions and 505 deletions

View File

@@ -1,4 +1,5 @@
import type { SzPlatformClient } from '../classes.platformclient.js';
import { logger } from '../logger.js';
import * as plugins from '../plugins.js';
export class SzSmsConnector {
@@ -13,6 +14,16 @@ export class SzSmsConnector {
'sendSms'
);
const response = await typedrequest.fire(messageArg);
if (process.env.SERVEZONE_PLATFORMCLIENT_DEBUG) {
logger.log('info', `sent sms to ${messageArg.toNumber}}
body:
${messageArg.messageText.split('\n').map(line => ` ${line}`).join('\n')}
`);
}
return response.status;
}