UNPKG

denwa-nest-shared

Version:

Shared NestJS module for DTO validation, RBAC, TypeORM query building, and OpenAPI client

16 lines (15 loc) • 638 B
import type { Client } from '@opensearch-project/opensearch'; export declare class OpenSearchCore { private readonly client; private readonly enabled; constructor(client: Client | null, enabled: boolean); ensureIndex(index: string): Promise<void>; indexDocument(index: string, id: string, body: Record<string, unknown>): Promise<void>; removeDocument(index: string, id: string): Promise<void>; search(index: string, query: string, fields: string[], page?: number, limit?: number): Promise<{ data: Record<string, unknown>[]; total: number; page: number; limit: number; }>; }