mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
8892a60948
refs https://github.com/TryGhost/Toolbox/issues/387 - There will three distinct verification limits soon. To keep the naming clear "configThreshold" would be too generic/confusing to use. - Introduced jsdoc descriptions for the "source" parameter, which will be corelating with each new config parameter ("apiTriggerThreshold", "importTriggerThreshold", "adminTriggerThreshold", etc.). This should give a better visibility into parameters we are dealing in this area.
25 lines
603 B
JavaScript
25 lines
603 B
JavaScript
/**
|
|
* @typedef {object} MemberSubscribeEventData
|
|
* @prop {string} memberId
|
|
* @prop {'import' | 'system' | 'api' | 'admin' | 'member'} source
|
|
*/
|
|
|
|
module.exports = class MemberSubscribeEvent {
|
|
/**
|
|
* @param {MemberSubscribeEventData} data
|
|
* @param {Date} timestamp
|
|
*/
|
|
constructor(data, timestamp) {
|
|
this.data = data;
|
|
this.timestamp = timestamp;
|
|
}
|
|
|
|
/**
|
|
* @param {MemberSubscribeEventData} data
|
|
* @param {Date} [timestamp]
|
|
*/
|
|
static create(data, timestamp) {
|
|
return new MemberSubscribeEvent(data, timestamp || new Date);
|
|
}
|
|
};
|