mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
27 lines
631 B
JavaScript
27 lines
631 B
JavaScript
|
/**
|
||
|
* @typedef {object} MemberUnsubscribeEventData
|
||
|
* @prop {string} memberId
|
||
|
* @prop {string} memberStatus
|
||
|
* @prop {string} entryId
|
||
|
* @prop {string} sourceUrl
|
||
|
*/
|
||
|
|
||
|
module.exports = class MemberUnsubscribeEvent {
|
||
|
/**
|
||
|
* @param {MemberUnsubscribeEventData} data
|
||
|
* @param {Date} timestamp
|
||
|
*/
|
||
|
constructor(data, timestamp) {
|
||
|
this.data = data;
|
||
|
this.timestamp = timestamp;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {MemberUnsubscribeEventData} data
|
||
|
* @param {Date} [timestamp]
|
||
|
*/
|
||
|
static create(data, timestamp) {
|
||
|
return new MemberUnsubscribeEvent(data, timestamp || new Date);
|
||
|
}
|
||
|
};
|