2020-11-26 13:09:38 +00:00
|
|
|
const config = require('../../../shared/config');
|
|
|
|
const db = require('../../data/db');
|
2021-06-30 14:56:57 +01:00
|
|
|
const settings = require('../../../shared/settings-cache');
|
2021-03-02 07:26:33 +00: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 08:26:42 +00:00
|
|
|
const queries = require('./lib/queries');
|
2020-11-26 13:09:38 +00:00
|
|
|
|
|
|
|
module.exports = new EmailAnalyticsService({
|
|
|
|
config,
|
2021-03-02 07:26:33 +00:00
|
|
|
settings,
|
2021-12-14 11:22:39 +00:00
|
|
|
eventProcessor: new EventProcessor({db}),
|
2021-03-02 07:26:33 +00:00
|
|
|
providers: [
|
2021-12-14 11:22:39 +00:00
|
|
|
new MailgunProvider({config, settings})
|
2021-03-02 07:26:33 +00:00
|
|
|
],
|
2021-03-02 08:22:11 +00:00
|
|
|
queries
|
2020-11-26 13:09:38 +00:00
|
|
|
});
|