2020-11-26 16:09:38 +03:00
|
|
|
const config = require('../../../shared/config');
|
2021-06-15 17:36:27 +03:00
|
|
|
const logging = require('@tryghost/logging');
|
2020-11-26 16:09:38 +03:00
|
|
|
const db = require('../../data/db');
|
2021-06-30 16:56:57 +03:00
|
|
|
const settings = require('../../../shared/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
|
|
|
});
|