Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
c1d2231a94 | |||
d73a144e8f | |||
e91131b7ae | |||
4dd5d12a2e | |||
7fd110d56c | |||
bb7e9e75ba |
3952
package-lock.json
generated
3952
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apiglobal/sdk",
|
"name": "@apiglobal/sdk",
|
||||||
"version": "1.0.4",
|
"version": "1.0.7",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "an sdk package for api.global",
|
"description": "an sdk package for api.global",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -8,21 +8,20 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "(tsbuild)",
|
"build": "(tsbuild --web)"
|
||||||
"format": "(gitzone format)"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.0.22",
|
"@gitzone/tsbuild": "^2.1.24",
|
||||||
"@gitzone/tstest": "^1.0.15",
|
"@gitzone/tstest": "^1.0.33",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.0.7",
|
||||||
"@types/node": "^13.9.3",
|
"@types/node": "^14.0.14",
|
||||||
"tslint": "^6.1.0",
|
"tslint": "^6.1.2",
|
||||||
"tslint-config-prettier": "^1.15.0"
|
"tslint-config-prettier": "^1.15.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest": "^1.0.28",
|
"@apiglobal/typedrequest": "^1.0.38",
|
||||||
"@tsclass/tsclass": "^3.0.16"
|
"@tsclass/tsclass": "^3.0.18"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
21
readme.md
21
readme.md
@ -8,13 +8,20 @@ an sdk package for api.global
|
|||||||
* [docs (typedoc)](https://apiglobal.gitlab.io/sdk/)
|
* [docs (typedoc)](https://apiglobal.gitlab.io/sdk/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
[](https://gitlab.com/apiglobal/sdk/commits/master)
|
|
||||||
[](https://gitlab.com/apiglobal/sdk/commits/master)
|
Status Category | Status Badge
|
||||||
[](https://www.npmjs.com/package/@apiglobal/sdk)
|
-- | --
|
||||||
[](https://snyk.io/test/npm/@apiglobal/sdk)
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
npm | [](https://lossless.cloud)
|
||||||
[](https://prettier.io/)
|
Snyk | [](https://lossless.cloud)
|
||||||
|
TypeScript Support | [](https://lossless.cloud)
|
||||||
|
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
Code Style | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||||
|
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||||
|
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
10
test/test.ts
10
test/test.ts
@ -10,6 +10,16 @@ tap.test('should create a valid Handler', async () => {
|
|||||||
let response: any;
|
let response: any;
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
public async checkReqirements() {
|
||||||
|
return {
|
||||||
|
allOk: true,
|
||||||
|
reason: '',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public async start() {}
|
||||||
|
|
||||||
|
public async stop() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const myHandlerInstance = new MyHandler();
|
const myHandlerInstance = new MyHandler();
|
||||||
|
@ -1,11 +1,26 @@
|
|||||||
import * as plugins from './sdk.plugins';
|
import * as plugins from './sdk.plugins';
|
||||||
import { AuthInfo } from './sdk.classes.authinfo';
|
import { AuthInfo } from './sdk.classes.authinfo';
|
||||||
|
|
||||||
|
export interface IRequirementResult {
|
||||||
|
allOk: boolean;
|
||||||
|
reason: string;
|
||||||
|
}
|
||||||
|
|
||||||
export abstract class AAgHandler<TClaim> {
|
export abstract class AAgHandler<TClaim> {
|
||||||
/**
|
/**
|
||||||
* a slug that separates the handler from other handlers
|
* a slug that separates the handler from other handlers
|
||||||
*/
|
*/
|
||||||
public abstract slug: string;
|
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>;
|
||||||
}
|
}
|
Reference in New Issue
Block a user