fix(core): update
This commit is contained in:
parent
7fd110d56c
commit
4dd5d12a2e
@ -8,9 +8,8 @@
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild)",
|
||||
"format": "(gitzone format)"
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.0.22",
|
||||
|
10
test/test.ts
10
test/test.ts
@ -10,6 +10,16 @@ tap.test('should create a valid Handler', async () => {
|
||||
let response: any;
|
||||
return response;
|
||||
}
|
||||
public async checkReqirements() {
|
||||
return {
|
||||
allOk: true,
|
||||
reason: ''
|
||||
}
|
||||
}
|
||||
|
||||
public async start() {}
|
||||
|
||||
public async stop() {}
|
||||
}
|
||||
|
||||
const myHandlerInstance = new MyHandler();
|
||||
|
@ -1,14 +1,24 @@
|
||||
import * as plugins from './sdk.plugins';
|
||||
import { AuthInfo } from './sdk.classes.authinfo';
|
||||
|
||||
export interface IRequirementResult {
|
||||
allOk: boolean;
|
||||
reason: string;
|
||||
}
|
||||
|
||||
export abstract class AAgHandler<TClaim> {
|
||||
/**
|
||||
* a slug that separates the handler from other handlers
|
||||
*/
|
||||
public abstract slug: string;
|
||||
|
||||
public abstract handleRequest (authInfoArg: AuthInfo<TClaim>, request: plugins.tsclass.network.ISimpleRequest): Promise<plugins.tsclass.network.ISimpleResponse>;
|
||||
|
||||
public abstract handleRequest (authInfoArg: AuthInfo<TClaim>, request: plugins.tsclass.network.ISimpleRequest): Promise<plugins.tsclass.network.ISimpleResponse>;
|
||||
public abstract checkReqirements (): Promise<IRequirementResult>;
|
||||
|
||||
/**
|
||||
* start the ag-handler
|
||||
*/
|
||||
public abstract start(): Promise<any>;
|
||||
public abstract stop(): Promise<any>;
|
||||
}
|
Loading…
Reference in New Issue
Block a user