Files
calendar/packages/features/watchlist/lib/interface/IBlockingService.ts
T
Syed Ali ShahbazGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
59fca85d92 fix: use graceful filtering for previously hard failing blocked users in team events (#26446)
* init

* typefix

* --

* fix test

* update index

* cleanup

* rm unnecessary comments

* improvements

* add tests

* test fixes

* fixes

* fixes

* fixes

* add try catch to make booking fail-open

* Update packages/features/watchlist/operations/check-user-blocking.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix type

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-01-08 08:30:54 -03:00

27 lines
728 B
TypeScript

import type { WatchlistType } from "../types";
export interface BlockingResult {
isBlocked: boolean;
reason?: WatchlistType;
watchlistEntry?: Record<string, unknown> | null;
}
/**
* Result of bulk blocking check.
* Maps email (lowercase) -> BlockingResult
*/
export type BulkBlockingResult = Map<string, BlockingResult>;
export interface IBlockingService {
/**
* Check if a single email is blocked.
*/
isBlocked(email: string, organizationId?: number | null): Promise<BlockingResult>;
/**
* Bulk check multiple emails in a single query.
* Returns Map<email, BlockingResult> for efficient lookup.
*/
areBlocked(emails: string[], organizationId?: number | null): Promise<BulkBlockingResult>;
}