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.T1CLibException, data:any) => void):void;
infoBrowser(callback:(error:CoreExceptions.T1CLibException, data:any) => void):void;
readers(callback:(error:CoreExceptions.T1CLibException,data:any)=>void):void;
pollReaders(secondsToPollReader:number,
callback:(error:CoreExceptions.T1CLibException,data:any)=>void,
connectReader:()=>void,
readerTimeout:()=>void
):void;
pollCardInserted(secondsToPollCard:number,
callback:(error:CoreExceptions.RestExT1CLibExceptioneption,data:any)=>void,
connectReader:()=>void,
insertCard:()=>void,
cardTimeout:()=>void
):void;
readersCardAvailable(callback:(error:CoreExceptions.T1CLibException,data:any)=>void):void;
readersCardsUnavailable(callback:(error:CoreExceptions.T1CLibException,data:any)=>void):void;
reader(reader_id:string,callback:(error:CoreExceptions.T1CLibException,data:any)=>void):void;
plugins(callback:(error:CoreExceptions.T1CLibException,data:any)=>void):void;
getPubKey(callback:(error:CoreExceptions.T1CLibException,data:any)=>void):void;
setPubKey(pubkey:any,callback:(error:CoreExceptions.T1CLibException,data:any)=>void):void;
activate(callback:(error:CoreExceptions.T1CLibException, 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.T1CLibException, data:any) => void):void;
getJWT(callback:(error:CoreExceptions.T1CLibException, data:any) => void):void;
getDevice(uuid,callback:(error:CoreExceptions.T1CLibException, data:any) => void):void;
refreshJWT(callback:(error:CoreExceptions.T1CLibException, data:any) => void):void;
getPubKey(callback:(error:CoreExceptions.T1CLibException, 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.T1CLibException, data:any) => void):void;
}
Generic Interface
interface GenericService{
containerFor(readerId: string, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>
download(callback?: (error: T1CLibException, data: DownloadLinkResponse) => void): Promise<DownloadLinkResponse>
dumpData(readerId: string, data: OptionalPin, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>
readersCanAuthenticate(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>
authenticate(readerId: string, data: AuthenticateOrSignData, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>
readersCanSign(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>
sign(readerId: string, data: AuthenticateOrSignData, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>
readersCanVerifyPin(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>
verifyPin(readerId: string, data: OptionalPin, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>
}
Last updated