Files
calendar/packages/features/redis/IRedisService.d.ts
T
b4a51d3560 feat: auto lock (#18630)
* add delete to redis service

* auto lock + tests

* changes to autolock in api/book call

* remove log clutter

* add detection in api v1

* tpye changes

* throw error and add tests for API

* add response logic on locked + tests

* type response properly i hope?

* type fix

* add tests for counter not existing + redis errors

* remove IP - add sentry to track

* rename symbol

* fix type error

* fix tests

* remove sentry call spy

* fix type on sentry setUser call

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2025-01-18 16:21:12 -03:00

14 lines
435 B
TypeScript

export interface IRedisService {
get: <TData>(key: string) => Promise<TData | null>;
set: <TData>(key: string, value: TData) => Promise<"OK" | TData | null>;
expire: (key: string, seconds: number) => Promise<0 | 1>;
lrange: <TResult = string>(key: string, start: number, end: number) => Promise<TResult[]>;
lpush: <TData>(key: string, ...elements: TData[]) => Promise<number>;
del: (key: string) => Promise<number>;
}