mirror of https://github.com/nocodb/nocodb
12 changed files with 65 additions and 97 deletions
@ -1,20 +1,15 @@ |
|||||||
export default interface IEmailAdapter { |
export default interface IEmailAdapter { |
||||||
init(): Promise<any> |
init(): Promise<any>; |
||||||
mailSend(mail:XcEmail): Promise<any> |
mailSend(mail: XcEmail): Promise<any>; |
||||||
test(email): Promise<boolean> |
test(email): Promise<boolean>; |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
interface XcEmail { |
interface XcEmail { |
||||||
// from?:string;
|
// from?:string;
|
||||||
to:string; |
to: string; |
||||||
subject:string; |
subject: string; |
||||||
html?:string; |
html?: string; |
||||||
text?:string; |
text?: string; |
||||||
} |
|
||||||
|
|
||||||
export { |
|
||||||
XcEmail |
|
||||||
} |
} |
||||||
|
|
||||||
|
export { XcEmail }; |
||||||
|
@ -1,11 +1,8 @@ |
|||||||
import XcPlugin from "./XcPlugin"; |
import IEmailAdapter from './IEmailAdapter'; |
||||||
import IEmailAdapter from "./IEmailAdapter"; |
import XcPlugin from './XcPlugin'; |
||||||
|
|
||||||
abstract class XcEmailPlugin extends XcPlugin{ |
|
||||||
|
|
||||||
abstract getAdapter():IEmailAdapter |
|
||||||
|
|
||||||
|
abstract class XcEmailPlugin extends XcPlugin { |
||||||
|
abstract getAdapter(): IEmailAdapter; |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
export default XcEmailPlugin; |
export default XcEmailPlugin; |
||||||
|
@ -1,24 +1,20 @@ |
|||||||
import XcPluginHooks from "./XcPluginHooks"; |
import XcPluginHooks from './XcPluginHooks'; |
||||||
|
|
||||||
abstract class XcPlugin extends XcPluginHooks{ |
abstract class XcPlugin extends XcPluginHooks { |
||||||
|
protected readonly app: any; |
||||||
|
public readonly config: any; |
||||||
|
|
||||||
protected readonly app:any; |
constructor(app: any, config: any) { |
||||||
public readonly config:any; |
|
||||||
|
|
||||||
constructor(app:any, config:any) { |
|
||||||
super(); |
super(); |
||||||
this.app = app; |
this.app = app; |
||||||
this.config = config; |
this.config = config; |
||||||
} |
} |
||||||
|
|
||||||
|
abstract init(config: any): Promise<any>; |
||||||
abstract init(config:any):Promise<any>; |
|
||||||
|
|
||||||
|
|
||||||
// public getHooks(): XcPluginHooks{
|
// public getHooks(): XcPluginHooks{
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
export default XcPlugin; |
export default XcPlugin; |
||||||
|
@ -1,24 +1,13 @@ |
|||||||
/* eslint-disable @typescript-eslint/no-empty-function */ |
/* eslint-disable @typescript-eslint/no-empty-function */ |
||||||
abstract class XcPluginHooks { |
abstract class XcPluginHooks { |
||||||
|
public async appStart(): Promise<any> {} |
||||||
|
|
||||||
public async appStart(): Promise<any> { |
public async projectStart(): Promise<any> {} |
||||||
|
|
||||||
} |
public async projectStop(): Promise<any> {} |
||||||
|
|
||||||
public async projectStart(): Promise<any> { |
public async projectDelete(): Promise<any> {} |
||||||
|
|
||||||
} |
public async syncMigrations(): Promise<any> {} |
||||||
|
|
||||||
public async projectStop(): Promise<any> { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
public async projectDelete(): Promise<any> { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
public async syncMigrations(): Promise<any> { |
|
||||||
|
|
||||||
} |
|
||||||
} |
} |
||||||
export default XcPluginHooks; |
export default XcPluginHooks; |
||||||
|
@ -1,10 +1,7 @@ |
|||||||
abstract class XcPluginMigration { |
abstract class XcPluginMigration { |
||||||
|
|
||||||
public abstract up(): Promise<any>; |
public abstract up(): Promise<any>; |
||||||
|
|
||||||
public abstract down(): Promise<any>; |
public abstract down(): Promise<any>; |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
|
export default XcPluginMigration; |
||||||
export default XcPluginMigration |
|
||||||
|
@ -1,11 +1,8 @@ |
|||||||
import XcPlugin from "./XcPlugin"; |
import IStorageAdapter from './IStorageAdapter'; |
||||||
import IStorageAdapter from "./IStorageAdapter"; |
import XcPlugin from './XcPlugin'; |
||||||
|
|
||||||
abstract class XcStoragePlugin extends XcPlugin { |
abstract class XcStoragePlugin extends XcPlugin { |
||||||
|
abstract getAdapter(): IStorageAdapter; |
||||||
abstract getAdapter(): IStorageAdapter |
|
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
export default XcStoragePlugin; |
export default XcStoragePlugin; |
||||||
|
@ -1,11 +1,9 @@ |
|||||||
import XcPlugin from "./XcPlugin"; |
import { IWebhookNotificationAdapter } from '../index'; |
||||||
import {IWebhookNotificationAdapter} from "../index"; |
|
||||||
|
|
||||||
abstract class XcStoragePlugin extends XcPlugin { |
import XcPlugin from './XcPlugin'; |
||||||
|
|
||||||
abstract getAdapter(): IWebhookNotificationAdapter |
|
||||||
|
|
||||||
|
abstract class XcStoragePlugin extends XcPlugin { |
||||||
|
abstract getAdapter(): IWebhookNotificationAdapter; |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
export default XcStoragePlugin; |
export default XcStoragePlugin; |
||||||
|
Loading…
Reference in new issue