2020-11-26 16:09:38 +03:00
|
|
|
const config = require('../../../shared/config');
|
|
|
|
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,
|
2021-03-02 10:26:33 +03:00
|
|
|
settings,
|
2021-12-14 14:22:39 +03:00
|
|
|
eventProcessor: new EventProcessor({db}),
|
2021-03-02 10:26:33 +03:00
|
|
|
providers: [
|
2021-12-14 14:22:39 +03:00
|
|
|
new MailgunProvider({config, settings})
|
2021-03-02 10:26:33 +03:00
|
|
|
],
|
2021-03-02 11:22:11 +03:00
|
|
|
queries
|
2020-11-26 16:09:38 +03:00
|
|
|
});
|