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