11import pryv = require( 'pryv' ) ;
22import AppClientAccount from './AppClientAccount' ;
3+
34export = CollectorClient ;
5+
46/**
57 * Client App in relation to an AppManagingAccount/Collector
68 */
79declare class CollectorClient {
10+
811 static STATUSES : Readonly < {
912 incoming : "Incoming" ;
1013 active : "Active" ;
@@ -20,8 +23,8 @@ declare class CollectorClient {
2023 * return the key to discriminate collectorClients
2124 * @param {PryvAccessInfo } accessInfo
2225 */
23- static keyFromInfo ( info : any ) : string ;
24- constructor ( app : any , eventData : any , accessData ?: any ) ;
26+ static keyFromInfo ( info : pryv . AccessInfo ) : string ;
27+ constructor ( app : AppClientAccount , eventData : pryv . Event , accessData ?: any ) ;
2528 /** @type {AppClientAccount } */
2629 app : AppClientAccount ;
2730 /** @type {PryvEvent } */
@@ -31,13 +34,13 @@ declare class CollectorClient {
3134 /** @property {String } - identified within user's account - can be used to retreive a Collector Client from an app */
3235 get key ( ) : string ;
3336 /** @property {String } - id matching an event within requester's account - used as a reference to communicate with requester */
34- get requesterEventId ( ) : any ;
37+ get requesterEventId ( ) : string ;
3538 /** @property {String } */
36- get requesterApiEndpoint ( ) : any ;
39+ get requesterApiEndpoint ( ) : string ;
3740 /** @property {Object } - full content of the request */
3841 get requestData ( ) : any ;
3942 /** @property {string } - one of 'Incoming', 'Active', 'Deactivated', 'Refused' */
40- get status ( ) : any ;
43+ get status ( ) : string ;
4144 /**
4245 * @private
4346 * reset with new request Event of ApiEndpoint
@@ -50,13 +53,13 @@ declare class CollectorClient {
5053 */
5154 accept ( forceAndSkipAccessCreation ?: boolean ) : Promise < {
5255 accessData : any ;
53- requesterEvent : any ;
56+ requesterEvent : pryv . Event ;
5457 } > ;
5558 revoke ( ) : Promise < {
56- requesterEvent : any ;
59+ requesterEvent : pryv . Event ;
5760 } > ;
5861 refuse ( ) : Promise < {
59- requesterEvent : any ;
62+ requesterEvent : pryv . Event ;
6063 } > ;
6164 /**
6265 * Probable temporary internal to fix possible inconsenticies during lib early stages
0 commit comments