Overview Client API
Interface Style Choice
All examples below and in the rest of this guide will make use of the callback-based interface. For your convenience, we also provide a Promise-based interface.
Any call that has a callback parameter can have this callback function omitted and will then return a Promise instead.
Core Services
interface AbstractCore{
// async
info(callback:(error:CoreExceptions.RestException, data:any) => void):void;
infoBrowser(callback:(error:CoreExceptions.RestException, data:any) => void):void;
readers(callback:(error:CoreExceptions.RestException,data:any)=>void):void;
pollReaders(secondsToPollReader:number,
callback:(error:CoreExceptions.RestException,data:any)=>void,
connectReader:()=>void,
readerTimeout:()=>void
):void;
pollCardInserted(secondsToPollCard:number,
callback:(error:CoreExceptions.RestException,data:any)=>void,
connectReader:()=>void,
insertCard:()=>void,
cardTimeout:()=>void
):void;
readersCardAvailable(callback:(error:CoreExceptions.RestException,data:any)=>void):void;
readersCardsUnavailable(callback:(error:CoreExceptions.RestException,data:any)=>void):void;
reader(reader_id:string,callback:(error:CoreExceptions.RestException,data:any)=>void):void;
plugins(callback:(error:CoreExceptions.RestException,data:any)=>void):void;
getPubKey(callback:(error:CoreExceptions.RestException,data:any)=>void):void;
setPubKey(pubkey:any,callback:(error:CoreExceptions.RestException,data:any)=>void):void;
activate(callback:(error:CoreExceptions.RestException, data:any) => void):void;
// sync
getUrl():String;
infoBrowserSync():any;
// t1c-lib-info
version():String;
}
Distribution Service Client
interface AbstractDSClient{
getUrl():String;
getInfo(callback:(error:CoreExceptions.RestException, data:any) => void):void;
getJWT(callback:(error:CoreExceptions.RestException, data:any) => void):void;
getDevice(uuid,callback:(error:CoreExceptions.RestException, data:any) => void):void;
refreshJWT(callback:(error:CoreExceptions.RestException, data:any) => void):void;
getPubKey(callback:(error:CoreExceptions.RestException, data:any) => void):void;
downloadLink(infoBrowser, callback:(error:CoreExceptions.RestException, data:any) => void):void;
register(info, device_id, callback:(error:CoreExceptions.RestException, data:any) => void):void;
sync(info, device_id, callback:(error:CoreExceptions.RestException, data:any) => void):void;
}
Generic Interface
interface GenericService{
containerFor(readerId: string, callback?: (error: RestException, data: DataResponse) => void): Promise<DataResponse>
download(callback?: (error: RestException, data: DownloadLinkResponse) => void): Promise<DownloadLinkResponse>
dumpData(readerId: string, data: OptionalPin, callback?: (error: RestException, data: DataResponse) => void): Promise<DataResponse>
readersCanAuthenticate(callback?: (error: RestException, data: CardReadersResponse) => void): Promise<CardReadersResponse>
authenticate(readerId: string, data: AuthenticateOrSignData, callback?: (error: RestException, data: DataResponse) => void): Promise<DataResponse>
readersCanSign(callback?: (error: RestException, data: CardReadersResponse) => void): Promise<CardReadersResponse>
sign(readerId: string, data: AuthenticateOrSignData, callback?: (error: RestException, data: DataResponse) => void): Promise<DataResponse>
readersCanVerifyPin(callback?: (error: RestException, data: CardReadersResponse) => void): Promise<CardReadersResponse>
verifyPin(readerId: string, data: OptionalPin, callback?: (error: RestException, data: DataResponse) => void): Promise<DataResponse>
}
Last updated