This repository was archived by the owner on Feb 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +75
-10
lines changed
Expand file tree Collapse file tree 7 files changed +75
-10
lines changed Original file line number Diff line number Diff line change 1+ import * as Promise from 'bluebird' ;
2+ import { Router } from 'express' ;
3+ import { Observable } from 'rxjs/Rx' ;
4+ import { IAdapterOptions } from './interfaces' ;
5+ export declare class Adapter {
6+ private avatar ;
7+ private connected ;
8+ private logger ;
9+ private logLevel ;
10+ private me ;
11+ private parser ;
12+ private serviceID ;
13+ private session ;
14+ private storeUsers ;
15+ private token ;
16+ private username ;
17+ private router ;
18+ private webhookServer ;
19+ private webhookURL ;
20+ constructor ( obj : IAdapterOptions ) ;
21+ users ( ) : Promise < Map < string , any > > ;
22+ channels ( ) : Promise < Error > ;
23+ serviceName ( ) : string ;
24+ serviceId ( ) : string ;
25+ getRouter ( ) : Router | null ;
26+ connect ( ) : Observable < object | Error > ;
27+ disconnect ( ) : Promise < null > ;
28+ listen ( ) : Observable < object > ;
29+ send ( data : object ) : Promise < any > ;
30+ }
Original file line number Diff line number Diff line change 1+ import { IActivityStream } from '@broid/schemas' ;
2+ import * as Promise from 'bluebird' ;
3+ export declare class Parser {
4+ serviceID : string ;
5+ generatorName : string ;
6+ private logger ;
7+ constructor ( serviceName : string , serviceID : string , logLevel : string ) ;
8+ validate ( event : any ) : Promise < any > ;
9+ parse ( event : any ) : Promise < IActivityStream | null > ;
10+ normalize ( evt : any ) : Promise < any > ;
11+ private createIdentifier ( ) ;
12+ private createActivityStream ( normalized ) ;
13+ }
Original file line number Diff line number Diff line change 1+ import * as Promise from 'bluebird' ;
2+ import * as express from 'express' ;
3+ import { IAdapterHTTPOptions } from './interfaces' ;
4+ export declare class WebHookServer {
5+ private express ;
6+ private logger ;
7+ private httpClient ;
8+ private host ;
9+ private port ;
10+ constructor ( options : IAdapterHTTPOptions , router : express . Router , logLevel ?: string ) ;
11+ listen ( ) : void ;
12+ close ( ) : Promise < null > ;
13+ private setupExpress ( router ) ;
14+ }
Original file line number Diff line number Diff line change 1+ import { Adapter } from './Adapter' ;
2+ export = Adapter ;
Original file line number Diff line number Diff line change 1+ export interface IAdapterHTTPOptions {
2+ host : string ;
3+ port : number ;
4+ }
5+ export interface IAdapterOptions {
6+ avatar : string ;
7+ http : IAdapterHTTPOptions ;
8+ logLevel : string ;
9+ serviceID : string ;
10+ token : string ;
11+ tokenSecret : string ;
12+ username : string ;
13+ webhookURL : string ;
14+ }
Original file line number Diff line number Diff line change 2121 request "^2.81.0"
2222 valid-url "^1.0.9"
2323
24- " @types/node@* " :
25- version "8.0.12"
26- resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.12.tgz#0560c3e8c9e3da0aa07d0b86e0b0a02b5fd29480"
27-
28- " @types/node@^7.0.12 " :
24+ " @types/node@*" , "@types/node@^7.0.12":
2925 version "7.0.12"
3026 resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.12.tgz#ae5f67a19c15f752148004db07cbbb372e69efc9"
3127
@@ -3799,11 +3795,7 @@ uuid@^2.0.1:
37993795 version "2.0.3"
38003796 resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
38013797
3802- uuid@^3.0.0 :
3803- version "3.0.1"
3804- resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
3805-
3806- uuid@^3.1.0 :
3798+ uuid@^3.0.0, uuid@^3.1.0 :
38073799 version "3.1.0"
38083800 resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
38093801
You can’t perform that action at this time.
0 commit comments