2020-11-26 16:09:38 +03:00
|
|
|
const config = require('../../../shared/config');
|
|
|
|
const logging = require('../../../shared/logging');
|
|
|
|
const db = require('../../data/db');
|
|
|
|
const settings = require('../settings/cache');
|
2021-03-02 10:26:33 +03:00
|
|
|
const {EmailAnalyticsService} = require('@tryghost/email-analytics-service');
|
|
|
|
const EventProcessor = require('./lib/event-processor');
|
|
|
|
const MailgunProvider = require('@tryghost/email-analytics-provider-mailgun');
|
2021-03-02 11:26:42 +03:00
|
|
|
const queries = require('./lib/queries');
|
2020-11-26 16:09:38 +03:00
|
|
|
|
|
|
|
module.exports = new EmailAnalyticsService({
|
|
|
|
config,
|
|
|
|
logging,
|
2021-03-02 10:26:33 +03:00
|
|
|
settings,
|
|
|
|
eventProcessor: new EventProcessor({db, logging}),
|
|
|
|
providers: [
|
|
|
|
new MailgunProvider({config, settings, logging})
|
|
|
|
],
|
2021-03-02 11:22:11 +03:00
|
|
|
queries
|
2020-11-26 16:09:38 +03:00
|
|
|
});
|