mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) set up a trialing list and a call scheduled flag for Grist SaaS
Summary: This adds support for the automation described in https://grist.quip.com/rt3tAoEH4kuy/Automate-Sprouts-outreach-email Test Plan: added tests; will need manual testing and iterative integration work Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3804
This commit is contained in:
@@ -83,6 +83,8 @@ export const NotifierEvents = StringUnion(
|
||||
'addBillingManager',
|
||||
'teamCreator',
|
||||
'trialPeriodEndingSoon',
|
||||
'trialingSubscription',
|
||||
'scheduledCall',
|
||||
);
|
||||
|
||||
export type NotifierEvent = typeof NotifierEvents.type;
|
||||
@@ -467,6 +469,10 @@ export class HomeDBManager extends EventEmitter {
|
||||
return await User.findOne({where: {apiKey}, relations: ["logins"]}) || undefined;
|
||||
}
|
||||
|
||||
public async getUserByRef(ref: string): Promise<User|undefined> {
|
||||
return await User.findOne({where: {ref}, relations: ["logins"]}) || undefined;
|
||||
}
|
||||
|
||||
public async getUser(userId: number): Promise<User|undefined> {
|
||||
return await User.findOne({where: {id: userId}, relations: ["logins"]}) || undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user