Ghost/ghost/member-events
Daniel Lockyer 85098e07d4 Configured all unit tests to use dot reporter
refs https://ghost.slack.com/archives/C02G9E68C/p1696490748701419

- this configures mocha to use the dot reporter because the default is
  way too verbose in CI
2023-10-05 12:24:24 +02:00
..
lib Added eslint rule for file naming convention 2023-05-09 12:34:34 -04:00
test Added @tryghost/member-events 2021-09-17 15:22:08 +02:00
.eslintrc.js Added @tryghost/member-events 2021-09-17 15:22:08 +02:00
index.js 🐛 Fixed subscriptions visible as "Active" within Ghost Admin (#16255) 2023-02-13 13:07:53 +01:00
package.json Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
README.md Tidied up package READMEs 2022-07-25 15:17:12 +02:00

Member Events

Usage

const {MemberEntryViewEvent} = require('@tryghost/member-events');

const event = MemberEntryViewEvent.create({
    memberId: member.id,
    memberStatus: member.status,
    entryId: post.id,
    entryUrl: post.url
});

const DomainEvents = require('@tryghost/domain-events');

DomainEvents.dispatch(event);