import { Context , SqrlKey } from "sqrl" ; import { LabelService } from "./LabelFunctions" ; import { RateLimitService } from "./RateLimitFunctions" ; import { UniqueIdService } from "./services/RedisUniqueId" ; export interface CountService { fetch ( ctx , at , keys , windowMs ) : Promise < number [ ] > ; bump ( ctx , at , keys , windowMs , by ) : Promise < void > ; } export interface CountUniqueService { bump ( ctx , props ) : void ; fetchHashes ( ctx , props ) : Promise < string [ ] > ; fetchCounts ( ctx , props ) : Promise < number [ ] > ; } export interface Services { count : CountService ; countUnique : CountUniqueService ; label : LabelService ; rateLimit : RateLimitService ; uniqueId : UniqueIdService ; }