mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
9fca7ce8f3
refs https://github.com/TryGhost/Team/issues/1054 In order to listen to events we must define them! This adds the missing events that we need to listen to for member analytics.
28 lines
689 B
JavaScript
28 lines
689 B
JavaScript
/**
|
|
* @typedef {object} MemberPaidCancellationEventData
|
|
* @prop {string} memberId
|
|
* @prop {string} memberStatus
|
|
* @prop {string} subscriptionId
|
|
* @prop {string} entryId
|
|
* @prop {string} sourceUrl
|
|
*/
|
|
|
|
module.exports = class MemberPaidCancellationEvent {
|
|
/**
|
|
* @param {MemberPaidCancellationEventData} data
|
|
* @param {Date} timestamp
|
|
*/
|
|
constructor(data, timestamp) {
|
|
this.data = data;
|
|
this.timestamp = timestamp;
|
|
}
|
|
|
|
/**
|
|
* @param {MemberPaidCancellationEventData} data
|
|
* @param {Date} [timestamp]
|
|
*/
|
|
static create(data, timestamp) {
|
|
return new MemberPaidCancellationEvent(data, timestamp || new Date);
|
|
}
|
|
};
|