Ghost/ghost/member-events
Rishabh 8d07d6e93b Updated subscription created/canceled events data
refs https://github.com/TryGhost/Team/issues/1865

- adds new subscription canceled event
- updates existing subscription created event to include tier id and source data
2022-09-10 11:06:34 +05:30
..
lib Updated subscription created/canceled events data 2022-09-10 11:06:34 +05:30
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 Updated subscription created/canceled events data 2022-09-10 11:06:34 +05:30
package.json Added member attribution events and storage (#15243) 2022-08-18 17:38:42 +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);